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.
|
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()
Deprecated.
Support for transient objects will be removed in the future.
|
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, removeFromFolder
addAcl, applyAcl, applyPolicy, delete, delete, getAcl, getAdapter, getAllowableActions, getExtensions, getPolicies, getRefreshTimestamp, getRelationships, getRenditions, getTransientObject, refresh, refreshIfOld, removeAcl, removePolicy, setAcl, updateProperties, updateProperties
findObjectType, getBaseType, getBaseTypeId, getChangeToken, getCreatedBy, getCreationDate, getDescription, getLastModificationDate, getLastModifiedBy, getName, getProperties, getProperty, getPropertyValue, getSecondaryTypes, getType
getCheckinComment, getContentStreamFileName, getContentStreamId, getContentStreamLength, getContentStreamMimeType, getVersionLabel, getVersionSeriesCheckedOutBy, getVersionSeriesCheckedOutId, getVersionSeriesId, isImmutable, isLatestMajorVersion, isLatestVersion, isMajorVersion, isPrivateWorkingCopy, isVersionSeriesCheckedOut
@Deprecated TransientDocument getTransientDocument()
void 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 idDocument 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
CmisContentAlreadyExistsException
null
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
CmisContentAlreadyExistsException
refresh
- 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(OperationContext context)
OperationContext
.Document copy(ObjectId targetFolderId)
Document copy(ObjectId targetFolderId, Map<String,?> properties, VersioningState versioningState, List<Policy> policies, List<Ace> addACEs, List<Ace> removeACEs, OperationContext context)
null
if the parameter
context
was set to null
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.