org.apache.chemistry.opencmis.client.api
Interface Document

All Superinterfaces:
CmisObject, FileableCmisObject, ObjectId

public interface Document
extends FileableCmisObject

CMIS Document. Domain Model 2.4


Method Summary
 void cancelCheckOut()
          If this is a PWC (private working copy) the check out will be reversed.
 ObjectId checkIn(boolean major, Map<String,?> properties, ContentStream contentStream, String checkinComment, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
          If this is a PWC (private working copy) it performs a check in.
 ObjectId checkOut()
          Checks out the document and returns the object id of the PWC (private working copy).
 Document copy(List<Property<?>> properties, VersioningState versioningState, List<Policy> policies, List<Ace> addACEs, List<Ace> removeACEs)
          Creates a (content) copy of this document.
 void deleteAllVersions()
          Deletes this document and all its versions.
 ObjectId deleteContentStream()
          Removes the current content stream from the document.
 List<Document> getAllVersions()
          Fetches all versions of this document.
 List<Document> getAllVersions(OperationContext context)
          Fetches all versions of this document using the given OperationContext.
 String getCheckinComment()
           
 ContentStream getContentStream()
          Retrieves the content stream of this document.
 ContentStream getContentStream(String streamId)
          Retrieves the content stream that is associated with the given stream id.
 String getContentStreamFileName()
           
 String getContentStreamId()
           
 long getContentStreamLength()
           
 String getContentStreamMimeType()
           
 Document getObjectOfLatestVersion(boolean major)
          Fetches the latest major or minor version of this document.
 Document getObjectOfLatestVersion(boolean major, OperationContext context)
          Fetches the latest major or minor version of this document using the given OperationContext.
 String getVersionLabel()
           
 String getVersionSeriesCheckedOutBy()
           
 String getVersionSeriesCheckedOutId()
           
 String getVersionSeriesId()
           
 Boolean isImmutable()
           
 Boolean isLatestMajorVersion()
           
 Boolean isLatestVersion()
           
 Boolean isMajorVersion()
           
 Boolean isVersionSeriesCheckedOut()
           
 ObjectId setContentStream(ContentStream contentStream, boolean overwrite)
          Sets a new content stream for the document.
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.FileableCmisObject
addToFolder, getParents, getPaths, move, removeFromFolder
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.CmisObject
addAcl, applyAcl, applyPolicy, delete, getAcl, getAcl, getAllowableActions, getBaseType, getBaseTypeId, getChangeToken, getCreatedBy, getCreationDate, getExtensions, getLastModificationDate, getLastModifiedBy, getName, getPolicies, getProperties, getProperty, getPropertyMultivalue, getPropertyValue, getRefreshTimestamp, getRelationships, getRelationships, getRenditions, getType, isChanged, refresh, refreshIfOld, removeAcl, removePolicy, setName, setProperty, setPropertyMultivalue, updateProperties, updateProperties
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.ObjectId
getId
 

Method Detail

deleteAllVersions

void deleteAllVersions()
Deletes this document and all its versions.


getContentStream

ContentStream getContentStream()
Retrieves the content stream of this document.


getContentStream

ContentStream getContentStream(String streamId)
Retrieves the content stream that is associated with the given stream id. This is usually a rendition of the document.


setContentStream

ObjectId setContentStream(ContentStream contentStream,
                          boolean overwrite)
Sets a new content stream for the document.


deleteContentStream

ObjectId deleteContentStream()
Removes the current content stream from the document.


checkOut

ObjectId checkOut()
Checks out the document and returns the object id of the PWC (private working copy).

Returns:
PWC id

cancelCheckOut

void cancelCheckOut()
If this is a PWC (private working copy) the check out will be reversed. If this is not a PWC it an exception will be thrown.


checkIn

ObjectId checkIn(boolean major,
                 Map<String,?> properties,
                 ContentStream contentStream,
                 String checkinComment,
                 List<Policy> policies,
                 List<Ace> addAces,
                 List<Ace> removeAces)
If this is a PWC (private working copy) it performs a check in. If this is not a PWC it an exception will be thrown.

Returns:
new document id

getObjectOfLatestVersion

Document getObjectOfLatestVersion(boolean major)
Fetches the latest major or minor version of this document.

Parameters:
major - if true the latest major version will be returned, otherwise the very last version will be returned
Returns:
the latest document object

getObjectOfLatestVersion

Document getObjectOfLatestVersion(boolean major,
                                  OperationContext context)
Fetches the latest major or minor version of this document using the given OperationContext.

Parameters:
major - if true the latest major version will be returned, otherwise the very last version will be returned
Returns:
the latest document object

getAllVersions

List<Document> getAllVersions()
Fetches all versions of this document.


getAllVersions

List<Document> getAllVersions(OperationContext context)
Fetches all versions of this document using the given OperationContext.


isImmutable

Boolean isImmutable()

isLatestVersion

Boolean isLatestVersion()

isMajorVersion

Boolean isMajorVersion()

isLatestMajorVersion

Boolean isLatestMajorVersion()

getVersionLabel

String getVersionLabel()

getVersionSeriesId

String getVersionSeriesId()

isVersionSeriesCheckedOut

Boolean isVersionSeriesCheckedOut()

getVersionSeriesCheckedOutBy

String getVersionSeriesCheckedOutBy()

getVersionSeriesCheckedOutId

String getVersionSeriesCheckedOutId()

getCheckinComment

String getCheckinComment()

getContentStreamLength

long getContentStreamLength()

getContentStreamMimeType

String getContentStreamMimeType()

getContentStreamFileName

String getContentStreamFileName()

getContentStreamId

String getContentStreamId()

copy

Document copy(List<Property<?>> properties,
              VersioningState versioningState,
              List<Policy> policies,
              List<Ace> addACEs,
              List<Ace> removeACEs)
Creates a (content) copy of this document.



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