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

java.lang.Object
  extended by org.apache.chemistry.opencmis.client.runtime.AbstractTransientCmisObject
      extended by org.apache.chemistry.opencmis.client.runtime.AbstractTransientFileableCmisObject
          extended by org.apache.chemistry.opencmis.client.runtime.TransientDocumentImpl
All Implemented Interfaces:
CmisObjectProperties, DocumentProperties, ObjectId, TransientCmisObject, TransientDocument, TransientFileableCmisObject

public class TransientDocumentImpl
extends AbstractTransientFileableCmisObject
implements TransientDocument


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.chemistry.opencmis.client.runtime.AbstractTransientCmisObject
AbstractTransientCmisObject.AceChangeHolder
 
Field Summary
 
Fields inherited from class org.apache.chemistry.opencmis.client.runtime.AbstractTransientCmisObject
acl, addAces, addPolicies, allowableActions, deleteAllVersions, inputExtensions, isMarkedForDelete, isModified, isPropertyUpdateRequired, object, ouputExtensions, policies, properties, relationships, removeAces, removePolicies, renditions, session
 
Constructor Summary
TransientDocumentImpl()
           
 
Method Summary
 ObjectId checkIn(boolean major, String checkinComment)
           
 Document copy(ObjectId targetFolderId)
           
 Document copy(ObjectId targetFolderId, Map<String,?> properties, VersioningState versioningState, List<Policy> policies, List<Ace> addACEs, List<Ace> removeACEs, OperationContext context)
           
 void deleteAllVersions()
           
 void deleteContentStream()
           
 List<Document> getAllVersions()
           
 List<Document> getAllVersions(OperationContext context)
           
 String getCheckinComment()
          Returns the checkin comment (CMIS property cmis:checkinComment).
 ContentStream getContentStream()
           
 ContentStream getContentStream(String streamId)
           
 String getContentStreamFileName()
          Returns the content stream filename or null if the document has no content (CMIS property cmis:contentStreamFileName).
 String getContentStreamId()
          Returns the content stream id or null if the document has no content (CMIS property cmis:contentStreamId).
 long getContentStreamLength()
          Returns the content stream length or -1 if the document has no content (CMIS property cmis:contentStreamLength).
 String getContentStreamMimeType()
          Returns the content stream MIME type or null if the document has no content (CMIS property cmis:contentStreamMimeType).
 Document getObjectOfLatestVersion(boolean major)
           
 Document getObjectOfLatestVersion(boolean major, OperationContext context)
           
 String getVersionLabel()
          Returns the version label (CMIS property cmis:versionLabel).
 String getVersionSeriesCheckedOutBy()
          Returns the user who checked out this version series (CMIS property cmis:versionSeriesCheckedOutBy).
 String getVersionSeriesCheckedOutId()
          Returns the PWC id of this version series (CMIS property cmis:versionSeriesCheckedOutId).
 String getVersionSeriesId()
          Returns the version series id (CMIS property cmis:versionSeriesId).
protected  void initialize(Session session, CmisObject object)
           
 Boolean isImmutable()
          Returns true if this CMIS object is immutable (CMIS property cmis:isImmutable).
 Boolean isLatestMajorVersion()
          Returns true if this CMIS object is the latest major version (CMIS property cmis:isLatestMajorVersion).
 Boolean isLatestVersion()
          Returns if this CMIS object is the latest version (CMIS property cmis:isLatestVersion).
 Boolean isMajorVersion()
          Returns true if this CMIS object is the latest version (CMIS property cmis:isMajorVersion).
 Boolean isVersionSeriesCheckedOut()
          Returns true if this version series is checked out (CMIS property cmis:isVersionSeriesCheckedOut).
 ObjectId save()
           
protected  String saveContent(String objectId, String changeToken)
           
 void setContentStream(ContentStream contentStream, boolean overwrite)
           
 
Methods inherited from class org.apache.chemistry.opencmis.client.runtime.AbstractTransientFileableCmisObject
addToFolder, getParents, getPaths, move, removeFromFolder
 
Methods inherited from class org.apache.chemistry.opencmis.client.runtime.AbstractTransientCmisObject
addAce, applyPolicy, delete, getAllowableActions, getBaseType, getBaseTypeId, getBinding, getChangeToken, getCmisObject, getCreatedBy, getCreationDate, getId, getInputExtensions, getLastModificationDate, getLastModifiedBy, getLatestChangeToken, getName, getObjectFactory, getObjectId, getOriginalAcl, getOutputExtensions, getPolicies, getProperties, getProperty, getPropertyValue, getRelationships, getRenditions, getRepositoryId, getSession, getType, isMarkedForDelete, isModified, prepareAcl, prepareProperties, refreshAndReset, removeAce, removePolicy, reset, saveACL, saveDelete, savePolicies, saveProperties, setName, setOutputExtensions, setPropertyValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.TransientFileableCmisObject
addToFolder, getParents, getPaths, move, removeFromFolder
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.TransientCmisObject
addAce, applyPolicy, delete, getAllowableActions, getCmisObject, getInputExtensions, getOriginalAcl, getOutputExtensions, getPolicies, getRelationships, getRenditions, isMarkedForDelete, isModified, refreshAndReset, removeAce, removePolicy, reset, setName, setOutputExtensions, setPropertyValue
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.ObjectId
getId
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.CmisObjectProperties
getBaseType, getBaseTypeId, getChangeToken, getCreatedBy, getCreationDate, getLastModificationDate, getLastModifiedBy, getName, getProperties, getProperty, getPropertyValue, getType
 

Constructor Detail

TransientDocumentImpl

public TransientDocumentImpl()
Method Detail

initialize

protected void initialize(Session session,
                          CmisObject object)
Overrides:
initialize in class AbstractTransientCmisObject

deleteAllVersions

public void deleteAllVersions()
Specified by:
deleteAllVersions in interface TransientDocument

getContentStream

public ContentStream getContentStream()
Specified by:
getContentStream in interface TransientDocument

getContentStream

public ContentStream getContentStream(String streamId)
Specified by:
getContentStream in interface TransientDocument

setContentStream

public void setContentStream(ContentStream contentStream,
                             boolean overwrite)
Specified by:
setContentStream in interface TransientDocument

deleteContentStream

public void deleteContentStream()
Specified by:
deleteContentStream in interface TransientDocument

getObjectOfLatestVersion

public Document getObjectOfLatestVersion(boolean major)
Specified by:
getObjectOfLatestVersion in interface TransientDocument

getObjectOfLatestVersion

public Document getObjectOfLatestVersion(boolean major,
                                         OperationContext context)
Specified by:
getObjectOfLatestVersion in interface TransientDocument

getAllVersions

public List<Document> getAllVersions()
Specified by:
getAllVersions in interface TransientDocument

getAllVersions

public List<Document> getAllVersions(OperationContext context)
Specified by:
getAllVersions in interface TransientDocument

copy

public Document copy(ObjectId targetFolderId)
Specified by:
copy in interface TransientDocument

copy

public Document copy(ObjectId targetFolderId,
                     Map<String,?> properties,
                     VersioningState versioningState,
                     List<Policy> policies,
                     List<Ace> addACEs,
                     List<Ace> removeACEs,
                     OperationContext context)
Specified by:
copy in interface TransientDocument

getCheckinComment

public String getCheckinComment()
Description copied from interface: DocumentProperties
Returns the checkin comment (CMIS property cmis:checkinComment).

Specified by:
getCheckinComment in interface DocumentProperties

getVersionLabel

public String getVersionLabel()
Description copied from interface: DocumentProperties
Returns the version label (CMIS property cmis:versionLabel).

Specified by:
getVersionLabel in interface DocumentProperties

getVersionSeriesId

public String getVersionSeriesId()
Description copied from interface: DocumentProperties
Returns the version series id (CMIS property cmis:versionSeriesId).

Specified by:
getVersionSeriesId in interface DocumentProperties

getVersionSeriesCheckedOutId

public String getVersionSeriesCheckedOutId()
Description copied from interface: DocumentProperties
Returns the PWC id of this version series (CMIS property cmis:versionSeriesCheckedOutId).

Specified by:
getVersionSeriesCheckedOutId in interface DocumentProperties

getVersionSeriesCheckedOutBy

public String getVersionSeriesCheckedOutBy()
Description copied from interface: DocumentProperties
Returns the user who checked out this version series (CMIS property cmis:versionSeriesCheckedOutBy).

Specified by:
getVersionSeriesCheckedOutBy in interface DocumentProperties

isImmutable

public Boolean isImmutable()
Description copied from interface: DocumentProperties
Returns true if this CMIS object is immutable (CMIS property cmis:isImmutable).

Specified by:
isImmutable in interface DocumentProperties

isLatestMajorVersion

public Boolean isLatestMajorVersion()
Description copied from interface: DocumentProperties
Returns true if this CMIS object is the latest major version (CMIS property cmis:isLatestMajorVersion).

Specified by:
isLatestMajorVersion in interface DocumentProperties

isLatestVersion

public Boolean isLatestVersion()
Description copied from interface: DocumentProperties
Returns if this CMIS object is the latest version (CMIS property cmis:isLatestVersion).

Specified by:
isLatestVersion in interface DocumentProperties

isMajorVersion

public Boolean isMajorVersion()
Description copied from interface: DocumentProperties
Returns true if this CMIS object is the latest version (CMIS property cmis:isMajorVersion).

Specified by:
isMajorVersion in interface DocumentProperties

isVersionSeriesCheckedOut

public Boolean isVersionSeriesCheckedOut()
Description copied from interface: DocumentProperties
Returns true if this version series is checked out (CMIS property cmis:isVersionSeriesCheckedOut).

Specified by:
isVersionSeriesCheckedOut in interface DocumentProperties

getContentStreamLength

public long getContentStreamLength()
Description copied from interface: DocumentProperties
Returns the content stream length or -1 if the document has no content (CMIS property cmis:contentStreamLength).

Specified by:
getContentStreamLength in interface DocumentProperties

getContentStreamMimeType

public String getContentStreamMimeType()
Description copied from interface: DocumentProperties
Returns the content stream MIME type or null if the document has no content (CMIS property cmis:contentStreamMimeType).

Specified by:
getContentStreamMimeType in interface DocumentProperties

getContentStreamFileName

public String getContentStreamFileName()
Description copied from interface: DocumentProperties
Returns the content stream filename or null if the document has no content (CMIS property cmis:contentStreamFileName).

Specified by:
getContentStreamFileName in interface DocumentProperties

getContentStreamId

public String getContentStreamId()
Description copied from interface: DocumentProperties
Returns the content stream id or null if the document has no content (CMIS property cmis:contentStreamId).

Specified by:
getContentStreamId in interface DocumentProperties

save

public ObjectId save()
Specified by:
save in interface TransientCmisObject
Overrides:
save in class AbstractTransientCmisObject

saveContent

protected String saveContent(String objectId,
                             String changeToken)

checkIn

public ObjectId checkIn(boolean major,
                        String checkinComment)
Specified by:
checkIn in interface TransientDocument


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