View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Michael Daum > WebService-Cmis-0.09 > WebService::Cmis::Object



Annotate this POD


New  4
Open  0
View/Report Bugs


WebService::Cmis::Object - Representation of a cmis object


This class provides the bulk of methods to work with CMIS objects. When creating a new object on the base of an xml document, will it be subclassed correctly reading the cmis:baseTypeId property.

  my $obj = WebService::Cmis::Object(

  if ($obj->isa('WebService::Cmis::Folder')) {
    # this is a folder

Parent class: WebService::Cmis::AtomEntry

Sub classes: WebService::Cmis::Folder, WebService::Cmis::Document, WebService::Cmis::Relationship, WebService::Cmis::Policy.


new(repository=>$repository, xmlDoc=>$xmlDoc) -> $object

constructor to get a specialized object, a subclass of WebService::Cmis::Object representing a cmis:document, cmis:folder, cmis:relationship or cmis:policy.


clean up internal caches


Fetches the latest representation of this object from the CMIS service. Some methods, like document->checkout do this for you.

If you call reload with a properties filter, the filter will be in effect on subsequent calls until the filter argument is changed. To reset to the full list of properties, call reload with filter set to '*'.


  • returnVersion
  • filter
  • includeAllowableActions
  • includePolicyIds
  • includeRelationships
  • includeACL
  • renditionFilter
getId() -> $id

returns the object ID for this object.

getName() -> $name

returns the cmis:name property.

getPath() -> $path

returns the cmis:path property.

getTypeId() -> $typeId

returns the cmis:objectTypeId property.

getProperties($filter) -> %properties;

returns a hash of the object's properties. If CMIS returns an empty element for a property, the property will be in the hash with an undef value

See CMIS specification document getProperties

getProperty($propName) -> $propValue

returns the value of a given property or undef if not available.

This is not covered by the cmis specs but makes live easier.

getAllowableActions() -> %allowableActions

returns a hash of allowable actions, keyed off of the action name.

  my $allowableActions = $obj->getAllowableActions;
  while (my ($action, $booleanFlag) = each %$allowableActions) {
    print "$action=$booleanFlag\n";

See CMIS specification document getAllowableActions

getACL() -> $acl

returns the access controls for this object.

The repository must have ACL capabilities 'manage' or 'discover'.

The optional onlyBasicPermissions argument is currently not supported.

See CMIS specification document getACL

getSelfLink -> $href

returns the URL used to retrieve this object.

getEditLink -> $href

returns the URL that can be used with the HTTP PUT method to modify the atom:entry for the CMIS resource

See CMIS specification document Existing Link Relations

getAppliedPolicies(%params) -> $atomFeed

returns the list of policies applied to this object.

See CMIS specification document getAppliedPolicies

getObjectParents(%params) -> $atomFeedOrEntry

gets the parent(s) for the specified non-folder, fileable object. This is either an atom feed of objects or the parent cmis object depending on the "up" relation.

The following optional arguments are - NOT YET - supported: (TODO)

  • filter
  • includeRelationships
  • renditionFilter
  • includeAllowableActions
  • includeRelativePathSegment

See CMIS specification document getObjectParents

getRelationships(%params) -> $atomFeed

returns a result set of relationship objects for each relationship where the source is this object.

The following optional arguments are - NOT YET - supported: (TODO)

  • includeSubRelationshipTypes
  • relationshipDirection
  • typeId
  • maxItems
  • skipCount
  • filter
  • includeAllowableActions

See CMIS specification document getObjectRelationships


Deletes this cmis object from the repository. Note that in the case of a Folder object, some repositories will refuse to delete it if it contains children and some will delete it without complaint. If what you really want to do is delete the folder and all of its descendants, use WebService::Cmis::Folder::deleteTree instead.

  • allVersions: if TRUE (default), then delete all versions of the document. If FALSE, delete only the document object specified. The Repository MUST ignore the value of this parameter when this service is invoke on a non-document object or non-versionable document object.

See CMIS specification document delete

move($sourceFolder, $targetFolder) -> $this

Moves the specified file-able object from one folder to another.

See CMIS specification document move

moveTo($targetFolder) -> $this

Convenience function to move an object from its parent folder to a given target folder. Same as Folder::addObject but in reverse logic


removes this object from the given parent folder. If the $folder parameter is not provided, the document is removed from any of its parent folders.

See CMIS specification document

updateProperties($propertyList) -> $this

TODO: The optional changeToken is not yet supported.

Updates the properties of an object with the properties provided. Only provide the set of properties that need to be updated.

  $folder = $repo->getObjectByPath('/SomeFolder');
  $folder->getName; # returns SomeFolder

      id => 'cmis:name',
      value => 'SomeOtherName',

  $folder->getName; # returns SomeOtherName

See CMIS specification document updateProperties

getSummary -> $summary

overrides AtomEntry::getSummary


overrides AtomEntry::updateSummary

rename($string) -> $this

rename this object updating its cmis:properties

applyACL($acl) -> $acl

applies specified ACL to the object and returns the updated ACLs as stored on the server.

  my $obj = $repo->getObject($id);
  my $acl = $obj->getACL->addEntry(
    new WebService::Cmis::ACE(
      principalId => 'jdoe',
      permissions => ['cmis:write', 'cmis:read'],
      direct => 'true',
  my $updatedACL => $obj->applyACL($acl);

See CMIS specification document applyACL


TODO: This is not yet implemented.


TODO: This is not yet implemented.


TODO: This is not yet implemented.


Copyright 2012-2013 Michael Daum

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See

syntax highlighting: