org.apache.chemistry.opencmis.client.api
Interface CmisObject

All Superinterfaces:
ObjectId
All Known Subinterfaces:
Document, FileableCmisObject, Folder, Policy, Relationship

public interface CmisObject
extends ObjectId

Base CMIS object. See CMIS Domain Model - section 2.1.2.


Method Summary
 void addAcl(List<Ace> addAces, AclPropagation aclPropagation)
          Adds ACEs to the object.
 Acl applyAcl(List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation)
          Adds and removes ACEs to the object.
 void applyPolicy(ObjectId policyId)
          Applies a policy to this object.
 void delete(boolean allVersions)
          Deletes this object.
 Acl getAcl()
          Returns the ACL if it has been fetched for this object.
 Acl getAcl(boolean onlyBasicPermissions)
          Fetches the ACL of this object from the repository.
 AllowableActions getAllowableActions()
          Returns the allowable actions if they have been fetched for this object.
 ObjectType getBaseType()
          Get the object's base type (maintained by the repository).
 BaseTypeId getBaseTypeId()
          Get the type's base type id.
 String getChangeToken()
          Get the change token for this object (maintained by the repository).
 String getCreatedBy()
          Get the id of the user who created the object (maintained by the repository).
 GregorianCalendar getCreationDate()
          Get the timestamp when the object was created (maintained by the repository).
 List<Object> getExtensions(ExtensionLevel level)
           
 GregorianCalendar getLastModificationDate()
          Get the timestamp when the object was changed (maintained by the repository).
 String getLastModifiedBy()
          Get the id of the user who changed the object (maintained by the repository).
 String getName()
          Get the name of this object.
 List<Policy> getPolicies()
          Returns the applied policies if they have been fetched for this object.
 List<Property<?>> getProperties()
          Returns all properties that have been fetched for this object.
<T> Property<T>
getProperty(String id)
          Returns a property by id.
<T> List<T>
getPropertyMultivalue(String id)
          Returns a property multi-value by id.
<T> T
getPropertyValue(String id)
          Returns a property (single) value by id.
 long getRefreshTimestamp()
          Returns the timestamp (in milliseconds) of the last refresh.
 List<Relationship> getRelationships()
          Returns the relationships if they have been fetched for this object.
 ItemIterable<Relationship> getRelationships(boolean includeSubRelationshipTypes, RelationshipDirection relationshipDirection, ObjectType type, OperationContext context)
          Fetches the relationships from or to this object from the repository.
 List<Rendition> getRenditions()
          Returns the renditions if they have been fetched for this object.
 ObjectType getType()
          Get the object's type.
 boolean isChanged()
          Returns true, if this object has pending changes which are not synced with the backend.
 void refresh()
          Reloads the data from the repository.
 void refreshIfOld(long durationInMillis)
          Reloads the data from the repository if the last refresh did not occur within durationInMillis.
 void removeAcl(List<Ace> removeAces, AclPropagation aclPropagation)
          Removes ACEs to the object.
 void removePolicy(ObjectId policyId)
          Remove a policy from this object.
 void setName(String name)
          Set the name of this object.
<T> void
setProperty(String id, T value)
          Sets a new property single value.
<T> void
setPropertyMultivalue(String id, List<T> value)
          Sets a new property multi value.
 ObjectId updateProperties()
          Updates the properties that have been set with setProperty(String, Object) or setPropertyMultivalue(String, List).
 ObjectId updateProperties(Map<String,?> properties)
          Updates the properties that are provided.
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.ObjectId
getId
 

Method Detail

getName

String getName()
Get the name of this object. Property<String> 'cmis:name'


setName

void setName(String name)
Set the name of this object. Property<String> 'cmis:name'


getCreatedBy

String getCreatedBy()
Get the id of the user who created the object (maintained by the repository). Property<String> 'cmis:createdBy'


getCreationDate

GregorianCalendar getCreationDate()
Get the timestamp when the object was created (maintained by the repository). Property<GregorianCalendar> 'cmis:creationDate'


getLastModifiedBy

String getLastModifiedBy()
Get the id of the user who changed the object (maintained by the repository). Property<String> 'cmis:lastModifiedBy'


getLastModificationDate

GregorianCalendar getLastModificationDate()
Get the timestamp when the object was changed (maintained by the repository). Property<GregorianCalendar> 'cmis:lastModificationDate'


getBaseType

ObjectType getBaseType()
Get the object's base type (maintained by the repository). Property<String> 'cmis:baseTypeId'


getType

ObjectType getType()
Get the object's type. Property<String> 'cmis:objectTypeId'


getBaseTypeId

BaseTypeId getBaseTypeId()
Get the type's base type id.

Returns:

getChangeToken

String getChangeToken()
Get the change token for this object (maintained by the repository). Property<String> 'cmis:changeToken'


getProperties

List<Property<?>> getProperties()
Returns all properties that have been fetched for this object. If the object was retrieved with a property filter, only the properties that matched the filter are available.


getProperty

<T> Property<T> getProperty(String id)
Returns a property by id.

Parameters:
id - the property id
Returns:
the property or null if the property does not exist or is not available

getPropertyValue

<T> T getPropertyValue(String id)
Returns a property (single) value by id.

Parameters:
id - the property id
Returns:
the property value or null if the property does not exist or is not available

getPropertyMultivalue

<T> List<T> getPropertyMultivalue(String id)
Returns a property multi-value by id.

Parameters:
id - the property id
Returns:
the list of values or null if the property does not exist or is not available

getAllowableActions

AllowableActions getAllowableActions()
Returns the allowable actions if they have been fetched for this object.


getRelationships

List<Relationship> getRelationships()
Returns the relationships if they have been fetched for this object.


getAcl

Acl getAcl()
Returns the ACL if it has been fetched for this object.


delete

void delete(boolean allVersions)
Deletes this object.

Parameters:
allVersions - if this object is a document this parameter defines if just this version or all versions should be deleted

updateProperties

ObjectId updateProperties()
Updates the properties that have been set with setProperty(String, Object) or setPropertyMultivalue(String, List).

Returns:
the object id of the updated object (a repository might have created a new object)

updateProperties

ObjectId updateProperties(Map<String,?> properties)
Updates the properties that are provided.

Parameters:
properties - the properties to update
Returns:
the object id of the updated object (a repository might have created a new object)

getRelationships

ItemIterable<Relationship> getRelationships(boolean includeSubRelationshipTypes,
                                            RelationshipDirection relationshipDirection,
                                            ObjectType type,
                                            OperationContext context)
Fetches the relationships from or to this object from the repository.


getRenditions

List<Rendition> getRenditions()
Returns the renditions if they have been fetched for this object.


applyPolicy

void applyPolicy(ObjectId policyId)
Applies a policy to this object.


removePolicy

void removePolicy(ObjectId policyId)
Remove a policy from this object.


getPolicies

List<Policy> getPolicies()
Returns the applied policies if they have been fetched for this object.


getAcl

Acl getAcl(boolean onlyBasicPermissions)
Fetches the ACL of this object from the repository.


applyAcl

Acl applyAcl(List<Ace> addAces,
             List<Ace> removeAces,
             AclPropagation aclPropagation)
Adds and removes ACEs to the object.

Returns:
the new ACL of this object

addAcl

void addAcl(List<Ace> addAces,
            AclPropagation aclPropagation)
Adds ACEs to the object.


removeAcl

void removeAcl(List<Ace> removeAces,
               AclPropagation aclPropagation)
Removes ACEs to the object.


setProperty

<T> void setProperty(String id,
                     T value)
Sets a new property single value. Use updateProperties() to store the new value in the repository.


setPropertyMultivalue

<T> void setPropertyMultivalue(String id,
                               List<T> value)
Sets a new property multi value. Use updateProperties() to store the new value in the repository.


getExtensions

List<Object> getExtensions(ExtensionLevel level)

isChanged

boolean isChanged()
Returns true, if this object has pending changes which are not synced with the backend.


getRefreshTimestamp

long getRefreshTimestamp()
Returns the timestamp (in milliseconds) of the last refresh.


refresh

void refresh()
Reloads the data from the repository.


refreshIfOld

void refreshIfOld(long durationInMillis)
Reloads the data from the repository if the last refresh did not occur within durationInMillis.



Copyright © 2009-2010 The Apache Software Foundation. All Rights Reserved.