|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.chemistry.opencmis.client.runtime.AbstractCmisObject
org.apache.chemistry.opencmis.client.runtime.AbstractFilableCmisObject
org.apache.chemistry.opencmis.client.runtime.DocumentImpl
public class DocumentImpl
Constructor Summary | |
---|---|
DocumentImpl(SessionImpl session,
ObjectType objectType,
ObjectData objectData,
OperationContext context)
Constructor. |
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. |
protected TransientCmisObject |
createTransientCmisObject()
|
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 . |
String |
getCheckinComment()
Returns the checkin comment (CMIS property cmis:checkinComment ). |
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()
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. |
ObjectId |
setContentStream(ContentStream contentStream,
boolean overwrite,
boolean refresh)
Sets a new content stream for the document. |
Methods inherited from class org.apache.chemistry.opencmis.client.runtime.AbstractFilableCmisObject |
---|
addToFolder, getParents, getPaths, move, removeFromFolder |
Methods inherited from class org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject |
---|
addAcl, applyAcl, applyPolicy, 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, updateProperties, updateProperties, writeLock, writeUnlock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 |
Constructor Detail |
---|
public DocumentImpl(SessionImpl session, ObjectType objectType, ObjectData objectData, OperationContext context)
Method Detail |
---|
protected TransientCmisObject createTransientCmisObject()
createTransientCmisObject
in class AbstractCmisObject
public TransientDocument getTransientDocument()
getTransientDocument
in interface Document
public String getCheckinComment()
DocumentProperties
cmis:checkinComment
).
getCheckinComment
in interface DocumentProperties
public String getVersionLabel()
DocumentProperties
cmis:versionLabel
).
getVersionLabel
in interface DocumentProperties
public String getVersionSeriesId()
DocumentProperties
cmis:versionSeriesId
).
getVersionSeriesId
in interface DocumentProperties
public String getVersionSeriesCheckedOutId()
DocumentProperties
cmis:versionSeriesCheckedOutId
).
getVersionSeriesCheckedOutId
in interface DocumentProperties
public String getVersionSeriesCheckedOutBy()
DocumentProperties
cmis:versionSeriesCheckedOutBy
).
getVersionSeriesCheckedOutBy
in interface DocumentProperties
public Boolean isImmutable()
DocumentProperties
true
if this CMIS object is immutable (CMIS property
cmis:isImmutable
).
isImmutable
in interface DocumentProperties
public Boolean isLatestMajorVersion()
DocumentProperties
true
if this CMIS object is the latest major version (CMIS property
cmis:isLatestMajorVersion
).
isLatestMajorVersion
in interface DocumentProperties
public Boolean isLatestVersion()
DocumentProperties
cmis:isLatestVersion
).
isLatestVersion
in interface DocumentProperties
public Boolean isMajorVersion()
DocumentProperties
true if this CMIS object is the latest version (CMIS property
cmis:isMajorVersion
).
- Specified by:
isMajorVersion
in interface DocumentProperties
public Boolean isVersionSeriesCheckedOut()
DocumentProperties
true
if this version series is checked out (CMIS property
cmis:isVersionSeriesCheckedOut
).
isVersionSeriesCheckedOut
in interface DocumentProperties
public long getContentStreamLength()
DocumentProperties
cmis:contentStreamLength
).
getContentStreamLength
in interface DocumentProperties
public String getContentStreamMimeType()
DocumentProperties
null
if the document
has no content (CMIS property cmis:contentStreamMimeType
).
getContentStreamMimeType
in interface DocumentProperties
public String getContentStreamFileName()
DocumentProperties
null
if the document
has no content (CMIS property cmis:contentStreamFileName
).
getContentStreamFileName
in interface DocumentProperties
public String getContentStreamId()
DocumentProperties
null
if the document has no
content (CMIS property cmis:contentStreamId
).
getContentStreamId
in interface DocumentProperties
public Document copy(ObjectId targetFolderId, Map<String,?> properties, VersioningState versioningState, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces, OperationContext context)
Document
copy
in interface Document
null
if the parameter
context
was set to null
public Document copy(ObjectId targetFolderId)
Document
copy
in interface Document
public void deleteAllVersions()
Document
deleteAllVersions
in interface Document
public ObjectId checkOut()
Document
checkOut
in interface Document
public void cancelCheckOut()
Document
cancelCheckOut
in interface Document
public ObjectId checkIn(boolean major, Map<String,?> properties, ContentStream contentStream, String checkinComment, List<Policy> policies, List<Ace> addAces, List<Ace> removeAces)
Document
checkIn
in interface Document
public List<Document> getAllVersions()
Document
getAllVersions
in interface Document
public List<Document> getAllVersions(OperationContext context)
Document
OperationContext
.
getAllVersions
in interface Document
public Document getObjectOfLatestVersion(boolean major)
Document
getObjectOfLatestVersion
in interface Document
major
- if true
the latest major version will be
returned, otherwise the very last version will be returned
public Document getObjectOfLatestVersion(boolean major, OperationContext context)
Document
OperationContext
.
getObjectOfLatestVersion
in interface Document
major
- if true
the latest major version will be
returned, otherwise the very last version will be returned
public ContentStream getContentStream()
Document
getContentStream
in interface Document
null
public ContentStream getContentStream(String streamId)
Document
getContentStream
in interface Document
null
public Document setContentStream(ContentStream contentStream, boolean overwrite)
Document
setContentStream
in interface Document
public ObjectId setContentStream(ContentStream contentStream, boolean overwrite, boolean refresh)
Document
setContentStream
in interface Document
public Document deleteContentStream()
Document
deleteContentStream
in interface Document
public ObjectId deleteContentStream(boolean refresh)
Document
deleteContentStream
in interface Document
public ObjectId checkIn(boolean major, Map<String,?> properties, ContentStream contentStream, String checkinComment)
Document
checkIn
in interface Document
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |