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.
 Map<String,Property<?>> getProperties(PropertyFilter filter)
          Get subset of properties accepted by PropertyFilter.
 Property<?> getProperty(String id)
          
 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, 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. Implementation Compatibility: the support for policy objects is optional, 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. 2.2.10.1 getACL Implementation Compatibility: MUST be implemented if getRepository returns capabilityACL=discover or =manage.

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

getProperties

public Map<String,Property<?>> getProperties(PropertyFilter filter)
Get subset of properties accepted by PropertyFilter.

Specified by:
getProperties in interface ObjectData
Parameters:
filter - property filter
Returns:
subset of properties

getProperty

public Property<?> getProperty(String id)

Specified by:
getProperty in interface ObjectData
Parameters:
id - property ID
Returns:
property with specified ID or null

getPolicies

public Collection<PolicyData> getPolicies()
Get policies applied to the current object. 2.2.9.3 getAppliedPolicies Implementation Compatibility: the support for policy objects is optional, if implementation does not support cmis:policy object-type method should 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. Implementation Compatibility: the support for relationship objects is optional, if implementation does not support cmis:relationship object-type method should throw NotSupportedException

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. Implementation Compatibility: the support for policy objects is optional, if implementation does not support cmis:policy object-type method should 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. 2.2.10.2 applyACL Implementation Compatibility: MUST be implemented if getRepository returns capabilityACL != none

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


Copyright © 2011 eXo Platform SAS. All Rights Reserved.