|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.chemistry.opencmis.client.runtime.AbstractCmisObject
public abstract class AbstractCmisObject
Base class for all persistent session object impl classes.
Constructor Summary | |
---|---|
AbstractCmisObject()
|
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. |
|
protected TransientCmisObject |
createTransientCmisObject()
|
|
void |
delete(boolean allVersions)
Deletes this object. |
|
Acl |
getAcl()
Returns the ACL if it has been fetched for this object. |
|
Acl |
getAcl(boolean onlyBasicPermissions)
|
|
|
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 ). |
|
List<CmisExtensionElement> |
getExtensions(ExtensionLevel level)
Returns the extensions for the given level. |
|
String |
getId()
Returns the 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. |
|
|
getProperty(String id)
Returns the requested property. |
|
protected String |
getPropertyQueryName(String propertyId)
Returns the query name of a property. |
|
|
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. |
|
protected SessionImpl |
getSession()
Returns the session object. |
|
TransientCmisObject |
getTransientObject()
Returns a transient object adapter. |
|
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 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. |
|
protected void |
writeLock()
Acquires a write lock. |
|
protected void |
writeUnlock()
Releases a write lock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractCmisObject()
Method Detail |
---|
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(boolean allVersions)
CmisObject
delete
in interface CmisObject
allVersions
- if this object is a document this parameter defines if just
this version or all versions should be deletedpublic CmisObject updateProperties(Map<String,?> properties)
CmisObject
updateProperties
in interface CmisObject
properties
- the properties to update
public ObjectId updateProperties(Map<String,?> properties, boolean refresh)
CmisObject
updateProperties
in interface CmisObject
properties
- the properties to updaterefresh
- indicates if the object should be refresh after the update
public ObjectType getBaseType()
CmisObjectProperties
cmis:baseTypeId
).
getBaseType
in interface CmisObjectProperties
public BaseTypeId getBaseTypeId()
CmisObjectProperties
cmis:baseTypeId
).
getBaseTypeId
in interface CmisObjectProperties
public String getChangeToken()
CmisObjectProperties
cmis:changeToken
).
getChangeToken
in interface CmisObjectProperties
public String getCreatedBy()
CmisObjectProperties
cmis:createdBy
).
getCreatedBy
in interface CmisObjectProperties
public GregorianCalendar getCreationDate()
CmisObjectProperties
cmis:creationDate
).
getCreationDate
in interface CmisObjectProperties
public String getId()
ObjectId
getId
in interface ObjectId
public GregorianCalendar getLastModificationDate()
CmisObjectProperties
cmis:lastModificationDate
).
getLastModificationDate
in interface CmisObjectProperties
public String getLastModifiedBy()
CmisObjectProperties
cmis:lastModifiedBy
).
getLastModifiedBy
in interface CmisObjectProperties
public String getName()
CmisObjectProperties
cmis:name
).
getName
in interface CmisObjectProperties
public List<Property<?>> getProperties()
CmisObjectProperties
getProperties
in interface CmisObjectProperties
public <T> Property<T> getProperty(String id)
CmisObjectProperties
null
is returned.
getProperty
in interface CmisObjectProperties
public <T> T getPropertyValue(String id)
CmisObjectProperties
null
is returned.
getPropertyValue
in interface CmisObjectProperties
public ObjectType getType()
CmisObjectProperties
cmis:objectTypeId
).
getType
in interface CmisObjectProperties
public AllowableActions getAllowableActions()
CmisObject
getAllowableActions
in interface CmisObject
public List<Rendition> getRenditions()
CmisObject
getRenditions
in interface CmisObject
public Acl getAcl(boolean onlyBasicPermissions)
public Acl applyAcl(List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation)
CmisObject
applyAcl
in interface CmisObject
public Acl addAcl(List<Ace> addAces, AclPropagation aclPropagation)
CmisObject
addAcl
in interface CmisObject
public Acl removeAcl(List<Ace> removeAces, AclPropagation aclPropagation)
CmisObject
removeAcl
in interface CmisObject
public Acl getAcl()
CmisObject
getAcl
in interface CmisObject
public void applyPolicy(ObjectId... policyIds)
CmisObject
applyPolicy
in interface CmisObject
public void removePolicy(ObjectId... policyIds)
CmisObject
removePolicy
in interface CmisObject
public List<Policy> getPolicies()
CmisObject
getPolicies
in interface CmisObject
public List<Relationship> getRelationships()
CmisObject
getRelationships
in interface CmisObject
public List<CmisExtensionElement> getExtensions(ExtensionLevel level)
CmisObject
getExtensions
in interface CmisObject
public <T> T getAdapter(Class<T> adapterInterface)
CmisObject
getAdapter
in interface CmisObject
public TransientCmisObject getTransientObject()
CmisObject
getTransientObject
in interface CmisObject
TransientCmisObject
protected TransientCmisObject createTransientCmisObject()
public long getRefreshTimestamp()
CmisObject
getRefreshTimestamp
in interface CmisObject
public void refresh()
CmisObject
refresh
in interface CmisObject
public void refreshIfOld(long durationInMillis)
CmisObject
durationInMillis
.
refreshIfOld
in interface CmisObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |