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

All Superinterfaces:
CmisObject, CmisObjectProperties, DocumentProperties, FileableCmisObject, ObjectId

public interface Document
extends FileableCmisObject, DocumentProperties

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)
          If this is a PWC (private working copy) it performs a check in.
 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(ObjectId targetFolderId)
          Creates a copy of this document, including content.
 Document copy(ObjectId targetFolderId, Map<String,?> properties, VersioningState versioningState, List<Policy> policies, List<Ace> addACEs, List<Ace> removeACEs, OperationContext context)
          Creates a copy of this document, including content.
 void deleteAllVersions()
          Deletes this document and all its versions.
 Document deleteContentStream()
          Removes the current content stream from the document.
 ObjectId deleteContentStream(boolean refresh)
          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.
 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.
 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.
 TransientDocument getTransientDocument()
           
 Document setContentStream(ContentStream contentStream, boolean overwrite)
          Sets a new content stream for the document.
 ObjectId setContentStream(ContentStream contentStream, boolean overwrite, boolean refresh)
          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, getAdapter, getAllowableActions, getExtensions, getPolicies, getRefreshTimestamp, getRelationships, getRenditions, getTransientObject, refresh, refreshIfOld, removeAcl, removePolicy, updateProperties, updateProperties
 
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
 
Methods inherited from interface org.apache.chemistry.opencmis.client.api.DocumentProperties
getCheckinComment, getContentStreamFileName, getContentStreamId, getContentStreamLength, getContentStreamMimeType, getVersionLabel, getVersionSeriesCheckedOutBy, getVersionSeriesCheckedOutId, getVersionSeriesId, isImmutable, isLatestMajorVersion, isLatestVersion, isMajorVersion, isVersionSeriesCheckedOut
 

Method Detail

getTransientDocument

TransientDocument getTransientDocument()

deleteAllVersions

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


getContentStream

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

Returns:
the content stream, or null

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.

Returns:
the content stream, or null

setContentStream

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


setContentStream

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


deleteContentStream

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


deleteContentStream

ObjectId deleteContentStream(boolean refresh)
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

checkIn

ObjectId checkIn(boolean major,
                 Map<String,?> properties,
                 ContentStream contentStream,
                 String checkinComment)
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.


copy

Document copy(ObjectId targetFolderId)
Creates a copy of this document, including content.

Returns:
the new document object

copy

Document copy(ObjectId targetFolderId,
              Map<String,?> properties,
              VersioningState versioningState,
              List<Policy> policies,
              List<Ace> addACEs,
              List<Ace> removeACEs,
              OperationContext context)
Creates a copy of this document, including content.

Returns:
the new document object or null if the parameter context was set to null


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