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()
CmisObject
delete
in interface CmisObject
public void delete(boolean allVersions)
CmisObject
delete
in interface CmisObject
allVersions
- if this object is a document this parameter defines if only
this version or all versions should be deletedpublic CmisObject updateProperties(Map<String,?> properties)
CmisObject
updateProperties
in interface CmisObject
properties
- the properties to updatepublic ObjectId updateProperties(Map<String,?> properties, boolean refresh)
CmisObject
updateProperties
in interface CmisObject
properties
- the properties to updaterefresh
- indicates if this object should be refresh after the updatepublic 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 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 String getDescription()
CmisObjectProperties
cmis:description
).getDescription
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 List<SecondaryType> getSecondaryTypes()
CmisObjectProperties
cmis:secondaryObjectTypeIds
).getSecondaryTypes
in interface CmisObjectProperties
public List<ObjectType> findObjectType(String id)
CmisObjectProperties
null
is returned.findObjectType
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 setAcl(List<Ace> aces)
CmisObject
setAcl
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
@Deprecated public TransientCmisObject getTransientObject()
CmisObject
getTransientObject
in interface CmisObject
TransientCmisObject
@Deprecated protected TransientCmisObject createTransientCmisObject()
public long getRefreshTimestamp()
CmisObject
getRefreshTimestamp
in interface CmisObject
public void refresh()
CmisObject
If the object doesn't exist anymore in the repository, a
CmisObjectNotFoundException
is thrown.
refresh
in interface CmisObject
public void refreshIfOld(long durationInMillis)
CmisObject
durationInMillis
.
If the object doesn't exist anymore in the repository, a
CmisObjectNotFoundException
is thrown.
refreshIfOld
in interface CmisObject
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.