public interface Document extends FileableCmisObject, DocumentProperties
| Modifier and Type | Method and Description |
|---|---|
Document |
appendContentStream(ContentStream contentStream,
boolean isLastChunk)
Appends a content stream to the content stream of the document and
refreshes this object afterwards.
|
ObjectId |
appendContentStream(ContentStream contentStream,
boolean isLastChunk,
boolean refresh)
Appends a content stream to the content stream of the document.
|
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 and refreshes this
object afterwards.
|
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(BigInteger offset,
BigInteger length)
Retrieves the content stream of this document.
|
ContentStream |
getContentStream(String streamId)
Retrieves the content stream that is associated with the given stream ID.
|
ContentStream |
getContentStream(String streamId,
BigInteger offset,
BigInteger length)
Retrieves the content stream that is associated with the given stream ID.
|
String |
getContentUrl()
Returns the content URL of the document if the binding supports content
URLs.
|
String |
getContentUrl(String streamId)
Returns the content URL of the document or a rendition if the binding
supports content URLs.
|
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. |
Document |
setContentStream(ContentStream contentStream,
boolean overwrite)
Sets a new content stream for the document and refreshes this object
afterwards.
|
ObjectId |
setContentStream(ContentStream contentStream,
boolean overwrite,
boolean refresh)
Sets a new content stream for the document.
|
addToFolder, getParents, getParents, getPaths, move, move, removeFromFolderaddAcl, applyAcl, applyPolicy, delete, delete, getAcl, getAdapter, getAllowableActions, getExtensions, getPermissionsForPrincipal, getPermissonsForPrincipal, getPolicies, getRefreshTimestamp, getRelationships, getRenditions, hasAllowableAction, refresh, refreshIfOld, removeAcl, removePolicy, rename, rename, setAcl, updateProperties, updatePropertiesfindObjectType, getBaseType, getBaseTypeId, getChangeToken, getCreatedBy, getCreationDate, getDescription, getLastModificationDate, getLastModifiedBy, getName, getProperties, getProperty, getPropertyValue, getSecondaryTypes, getTypegetCheckinComment, getContentStreamFileName, getContentStreamHashes, getContentStreamId, getContentStreamLength, getContentStreamMimeType, getVersionLabel, getVersionSeriesCheckedOutBy, getVersionSeriesCheckedOutId, getVersionSeriesId, isImmutable, isLatestMajorVersion, isLatestVersion, isMajorVersion, isPrivateWorkingCopy, isVersionSeriesCheckedOutvoid deleteAllVersions()
ContentStream getContentStream()
null if the document has no
contentContentStream getContentStream(BigInteger offset, BigInteger length)
offset - the offset of the stream or null to read the stream
from the beginninglength - the maximum length of the stream or null to read to
the end of the streamnull if the document has no
contentContentStream getContentStream(String streamId)
streamId - the stream IDnull if no content is associated
with this stream IDContentStream getContentStream(String streamId, BigInteger offset, BigInteger length)
streamId - the stream IDoffset - the offset of the stream or null to read the stream
from the beginninglength - the maximum length of the stream or null to read to
the end of the streamnull if no content is associated
with this stream IDString getContentUrl()
null if the binding
does not support content URLsString getContentUrl(String streamId)
streamId - the ID of the rendition or null for the documentnull if
the binding does not support content URLsDocument setContentStream(ContentStream contentStream, boolean overwrite)
The stream in contentStream is consumed but not closed by this
method.
contentStream - the content streamoverwrite - if this parameter is set to false and the document
already has content, the repository throws a
CmisContentAlreadyExistsExceptionnull if the repository did not
return an object IDObjectFactory.createContentStream(String, long, String,
java.io.InputStream)ObjectId setContentStream(ContentStream contentStream, boolean overwrite, boolean refresh)
The stream in contentStream is consumed but not closed by this
method.
contentStream - the content streamoverwrite - if this parameter is set to false and the document
already has content, the repository throws a
CmisContentAlreadyExistsExceptionrefresh - if this parameter is set to true, this object will be
refreshed after the new content has been setnull if the repository did not
return an object IDObjectFactory.createContentStream(String, long, String,
java.io.InputStream)Document appendContentStream(ContentStream contentStream, boolean isLastChunk)
The stream in contentStream is consumed but not closed by this
method.
contentStream - the content streamisLastChunk - indicates if this stream is the last chunk of the contentnull if the repository did not
return an object IDObjectFactory.createContentStream(String, long, String,
java.io.InputStream)ObjectId appendContentStream(ContentStream contentStream, boolean isLastChunk, boolean refresh)
The stream in contentStream is consumed but not closed by this
method.
contentStream - the content streamisLastChunk - indicates if this stream is the last chunk of the contentrefresh - if this parameter is set to true, this object will be
refreshed after the content stream has been appendednull if the repository did not
return an object IDDocument deleteContentStream()
null if the repository did not
return an object IDObjectId deleteContentStream(boolean refresh)
refresh - if this parameter is set to true, this object will be
refreshed after the content stream has been deletednull if the repository did not
return an object IDObjectId checkOut()
void cancelCheckOut()
ObjectId checkIn(boolean major, Map<String,?> properties, ContentStream contentStream, String checkinComment, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
contentStream is consumed but not closed by this
method.ObjectId checkIn(boolean major, Map<String,?> properties, ContentStream contentStream, String checkinComment)
contentStream is consumed but not closed by this
method.Document getObjectOfLatestVersion(boolean major)
major - if true the latest major version will be returned,
otherwise the very last version will be returnedDocument getObjectOfLatestVersion(boolean major, OperationContext context)
OperationContext.major - if true the latest major version will be returned,
otherwise the very last version will be returnedList<Document> getAllVersions()
The behavior of this method is undefined if the document is not versionable and can be different for each repository.
cmis:creationDate descending and preceded by the PWC, if
one exists, not nullList<Document> getAllVersions(OperationContext context)
OperationContext.
The behavior of this method is undefined if the document is not versionable and can be different for each repository.
cmis:creationDate descending and preceded by the PWC, if
one exists, not nullDocument copy(ObjectId targetFolderId)
targetFolderId - the ID of the target folder, null to create an unfiled
documentDocument copy(ObjectId targetFolderId, Map<String,?> properties, VersioningState versioningState, List<Policy> policies, List<Ace> addACEs, List<Ace> removeACEs, OperationContext context)
targetFolderId - the ID of the target folder, null to create an unfiled
documentnull if the parameter
context was set to nullCopyright © 2009-2015 The Apache Software Foundation. All Rights Reserved.