org.xcmis.spi.basic
Class BasicObjectData

java.lang.Object
  extended by org.xcmis.spi.basic.BasicObjectData
All Implemented Interfaces:
ObjectData

public abstract class BasicObjectData
extends Object
implements ObjectData

Default Object Data impl


Constructor Summary
BasicObjectData()
           
 
Method Summary
 void accept(ObjectDataVisitor visitor)
          Accepts an ObjectDataVisitor.
 void applyPolicy(PolicyData policy)
          Applied specified policy to the current object.
 List<AccessControlEntry> getACL(boolean onlyBasicPermissions)
          Get ACL currently applied to object.
 String getChangeToken()
          Shortcut to 'cmis:changeToken' property.
 Collection<FolderData> getParents()
          Get collections of parent folders.
 Collection<PolicyData> getPolicies()
          Get policies applied to the current object.
 ItemsIterator<RelationshipData> getRelationships(RelationshipDirection direction, TypeDefinition type, boolean includeSubRelationshipTypes)
          Objects relationships.
 void removePolicy(PolicyData policy)
          Remove specified policy from object.
 void setACL(List<AccessControlEntry> acl)
          Set new ACL for object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xcmis.spi.ObjectData
getBaseType, getContentStream, getCreatedBy, getCreationDate, getLastModificationDate, getLastModifiedBy, getName, getObjectId, getParent, getProperties, getProperties, getProperty, getTypeDefinition, getTypeId, setProperties, setProperty
 

Constructor Detail

BasicObjectData

public BasicObjectData()
Method Detail

accept

public void accept(ObjectDataVisitor visitor)
Accepts an ObjectDataVisitor. Calls the visit method of visitor and pass this as parameter.

Specified by:
accept in interface ObjectData
Parameters:
visitor - visitor

applyPolicy

public void applyPolicy(PolicyData policy)
Applied specified policy to the current object. If Policy object type is not supported then this method must throw NotSupportedException.

Specified by:
applyPolicy in interface ObjectData
Parameters:
policy - policy to be applied

getACL

public List<AccessControlEntry> getACL(boolean onlyBasicPermissions)
Get ACL currently applied to object. If ACL capability is not supported then this method must throw NotSupportedException.

Specified by:
getACL in interface ObjectData
Parameters:
onlyBasicPermissions - if true then only CMIS basic permissions Permission.BasicPermissions must be returned if false then basic permissions and repository specific permissions must be returned
Returns:
applied ACL. If there is no ACL applied to object or if object is not controllable by ACL empty list must be returned, never null
See Also:
Permission.BasicPermissions

getChangeToken

public String getChangeToken()
Shortcut to 'cmis:changeToken' property.

Specified by:
getChangeToken in interface ObjectData
Returns:
'cmis:changeToken' property

getParents

public Collection<FolderData> getParents()
Get collections of parent folders. It may contains exactly one object for single-filed and empty collection for unfiled object or root folder.

Specified by:
getParents in interface ObjectData
Returns:
collection of object's parents

getPolicies

public Collection<PolicyData> getPolicies()
Get policies applied to the current object. If Policy object type is not supported then this method must throw NotSupportedException.

Specified by:
getPolicies in interface ObjectData
Returns:
applied Policies. If there is no policies applied to object or if object is not controllable by policy then empty list must be returned, never null

getRelationships

public ItemsIterator<RelationshipData> getRelationships(RelationshipDirection direction,
                                                        TypeDefinition type,
                                                        boolean includeSubRelationshipTypes)
Objects relationships.

Specified by:
getRelationships in interface ObjectData
Parameters:
direction - relationship's direction.
type - relationship type. If includeSubRelationshipTypes == true then all descendants of this type must be returned. If includeSubRelationshipTypes == true only relationship of the same type must be returned
includeSubRelationshipTypes - if true, then the return all relationships whose object types are descendant types of typeId.
Returns:
relationships if object has not any relationships then empty ItemsIterator must be returned, never null
See Also:
RelationshipDirection

removePolicy

public void removePolicy(PolicyData policy)
Remove specified policy from object. This method must not remove Policy object itself. If Policy object type is not supported then this method must throw NotSupportedException.

Specified by:
removePolicy in interface ObjectData
Parameters:
policy - the policy object

setACL

public void setACL(List<AccessControlEntry> acl)
Set new ACL for object. New ACL overwrite existed one. If ACL capability is not supported then this method must throw NotSupportedException . ACLs will be not merged but replace existed one by new.

Specified by:
setACL in interface ObjectData
Parameters:
acl - ACL that should replace currently applied ACL


Copyright © 2010 eXo Platform SAS. All Rights Reserved.