org.apache.chemistry.opencmis.client.runtime
Class AbstractTransientCmisObject

java.lang.Object
  extended by org.apache.chemistry.opencmis.client.runtime.AbstractTransientCmisObject
All Implemented Interfaces:
CmisObjectProperties, ObjectId, TransientCmisObject
Direct Known Subclasses:
AbstractTransientFileableCmisObject, TransientRelationshipImpl

public abstract class AbstractTransientCmisObject
extends Object
implements TransientCmisObject


Nested Class Summary
static class AbstractTransientCmisObject.AceChangeHolder
           
 
Field Summary
protected  Acl acl
           
protected  Map<AclPropagation,List<AbstractTransientCmisObject.AceChangeHolder>> addAces
           
protected  Set<String> addPolicies
           
protected  AllowableActions allowableActions
           
protected  boolean deleteAllVersions
           
protected  Map<ExtensionLevel,List<CmisExtensionElement>> inputExtensions
           
protected  boolean isMarkedForDelete
           
protected  boolean isModified
           
protected  boolean isPropertyUpdateRequired
           
protected  CmisObject object
           
protected  Map<ExtensionLevel,List<CmisExtensionElement>> ouputExtensions
           
protected  List<Policy> policies
           
protected  Map<String,Property<?>> properties
           
protected  List<Relationship> relationships
           
protected  Map<AclPropagation,List<AbstractTransientCmisObject.AceChangeHolder>> removeAces
           
protected  Set<String> removePolicies
           
protected  List<Rendition> renditions
           
protected  Session session
           
 
Constructor Summary
AbstractTransientCmisObject()
           
 
Method Summary
 void addAce(String principalId, List<String> permissions, AclPropagation aclPropagation)
           
 void applyPolicy(Policy... policyIds)
           
 void delete(boolean allVersions)
           
 AllowableActions getAllowableActions()
           
 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).
 CmisObject getCmisObject()
           
 String getCreatedBy()
          Returns the user who created this CMIS object (CMIS property cmis:createdBy).
 GregorianCalendar getCreationDate()
          Returns the timestamp when this CMIS object has been created (CMIS property cmis:creationDate).
 String getId()
          Returns the id.
 List<CmisExtensionElement> getInputExtensions(ExtensionLevel level)
           
 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).
protected  String getLatestChangeToken(String objectId)
          Fetches the latest change token of this object from the repository.
 String getName()
          Returns the name of this CMIS object (CMIS property cmis:name).
protected  ObjectFactory getObjectFactory()
          Returns the object factory.
protected  ObjectId getObjectId()
           
 Acl getOriginalAcl()
           
 List<CmisExtensionElement> getOutputExtensions(ExtensionLevel level)
           
 List<Policy> getPolicies()
           
 List<Property<?>> getProperties()
          Returns a list of all available CMIS properties.
<T> Property<T>
getProperty(String id)
          Returns the requested property.
<T> T
getPropertyValue(String id)
          Returns the value of the requested property.
 List<Relationship> getRelationships()
           
 List<Rendition> getRenditions()
           
protected  String getRepositoryId()
          Returns the repository id.
protected  Session getSession()
          Returns the session object.
 ObjectType getType()
          Returns the type of this CMIS object (object type identified by cmis:objectTypeId).
protected  void initialize(Session session, CmisObject object)
           
 boolean isMarkedForDelete()
           
 boolean isModified()
           
protected  Acl prepareAcl(List<AbstractTransientCmisObject.AceChangeHolder> achList)
           
protected  Properties prepareProperties()
           
 void refreshAndReset()
           
 void removeAce(String principalId, List<String> permissions, AclPropagation aclPropagation)
           
 void removePolicy(Policy... policyIds)
           
 void reset()
           
 ObjectId save()
           
protected  void saveACL(String objectId)
           
protected  boolean saveDelete(String objectId)
           
protected  void savePolicies(String objectId)
           
protected  String saveProperties(String objectId, String changeToken)
           
 void setName(String name)
           
 void setOutputExtensions(ExtensionLevel level, List<CmisExtensionElement> extensions)
           
<T> void
setPropertyValue(String id, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

session

protected Session session

object

protected CmisObject object

properties

protected Map<String,Property<?>> properties

allowableActions

protected AllowableActions allowableActions

renditions

protected List<Rendition> renditions

acl

protected Acl acl

addAces

protected Map<AclPropagation,List<AbstractTransientCmisObject.AceChangeHolder>> addAces

removeAces

protected Map<AclPropagation,List<AbstractTransientCmisObject.AceChangeHolder>> removeAces

policies

protected List<Policy> policies

addPolicies

protected Set<String> addPolicies

removePolicies

protected Set<String> removePolicies

relationships

protected List<Relationship> relationships

inputExtensions

protected Map<ExtensionLevel,List<CmisExtensionElement>> inputExtensions

ouputExtensions

protected Map<ExtensionLevel,List<CmisExtensionElement>> ouputExtensions

isModified

protected boolean isModified

isPropertyUpdateRequired

protected boolean isPropertyUpdateRequired

isMarkedForDelete

protected boolean isMarkedForDelete

deleteAllVersions

protected boolean deleteAllVersions
Constructor Detail

AbstractTransientCmisObject

public AbstractTransientCmisObject()
Method Detail

initialize

protected void initialize(Session session,
                          CmisObject object)

getCmisObject

public CmisObject getCmisObject()
Specified by:
getCmisObject in interface TransientCmisObject

getSession

protected Session getSession()
Returns the session object.


getRepositoryId

protected String getRepositoryId()
Returns the repository id.


getBinding

protected CmisBinding getBinding()
Returns the binding object.


getObjectFactory

protected ObjectFactory getObjectFactory()
Returns the object factory.


getObjectId

protected ObjectId getObjectId()

getBaseType

public ObjectType getBaseType()
Description copied from interface: CmisObjectProperties
Returns the base type of this CMIS object (object type identified by cmis:baseTypeId).

Specified by:
getBaseType in interface CmisObjectProperties

getBaseTypeId

public BaseTypeId getBaseTypeId()
Description copied from interface: CmisObjectProperties
Returns the id of the base type of this CMIS object (CMIS property cmis:baseTypeId).

Specified by:
getBaseTypeId in interface CmisObjectProperties

getType

public ObjectType getType()
Description copied from interface: CmisObjectProperties
Returns the type of this CMIS object (object type identified by cmis:objectTypeId).

Specified by:
getType in interface CmisObjectProperties

getChangeToken

public String getChangeToken()
Description copied from interface: CmisObjectProperties
Returns the change token (CMIS property cmis:changeToken).

Specified by:
getChangeToken in interface CmisObjectProperties

getCreatedBy

public String getCreatedBy()
Description copied from interface: CmisObjectProperties
Returns the user who created this CMIS object (CMIS property cmis:createdBy).

Specified by:
getCreatedBy in interface CmisObjectProperties

getCreationDate

public GregorianCalendar getCreationDate()
Description copied from interface: CmisObjectProperties
Returns the timestamp when this CMIS object has been created (CMIS property cmis:creationDate).

Specified by:
getCreationDate in interface CmisObjectProperties

getId

public String getId()
Description copied from interface: ObjectId
Returns the id.

Specified by:
getId in interface ObjectId

getLastModificationDate

public GregorianCalendar getLastModificationDate()
Description copied from interface: CmisObjectProperties
Returns the timestamp when this CMIS object has been modified (CMIS property cmis:lastModificationDate).

Specified by:
getLastModificationDate in interface CmisObjectProperties

getLastModifiedBy

public String getLastModifiedBy()
Description copied from interface: CmisObjectProperties
Returns the user who modified this CMIS object (CMIS property cmis:lastModifiedBy).

Specified by:
getLastModifiedBy in interface CmisObjectProperties

getName

public String getName()
Description copied from interface: CmisObjectProperties
Returns the name of this CMIS object (CMIS property cmis:name).

Specified by:
getName in interface CmisObjectProperties

setName

public void setName(String name)
Specified by:
setName in interface TransientCmisObject

getProperties

public List<Property<?>> getProperties()
Description copied from interface: CmisObjectProperties
Returns a list of all available CMIS properties.

Specified by:
getProperties in interface CmisObjectProperties

getProperty

public <T> Property<T> getProperty(String id)
Description copied from interface: CmisObjectProperties
Returns the requested property. If the property is not available, null is returned.

Specified by:
getProperty in interface CmisObjectProperties

getPropertyValue

public <T> T getPropertyValue(String id)
Description copied from interface: CmisObjectProperties
Returns the value of the requested property. If the property is not available, null is returned.

Specified by:
getPropertyValue in interface CmisObjectProperties

setPropertyValue

public <T> void setPropertyValue(String id,
                                 Object value)
Specified by:
setPropertyValue in interface TransientCmisObject

getAllowableActions

public AllowableActions getAllowableActions()
Specified by:
getAllowableActions in interface TransientCmisObject

getRelationships

public List<Relationship> getRelationships()
Specified by:
getRelationships in interface TransientCmisObject

getRenditions

public List<Rendition> getRenditions()
Specified by:
getRenditions in interface TransientCmisObject

delete

public void delete(boolean allVersions)
Specified by:
delete in interface TransientCmisObject

applyPolicy

public void applyPolicy(Policy... policyIds)
Specified by:
applyPolicy in interface TransientCmisObject

removePolicy

public void removePolicy(Policy... policyIds)
Specified by:
removePolicy in interface TransientCmisObject

getPolicies

public List<Policy> getPolicies()
Specified by:
getPolicies in interface TransientCmisObject

getOriginalAcl

public Acl getOriginalAcl()
Specified by:
getOriginalAcl in interface TransientCmisObject

addAce

public void addAce(String principalId,
                   List<String> permissions,
                   AclPropagation aclPropagation)
Specified by:
addAce in interface TransientCmisObject

removeAce

public void removeAce(String principalId,
                      List<String> permissions,
                      AclPropagation aclPropagation)
Specified by:
removeAce in interface TransientCmisObject

getInputExtensions

public List<CmisExtensionElement> getInputExtensions(ExtensionLevel level)
Specified by:
getInputExtensions in interface TransientCmisObject

getOutputExtensions

public List<CmisExtensionElement> getOutputExtensions(ExtensionLevel level)
Specified by:
getOutputExtensions in interface TransientCmisObject

setOutputExtensions

public void setOutputExtensions(ExtensionLevel level,
                                List<CmisExtensionElement> extensions)
Specified by:
setOutputExtensions in interface TransientCmisObject

isMarkedForDelete

public boolean isMarkedForDelete()
Specified by:
isMarkedForDelete in interface TransientCmisObject

isModified

public boolean isModified()
Specified by:
isModified in interface TransientCmisObject

reset

public void reset()
Specified by:
reset in interface TransientCmisObject

refreshAndReset

public void refreshAndReset()
Specified by:
refreshAndReset in interface TransientCmisObject

save

public ObjectId save()
Specified by:
save in interface TransientCmisObject

getLatestChangeToken

protected String getLatestChangeToken(String objectId)
Fetches the latest change token of this object from the repository.


saveDelete

protected boolean saveDelete(String objectId)

prepareProperties

protected Properties prepareProperties()

saveProperties

protected String saveProperties(String objectId,
                                String changeToken)

savePolicies

protected void savePolicies(String objectId)

prepareAcl

protected Acl prepareAcl(List<AbstractTransientCmisObject.AceChangeHolder> achList)

saveACL

protected void saveACL(String objectId)


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