org.alfresco.cmis.client.impl
Class AlfrescoDocumentImpl

java.lang.Object
  extended by org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject
      extended by org.apache.chemistry.opencmis.client.runtime.AbstractFilableCmisObject
          extended by org.apache.chemistry.opencmis.client.runtime.DocumentImpl
              extended by org.alfresco.cmis.client.impl.AlfrescoDocumentImpl
All Implemented Interfaces:
Serializable, AlfrescoAspects, AlfrescoDocument, org.apache.chemistry.opencmis.client.api.CmisObject, org.apache.chemistry.opencmis.client.api.CmisObjectProperties, org.apache.chemistry.opencmis.client.api.Document, org.apache.chemistry.opencmis.client.api.DocumentProperties, org.apache.chemistry.opencmis.client.api.FileableCmisObject, org.apache.chemistry.opencmis.client.api.ObjectId

public class AlfrescoDocumentImpl
extends org.apache.chemistry.opencmis.client.runtime.DocumentImpl
implements AlfrescoDocument

See Also:
Serialized Form

Field Summary
protected  AlfrescoAspectsImpl aspects
           
 
Constructor Summary
AlfrescoDocumentImpl(org.apache.chemistry.opencmis.client.runtime.SessionImpl session, org.apache.chemistry.opencmis.client.api.ObjectType objectType, org.apache.chemistry.opencmis.commons.data.ObjectData objectData, org.apache.chemistry.opencmis.client.api.OperationContext context)
           
 
Method Summary
 org.apache.chemistry.opencmis.client.api.CmisObject addAspect(org.apache.chemistry.opencmis.client.api.ObjectType... type)
          Adds one or more aspects to the object.
 org.apache.chemistry.opencmis.client.api.CmisObject addAspect(org.apache.chemistry.opencmis.client.api.ObjectType[] type, Map<String,?> properties)
          Adds aspects and sets aspect properties.
 org.apache.chemistry.opencmis.client.api.CmisObject addAspect(org.apache.chemistry.opencmis.client.api.ObjectType type, Map<String,?> properties)
          Adds an aspect and sets aspect properties.
 org.apache.chemistry.opencmis.client.api.CmisObject addAspect(String... id)
          Adds one or more aspects to the object.
 org.apache.chemistry.opencmis.client.api.CmisObject addAspect(String[] id, Map<String,?> properties)
          Adds aspects and sets aspect properties.
 org.apache.chemistry.opencmis.client.api.CmisObject addAspect(String id, Map<String,?> properties)
          Adds an aspect and sets aspect properties.
 org.apache.chemistry.opencmis.client.api.ObjectId checkIn(boolean major, Map<String,?> properties, org.apache.chemistry.opencmis.commons.data.ContentStream contentStream, String checkinComment, List<org.apache.chemistry.opencmis.client.api.Policy> policies, List<org.apache.chemistry.opencmis.commons.data.Ace> addAces, List<org.apache.chemistry.opencmis.commons.data.Ace> removeAces)
           
protected  org.apache.chemistry.opencmis.client.api.TransientCmisObject createTransientCmisObject()
           
 org.apache.chemistry.opencmis.client.api.ObjectType findAspect(String propertyId)
          Returns the aspect type that defines the given property.
 Collection<org.apache.chemistry.opencmis.client.api.ObjectType> getAspects()
          Returns all applied aspects.
 AlfrescoDocumentType getTypeWithAspects()
          Returns a type definition with the applied aspects.
 boolean hasAspect(org.apache.chemistry.opencmis.client.api.ObjectType type)
          Returns if the given aspect is applied to this object.
 boolean hasAspect(String id)
          Returns if the given aspect is applied to this object.
protected  void initialize(org.apache.chemistry.opencmis.client.runtime.SessionImpl session, org.apache.chemistry.opencmis.client.api.ObjectType objectType, org.apache.chemistry.opencmis.commons.data.ObjectData objectData, org.apache.chemistry.opencmis.client.api.OperationContext context)
           
 org.apache.chemistry.opencmis.client.api.CmisObject removeAspect(org.apache.chemistry.opencmis.client.api.ObjectType... type)
          Removes one or more aspects from the object.
 org.apache.chemistry.opencmis.client.api.CmisObject removeAspect(String... id)
          Removes one or more aspects from the object.
 org.apache.chemistry.opencmis.client.api.ObjectId updateProperties(Map<String,?> properties, boolean refresh)
           
 
Methods inherited from class org.apache.chemistry.opencmis.client.runtime.DocumentImpl
appendContentStream, appendContentStream, cancelCheckOut, checkIn, checkOut, copy, copy, copyViaClient, deleteAllVersions, deleteContentStream, deleteContentStream, getAllVersions, getAllVersions, getCheckinComment, getContentStream, getContentStream, getContentStream, getContentStream, getContentStreamFileName, getContentStreamId, getContentStreamLength, getContentStreamMimeType, getObjectOfLatestVersion, getObjectOfLatestVersion, getTransientDocument, getVersionLabel, getVersionSeriesCheckedOutBy, getVersionSeriesCheckedOutId, getVersionSeriesId, isImmutable, isLatestMajorVersion, isLatestVersion, isMajorVersion, isPrivateWorkingCopy, isVersionSeriesCheckedOut, setContentStream, setContentStream
 
Methods inherited from class org.apache.chemistry.opencmis.client.runtime.AbstractFilableCmisObject
addToFolder, getParents, getParents, getPaths, move, move, removeFromFolder
 
Methods inherited from class org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject
addAcl, applyAcl, applyPolicy, delete, delete, findObjectType, getAcl, getAcl, getAdapter, getAllowableActions, getBaseType, getBaseTypeId, getBinding, getChangeToken, getCreatedBy, getCreationContext, getCreationDate, getDescription, getExtensions, getId, getLastModificationDate, getLastModifiedBy, getName, getObjectFactory, getObjectId, getObjectType, getPolicies, getProperties, getProperty, getPropertyQueryName, getPropertyValue, getRefreshTimestamp, getRelationships, getRenditions, getRepositoryId, getSecondaryTypes, getSession, getTransientObject, getType, readLock, readUnlock, refresh, refreshIfOld, removeAcl, removePolicy, setAcl, toString, updateProperties, writeLock, writeUnlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.Document
appendContentStream, appendContentStream, cancelCheckOut, checkIn, checkOut, copy, copy, deleteAllVersions, deleteContentStream, deleteContentStream, getAllVersions, getAllVersions, getContentStream, getContentStream, getContentStream, getContentStream, getObjectOfLatestVersion, getObjectOfLatestVersion, getTransientDocument, setContentStream, setContentStream
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.FileableCmisObject
addToFolder, getParents, getParents, getPaths, move, move, removeFromFolder
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.CmisObject
addAcl, applyAcl, applyPolicy, delete, delete, getAcl, getAdapter, getAllowableActions, getExtensions, getPolicies, getRefreshTimestamp, getRelationships, getRenditions, getTransientObject, refresh, refreshIfOld, removeAcl, removePolicy, setAcl, updateProperties
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.ObjectId
getId
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
findObjectType, getBaseType, getBaseTypeId, getChangeToken, getCreatedBy, getCreationDate, getDescription, getLastModificationDate, getLastModifiedBy, getName, getProperties, getProperty, getPropertyValue, getSecondaryTypes, getType
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.DocumentProperties
getCheckinComment, getContentStreamFileName, getContentStreamId, getContentStreamLength, getContentStreamMimeType, getVersionLabel, getVersionSeriesCheckedOutBy, getVersionSeriesCheckedOutId, getVersionSeriesId, isImmutable, isLatestMajorVersion, isLatestVersion, isMajorVersion, isPrivateWorkingCopy, isVersionSeriesCheckedOut
 

Field Detail

aspects

protected AlfrescoAspectsImpl aspects
Constructor Detail

AlfrescoDocumentImpl

public AlfrescoDocumentImpl(org.apache.chemistry.opencmis.client.runtime.SessionImpl session,
                            org.apache.chemistry.opencmis.client.api.ObjectType objectType,
                            org.apache.chemistry.opencmis.commons.data.ObjectData objectData,
                            org.apache.chemistry.opencmis.client.api.OperationContext context)
Method Detail

initialize

protected void initialize(org.apache.chemistry.opencmis.client.runtime.SessionImpl session,
                          org.apache.chemistry.opencmis.client.api.ObjectType objectType,
                          org.apache.chemistry.opencmis.commons.data.ObjectData objectData,
                          org.apache.chemistry.opencmis.client.api.OperationContext context)
Overrides:
initialize in class org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject

createTransientCmisObject

protected org.apache.chemistry.opencmis.client.api.TransientCmisObject createTransientCmisObject()
Overrides:
createTransientCmisObject in class org.apache.chemistry.opencmis.client.runtime.DocumentImpl

getTypeWithAspects

public AlfrescoDocumentType getTypeWithAspects()
Description copied from interface: AlfrescoAspects
Returns a type definition with the applied aspects.

Specified by:
getTypeWithAspects in interface AlfrescoAspects
Returns:
an object type with all property definitions (object and aspect properties).

updateProperties

public org.apache.chemistry.opencmis.client.api.ObjectId updateProperties(Map<String,?> properties,
                                                                          boolean refresh)
Specified by:
updateProperties in interface org.apache.chemistry.opencmis.client.api.CmisObject
Overrides:
updateProperties in class org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject

checkIn

public org.apache.chemistry.opencmis.client.api.ObjectId checkIn(boolean major,
                                                                 Map<String,?> properties,
                                                                 org.apache.chemistry.opencmis.commons.data.ContentStream contentStream,
                                                                 String checkinComment,
                                                                 List<org.apache.chemistry.opencmis.client.api.Policy> policies,
                                                                 List<org.apache.chemistry.opencmis.commons.data.Ace> addAces,
                                                                 List<org.apache.chemistry.opencmis.commons.data.Ace> removeAces)
Specified by:
checkIn in interface org.apache.chemistry.opencmis.client.api.Document
Overrides:
checkIn in class org.apache.chemistry.opencmis.client.runtime.DocumentImpl

hasAspect

public boolean hasAspect(String id)
Description copied from interface: AlfrescoAspects
Returns if the given aspect is applied to this object.

Specified by:
hasAspect in interface AlfrescoAspects
Parameters:
id - the aspect id
Returns:
true if the aspect is applied, false otherwise

hasAspect

public boolean hasAspect(org.apache.chemistry.opencmis.client.api.ObjectType type)
Description copied from interface: AlfrescoAspects
Returns if the given aspect is applied to this object.

Specified by:
hasAspect in interface AlfrescoAspects
Parameters:
type - the aspect object type
Returns:
true if the aspect is applied, false otherwise

getAspects

public Collection<org.apache.chemistry.opencmis.client.api.ObjectType> getAspects()
Description copied from interface: AlfrescoAspects
Returns all applied aspects. If no aspect is applied, an empty collection is returned.

Specified by:
getAspects in interface AlfrescoAspects
Returns:
collection of the applied aspects

findAspect

public org.apache.chemistry.opencmis.client.api.ObjectType findAspect(String propertyId)
Description copied from interface: AlfrescoAspects
Returns the aspect type that defines the given property.

Specified by:
findAspect in interface AlfrescoAspects
Parameters:
propertyId - the property id
Returns:
the aspect type if the property id is defined in an applied aspect, null otherwise

addAspect

public org.apache.chemistry.opencmis.client.api.CmisObject addAspect(String... id)
Description copied from interface: AlfrescoAspects
Adds one or more aspects to the object.

Specified by:
addAspect in interface AlfrescoAspects
Parameters:
id - the aspect id or ids
Returns:
the changed object (which may be a new object)

addAspect

public org.apache.chemistry.opencmis.client.api.CmisObject addAspect(org.apache.chemistry.opencmis.client.api.ObjectType... type)
Description copied from interface: AlfrescoAspects
Adds one or more aspects to the object.

Specified by:
addAspect in interface AlfrescoAspects
Parameters:
type - the aspect type or types
Returns:
the changed object (which may be a new object)

addAspect

public org.apache.chemistry.opencmis.client.api.CmisObject addAspect(org.apache.chemistry.opencmis.client.api.ObjectType type,
                                                                     Map<String,?> properties)
Description copied from interface: AlfrescoAspects
Adds an aspect and sets aspect properties.

Specified by:
addAspect in interface AlfrescoAspects
Parameters:
type - the aspect type
properties - the aspect properties
Returns:
the changed object (which may be a new object)

addAspect

public org.apache.chemistry.opencmis.client.api.CmisObject addAspect(org.apache.chemistry.opencmis.client.api.ObjectType[] type,
                                                                     Map<String,?> properties)
Description copied from interface: AlfrescoAspects
Adds aspects and sets aspect properties.

Specified by:
addAspect in interface AlfrescoAspects
Parameters:
type - the aspect types
properties - the aspect properties
Returns:
the changed object (which may be a new object)

addAspect

public org.apache.chemistry.opencmis.client.api.CmisObject addAspect(String id,
                                                                     Map<String,?> properties)
Description copied from interface: AlfrescoAspects
Adds an aspect and sets aspect properties.

Specified by:
addAspect in interface AlfrescoAspects
Parameters:
id - the aspect type
properties - the aspect properties
Returns:
the changed object (which may be a new object)

addAspect

public org.apache.chemistry.opencmis.client.api.CmisObject addAspect(String[] id,
                                                                     Map<String,?> properties)
Description copied from interface: AlfrescoAspects
Adds aspects and sets aspect properties.

Specified by:
addAspect in interface AlfrescoAspects
Parameters:
id - the aspect types
properties - the aspect properties
Returns:
the changed object (which may be a new object)

removeAspect

public org.apache.chemistry.opencmis.client.api.CmisObject removeAspect(String... id)
Description copied from interface: AlfrescoAspects
Removes one or more aspects from the object.

Specified by:
removeAspect in interface AlfrescoAspects
Parameters:
id - the aspect id or ids
Returns:
the changed object (which may be a new object)

removeAspect

public org.apache.chemistry.opencmis.client.api.CmisObject removeAspect(org.apache.chemistry.opencmis.client.api.ObjectType... type)
Description copied from interface: AlfrescoAspects
Removes one or more aspects from the object.

Specified by:
removeAspect in interface AlfrescoAspects
Returns:
the changed object (which may be a new object)


Copyright © 2011–2014 Alfresco. All rights reserved.