public abstract class AbstractCmisObject extends Object implements CmisObject, Serializable
| Constructor and Description |
|---|
AbstractCmisObject() |
| Modifier and Type | Method and Description |
|---|---|
Acl |
addAcl(List<Ace> addAces,
AclPropagation aclPropagation)
Adds ACEs to the object and refreshes this object afterwards.
|
Acl |
applyAcl(List<Ace> addAces,
List<Ace> removeAces,
AclPropagation aclPropagation)
Adds and removes ACEs to the object and refreshes this object afterwards.
|
void |
applyPolicy(ObjectId... policyIds)
Applies the provided policies and refreshes this object afterwards.
|
protected TransientCmisObject |
createTransientCmisObject()
Deprecated.
Support for transient objects will be removed in the future.
|
void |
delete()
Deletes this object.
|
void |
delete(boolean allVersions)
Deletes this object.
|
List<ObjectType> |
findObjectType(String id)
Returns a list of primary and secondary object types that define the
given property.
|
Acl |
getAcl()
Returns the ACL if it has been fetched for this object.
|
Acl |
getAcl(boolean onlyBasicPermissions) |
<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.
|
ObjectType |
getBaseType()
Returns the base type of this CMIS object (object type identified by
cmis:baseTypeId). |
BaseTypeId |
getBaseTypeId()
Returns the id of the base type of this CMIS object (CMIS property
cmis:baseTypeId). |
protected CmisBinding |
getBinding()
Returns the binding object.
|
String |
getChangeToken()
Returns the change token (CMIS property
cmis:changeToken). |
String |
getCreatedBy()
Returns the user who created this CMIS object (CMIS property
cmis:createdBy). |
protected OperationContext |
getCreationContext()
Returns the
OperationContext that was used to create this object. |
GregorianCalendar |
getCreationDate()
Returns the timestamp when this CMIS object has been created (CMIS
property
cmis:creationDate). |
String |
getDescription()
Returns the description of this CMIS object (CMIS property
cmis:description). |
List<CmisExtensionElement> |
getExtensions(ExtensionLevel level)
Returns the extensions for the given level.
|
String |
getId()
Returns the object id.
|
GregorianCalendar |
getLastModificationDate()
Returns the timestamp when this CMIS object has been modified (CMIS
property
cmis:lastModificationDate). |
String |
getLastModifiedBy()
Returns the user who modified this CMIS object (CMIS property
cmis:lastModifiedBy). |
String |
getName()
Returns the name of this CMIS object (CMIS property
cmis:name). |
protected ObjectFactory |
getObjectFactory()
Returns the object factory.
|
protected String |
getObjectId()
Returns the id of this object or throws an exception if the id is
unknown.
|
protected ObjectType |
getObjectType()
Returns the object type.
|
List<Policy> |
getPolicies()
Returns the applied policies if they have been fetched for this object.
|
List<Property<?>> |
getProperties()
Returns a list of all available CMIS properties.
|
<T> Property<T> |
getProperty(String id)
Returns the requested property.
|
protected String |
getPropertyQueryName(String propertyId)
Returns the query name of a property.
|
<T> T |
getPropertyValue(String id)
Returns the value of the requested property.
|
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.
|
protected String |
getRepositoryId()
Returns the repository id.
|
List<SecondaryType> |
getSecondaryTypes()
Returns the secondary types of this CMIS object (object types identified
by
cmis:secondaryObjectTypeIds). |
protected SessionImpl |
getSession()
Returns the session object.
|
TransientCmisObject |
getTransientObject()
Deprecated.
Support for transient objects will be removed in the future.
|
ObjectType |
getType()
Returns the type of this CMIS object (object type identified by
cmis:objectTypeId). |
protected void |
initialize(SessionImpl session,
ObjectType objectType,
ObjectData objectData,
OperationContext context)
Initializes the object.
|
protected void |
readLock()
Acquires a read lock.
|
protected void |
readUnlock()
Releases a read lock.
|
void |
refresh()
Reloads this object 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 and refreshes this object afterwards.
|
void |
removePolicy(ObjectId... policyIds)
Remove the provided policies and refreshes this object afterwards.
|
Acl |
setAcl(List<Ace> aces)
Removes the direct ACE of this object, sets the provided ACEs to the
object and refreshes this object afterwards.
|
String |
toString() |
CmisObject |
updateProperties(Map<String,?> properties)
Updates the provided properties and refreshes this object afterwards.
|
ObjectId |
updateProperties(Map<String,?> properties,
boolean refresh)
Updates the provided properties.
|
protected void |
writeLock()
Acquires a write lock.
|
protected void |
writeUnlock()
Releases a write lock.
|
protected void initialize(SessionImpl session, ObjectType objectType, ObjectData objectData, OperationContext context)
protected void writeLock()
protected void writeUnlock()
protected void readLock()
protected void readUnlock()
protected SessionImpl getSession()
protected String getRepositoryId()
protected ObjectType getObjectType()
protected CmisBinding getBinding()
protected ObjectFactory getObjectFactory()
protected String getObjectId()
protected OperationContext getCreationContext()
OperationContext that was used to create this object.protected String getPropertyQueryName(String propertyId)
public void delete()
CmisObjectdelete in interface CmisObjectpublic void delete(boolean allVersions)
CmisObjectdelete in interface CmisObjectallVersions - if this object is a document this parameter defines if only
this version or all versions should be deletedpublic CmisObject updateProperties(Map<String,?> properties)
CmisObjectupdateProperties in interface CmisObjectproperties - the properties to updatepublic ObjectId updateProperties(Map<String,?> properties, boolean refresh)
CmisObjectupdateProperties in interface CmisObjectproperties - the properties to updaterefresh - indicates if this object should be refresh after the updatepublic ObjectType getBaseType()
CmisObjectPropertiescmis:baseTypeId).getBaseType in interface CmisObjectPropertiespublic BaseTypeId getBaseTypeId()
CmisObjectPropertiescmis:baseTypeId).getBaseTypeId in interface CmisObjectPropertiespublic String getChangeToken()
CmisObjectPropertiescmis:changeToken).getChangeToken in interface CmisObjectPropertiespublic String getCreatedBy()
CmisObjectPropertiescmis:createdBy).getCreatedBy in interface CmisObjectPropertiespublic GregorianCalendar getCreationDate()
CmisObjectPropertiescmis:creationDate).getCreationDate in interface CmisObjectPropertiespublic GregorianCalendar getLastModificationDate()
CmisObjectPropertiescmis:lastModificationDate).getLastModificationDate in interface CmisObjectPropertiespublic String getLastModifiedBy()
CmisObjectPropertiescmis:lastModifiedBy).getLastModifiedBy in interface CmisObjectPropertiespublic String getName()
CmisObjectPropertiescmis:name).getName in interface CmisObjectPropertiespublic String getDescription()
CmisObjectPropertiescmis:description).getDescription in interface CmisObjectPropertiespublic List<Property<?>> getProperties()
CmisObjectPropertiesgetProperties in interface CmisObjectPropertiespublic <T> Property<T> getProperty(String id)
CmisObjectPropertiesnull is returned.getProperty in interface CmisObjectPropertiespublic <T> T getPropertyValue(String id)
CmisObjectPropertiesnull is returned.getPropertyValue in interface CmisObjectPropertiespublic ObjectType getType()
CmisObjectPropertiescmis:objectTypeId).getType in interface CmisObjectPropertiespublic List<SecondaryType> getSecondaryTypes()
CmisObjectPropertiescmis:secondaryObjectTypeIds).getSecondaryTypes in interface CmisObjectPropertiespublic List<ObjectType> findObjectType(String id)
CmisObjectPropertiesnull is returned.findObjectType in interface CmisObjectPropertiespublic AllowableActions getAllowableActions()
CmisObjectgetAllowableActions in interface CmisObjectpublic List<Rendition> getRenditions()
CmisObjectgetRenditions in interface CmisObjectpublic Acl getAcl(boolean onlyBasicPermissions)
public Acl applyAcl(List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation)
CmisObjectapplyAcl in interface CmisObjectpublic Acl addAcl(List<Ace> addAces, AclPropagation aclPropagation)
CmisObjectaddAcl in interface CmisObjectpublic Acl removeAcl(List<Ace> removeAces, AclPropagation aclPropagation)
CmisObjectremoveAcl in interface CmisObjectpublic Acl setAcl(List<Ace> aces)
CmisObjectsetAcl in interface CmisObjectpublic Acl getAcl()
CmisObjectgetAcl in interface CmisObjectpublic void applyPolicy(ObjectId... policyIds)
CmisObjectapplyPolicy in interface CmisObjectpublic void removePolicy(ObjectId... policyIds)
CmisObjectremovePolicy in interface CmisObjectpublic List<Policy> getPolicies()
CmisObjectgetPolicies in interface CmisObjectpublic List<Relationship> getRelationships()
CmisObjectgetRelationships in interface CmisObjectpublic List<CmisExtensionElement> getExtensions(ExtensionLevel level)
CmisObjectgetExtensions in interface CmisObjectpublic <T> T getAdapter(Class<T> adapterInterface)
CmisObjectgetAdapter in interface CmisObject@Deprecated public TransientCmisObject getTransientObject()
CmisObjectgetTransientObject in interface CmisObjectTransientCmisObject@Deprecated protected TransientCmisObject createTransientCmisObject()
public long getRefreshTimestamp()
CmisObjectgetRefreshTimestamp in interface CmisObjectpublic void refresh()
CmisObject
If the object doesn't exist anymore in the repository, a
CmisObjectNotFoundException is thrown.
refresh in interface CmisObjectpublic void refreshIfOld(long durationInMillis)
CmisObjectdurationInMillis.
If the object doesn't exist anymore in the repository, a
CmisObjectNotFoundException is thrown.
refreshIfOld in interface CmisObjectCopyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.