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

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

public interface CmisObject
extends ObjectId, CmisObjectProperties

Base CMIS object.

See CMIS Domain Model - section 2.1.2.


Method Summary
 Acl 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... policyIds)
          Applies policies to this object.
 void delete(boolean allVersions)
          Deletes this object.
 Acl getAcl()
          Returns the ACL if it has been fetched for this object.
<T> T
getAdapter(Class<T> adapterInterface)
          Returns an adapter based on the given interface.
 AllowableActions getAllowableActions()
          Returns the allowable actions if they have been fetched for this object.
 List<CmisExtensionElement> getExtensions(ExtensionLevel level)
          Returns the extensions for the given level.
 List<Policy> getPolicies()
          Returns the applied policies if they have been fetched for this object.
 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.
 List<Rendition> getRenditions()
          Returns the renditions if they have been fetched for this object.
 TransientCmisObject getTransientObject()
          Returns a transient object adapter.
 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.
 Acl removeAcl(List<Ace> removeAces, AclPropagation aclPropagation)
          Removes ACEs to the object.
 void removePolicy(ObjectId... policyIds)
          Remove policies from this object.
 CmisObject updateProperties(Map<String,?> properties)
          Updates the properties that are provided.
 ObjectId updateProperties(Map<String,?> properties, boolean refresh)
          Updates the properties that are provided.
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.ObjectId
getId
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
getBaseType, getBaseTypeId, getChangeToken, getCreatedBy, getCreationDate, getLastModificationDate, getLastModifiedBy, getName, getProperties, getProperty, getPropertyValue, getType
 

Method Detail

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

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

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

updateProperties

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

Parameters:
properties - the properties to update
refresh - indicates if the object should be refresh after the update
Returns:
the object id of the updated object (a repository might have created a new object)

getRenditions

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


applyPolicy

void applyPolicy(ObjectId... policyIds)
Applies policies to this object.


removePolicy

void removePolicy(ObjectId... policyIds)
Remove policies from this object.


getPolicies

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


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

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


removeAcl

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


getExtensions

List<CmisExtensionElement> getExtensions(ExtensionLevel level)
Returns the extensions for the given level.


getAdapter

<T> T getAdapter(Class<T> adapterInterface)
Returns an adapter based on the given interface.


getTransientObject

TransientCmisObject getTransientObject()
Returns a transient object adapter.

See Also:
TransientCmisObject

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-2011 The Apache Software Foundation. All Rights Reserved.