public class DocumentImpl extends AbstractFilableCmisObject implements Document
| Constructor and Description |
|---|
DocumentImpl(SessionImpl session,
ObjectType objectType,
ObjectData objectData,
OperationContext context)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected ObjectId |
copyViaClient(ObjectId targetFolderId,
Map<String,?> properties,
VersioningState versioningState,
List<Policy> policies,
List<Ace> addAces,
List<Ace> removeAces)
Copies the document manually.
|
protected TransientCmisObject |
createTransientCmisObject() |
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. |
String |
getCheckinComment()
Returns the checkin comment (CMIS property
cmis:checkinComment). |
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 |
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)
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() |
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). |
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 |
Boolean |
isVersionSeriesCheckedOut()
Returns
true if this version series is checked out (CMIS property
cmis:isVersionSeriesCheckedOut). |
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, getAcl, getAdapter, getAllowableActions, getBaseType, getBaseTypeId, getBinding, getChangeToken, getCreatedBy, getCreationContext, getCreationDate, getExtensions, getId, getLastModificationDate, getLastModifiedBy, getName, getObjectFactory, getObjectId, getObjectType, getPolicies, getProperties, getProperty, getPropertyQueryName, getPropertyValue, getRefreshTimestamp, getRelationships, getRenditions, getRepositoryId, getSession, getTransientObject, getType, initialize, readLock, readUnlock, refresh, refreshIfOld, removeAcl, removePolicy, setAcl, updateProperties, updateProperties, writeLock, writeUnlockclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddToFolder, getParents, getParents, getPaths, move, move, removeFromFolderaddAcl, applyAcl, applyPolicy, delete, delete, getAcl, getAdapter, getAllowableActions, getExtensions, getPolicies, getRefreshTimestamp, getRelationships, getRenditions, getTransientObject, refresh, refreshIfOld, removeAcl, removePolicy, setAcl, updateProperties, updatePropertiesgetBaseType, getBaseTypeId, getChangeToken, getCreatedBy, getCreationDate, getLastModificationDate, getLastModifiedBy, getName, getProperties, getProperty, getPropertyValue, getTypepublic DocumentImpl(SessionImpl session, ObjectType objectType, ObjectData objectData, OperationContext context)
protected TransientCmisObject createTransientCmisObject()
createTransientCmisObject in class AbstractCmisObjectpublic TransientDocument getTransientDocument()
getTransientDocument in interface Documentpublic String getCheckinComment()
DocumentPropertiescmis:checkinComment).getCheckinComment in interface DocumentPropertiespublic String getVersionLabel()
DocumentPropertiescmis:versionLabel).getVersionLabel in interface DocumentPropertiespublic String getVersionSeriesId()
DocumentPropertiescmis:versionSeriesId).getVersionSeriesId in interface DocumentPropertiespublic String getVersionSeriesCheckedOutId()
DocumentPropertiescmis:versionSeriesCheckedOutId).getVersionSeriesCheckedOutId in interface DocumentPropertiespublic String getVersionSeriesCheckedOutBy()
DocumentPropertiescmis:versionSeriesCheckedOutBy).getVersionSeriesCheckedOutBy in interface DocumentPropertiespublic Boolean isImmutable()
DocumentPropertiestrue if this CMIS object is immutable (CMIS property
cmis:isImmutable).isImmutable in interface DocumentPropertiespublic Boolean isLatestMajorVersion()
DocumentPropertiestrue if this CMIS object is the latest major version (CMIS property
cmis:isLatestMajorVersion).isLatestMajorVersion in interface DocumentPropertiespublic Boolean isLatestVersion()
DocumentPropertiescmis:isLatestVersion).isLatestVersion in interface DocumentPropertiespublic Boolean isMajorVersion()
DocumentPropertiestrue if this CMIS object is the latest version (CMIS property
cmis:isMajorVersion).isMajorVersion in interface DocumentPropertiespublic Boolean isVersionSeriesCheckedOut()
DocumentPropertiestrue if this version series is checked out (CMIS property
cmis:isVersionSeriesCheckedOut).isVersionSeriesCheckedOut in interface DocumentPropertiespublic long getContentStreamLength()
DocumentPropertiescmis:contentStreamLength).getContentStreamLength in interface DocumentPropertiespublic String getContentStreamMimeType()
DocumentPropertiesnull if the document
has no content (CMIS property cmis:contentStreamMimeType).getContentStreamMimeType in interface DocumentPropertiespublic String getContentStreamFileName()
DocumentPropertiesnull if the document
has no content (CMIS property cmis:contentStreamFileName).getContentStreamFileName in interface DocumentPropertiespublic String getContentStreamId()
DocumentPropertiesnull if the document has no
content (CMIS property cmis:contentStreamId).getContentStreamId in interface DocumentPropertiespublic Document copy(ObjectId targetFolderId, Map<String,?> properties, VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context)
Documentpublic Document copy(ObjectId targetFolderId)
Documentprotected ObjectId copyViaClient(ObjectId targetFolderId, Map<String,?> properties, VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
public void deleteAllVersions()
DocumentdeleteAllVersions in interface Documentpublic ObjectId checkOut()
Documentpublic void cancelCheckOut()
DocumentcancelCheckOut in interface Documentpublic ObjectId checkIn(boolean major, Map<String,?> properties, ContentStream contentStream, String checkinComment, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
DocumentcontentStream is consumed but not closed by
this method.public List<Document> getAllVersions()
DocumentgetAllVersions in interface Documentpublic List<Document> getAllVersions(OperationContext context)
DocumentOperationContext.getAllVersions in interface Documentpublic Document getObjectOfLatestVersion(boolean major)
DocumentgetObjectOfLatestVersion in interface Documentmajor - if true the latest major version will be
returned, otherwise the very last version will be returnedpublic Document getObjectOfLatestVersion(boolean major, OperationContext context)
DocumentOperationContext.getObjectOfLatestVersion in interface Documentmajor - if true the latest major version will be
returned, otherwise the very last version will be returnedpublic ContentStream getContentStream()
DocumentgetContentStream in interface Documentnullpublic ContentStream getContentStream(BigInteger offset, BigInteger length)
DocumentgetContentStream in interface Documentoffset - 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 streamnullpublic ContentStream getContentStream(String streamId)
DocumentgetContentStream in interface DocumentstreamId - the stream idnullpublic ContentStream getContentStream(String streamId, BigInteger offset, BigInteger length)
DocumentgetContentStream in interface DocumentstreamId - 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 streamnullpublic Document setContentStream(ContentStream contentStream, boolean overwrite)
DocumentcontentStream is consumed but not closed by
this method.setContentStream in interface Documentpublic ObjectId setContentStream(ContentStream contentStream, boolean overwrite, boolean refresh)
DocumentcontentStream is consumed but not closed by
this method.setContentStream in interface Documentpublic Document deleteContentStream()
DocumentdeleteContentStream in interface Documentpublic ObjectId deleteContentStream(boolean refresh)
DocumentdeleteContentStream in interface Documentpublic ObjectId checkIn(boolean major, Map<String,?> properties, ContentStream contentStream, String checkinComment)
DocumentcontentStream is consumed but not closed by
this method.Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.