Package com.emc.documentum.rest.dfc
Interface ContentManager
public interface ContentManager
The content manager to manage the content stream on the sysobject.
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.core.io.Resource
getContent
(String id, long size, int page, String format, String modifier) Get primary content and write them back to output streamgetMultiObjectContents
(Set<String> objectIds, boolean allPages, String format) Get multiple objects' contentsgetSingleObjectContents
(String objectId, Map<String, org.springframework.core.io.Resource> contentsMap, String format, com.emc.documentum.rest.dfc.util.VirtualDocumentOptions vdOption) Get a single object's contents.void
removeContent
(String objectId, String format, int pageNumber, String pageModifier) Remove a content associated with a document objectsetPrimaryContent
(String objectId, InputStream contentStream, long contentSize, String mimeType, String format, String charset, int pageNumber, boolean overwrite, CheckinPolicy policy, String symbolicLabels) Create a primary content on the existing document with version policysetPrimaryContent
(String objectId, InputStream contentStream, String mimeType, String format, int pageNumber, boolean overwrite, CheckinPolicy policy, String symbolicLabels) Deprecated.setRendition
(String objectId, InputStream contentStream, String mimeType, String format, int pageNumber, String pageModifier, boolean overwrite) setRendition
(String objectId, InputStream contentStream, String mimeType, String format, String charset, int pageNumber, String pageModifier, boolean overwrite) Create a rendition on the existing document
-
Method Details
-
setPrimaryContent
@Deprecated ContentMetaData setPrimaryContent(String objectId, InputStream contentStream, String mimeType, String format, int pageNumber, boolean overwrite, CheckinPolicy policy, String symbolicLabels) throws com.documentum.fc.common.DfException Deprecated.Create a primary content on the existing document with version policy- Parameters:
objectId
- The source document object to create contentcontentStream
- The input stream of the contentmimeType
- The MIME type of the contentoverwrite
- TRUE indicate to overwrite the existing primary content; FALSE indicates to throw exception when there is an existing primary content. This parameter is effective only when importVersionPolicy is same.policy
- Version policy on the document for the content creation 0: a new document object is created with major version increment (default) 1: a new document object is created with minor version increment 2: on the same version 3: a new document object is created with branch version incrementsymbolicLabels
- The symbolic version labels that will be applied to the document. These labels should NOT include any implicit version labels (for example, 1.0).format
- Specifies the file format of the content. This value overwrites the MIME typepageNumber
- Identifies the position of the content when the object has multiple contents; otherwise, use 0.- Returns:
- Return the new content object of the document
- Throws:
com.documentum.fc.common.DfException
- the exception during the operation
-
setPrimaryContent
ContentMetaData setPrimaryContent(String objectId, InputStream contentStream, long contentSize, String mimeType, String format, String charset, int pageNumber, boolean overwrite, CheckinPolicy policy, String symbolicLabels) throws com.documentum.fc.common.DfException Create a primary content on the existing document with version policy- Parameters:
objectId
- The source document object to create contentcontentStream
- The input stream of the contentcontentSize
- The size of the content. Set to 0 if the size can not be obtained.mimeType
- The MIME type of the contentoverwrite
- TRUE indicate to overwrite the existing primary content; FALSE indicates to throw exception when there is an existing primary content. This parameter is effective only when importVersionPolicy is same.policy
- Version policy on the document for the content creation 0: a new document object is created with major version increment (default) 1: a new document object is created with minor version increment 2: on the same version 3: a new document object is created with branch version incrementsymbolicLabels
- The symbolic version labels that will be applied to the document. These labels should NOT include any implicit version labels (for example, 1.0).format
- Specifies the file format of the content. This value overwrites the MIME typecharset
- The charset/encoding of the contentpageNumber
- Identifies the position of the content when the object has multiple contents; otherwise, use 0.- Returns:
- Return the new content object of the document
- Throws:
com.documentum.fc.common.DfException
- the exception during the operation
-
setRendition
@Deprecated ContentMetaData setRendition(String objectId, InputStream contentStream, String mimeType, String format, int pageNumber, String pageModifier, boolean overwrite) throws com.documentum.fc.common.DfException Create a rendition on the existing document- Parameters:
objectId
- The source document object to create contentcontentStream
- The input stream of the contentmimeType
- The MIME type of the contentoverwrite
- TRUE indicate to overwrite the existing primary content; FALSE indicates to throw exception when there is an existing primary content. This parameter is effective only when importVersionPolicy is same.format
- Specifies the file format of the content. This value overwrites the MIME typepageNumber
- Identifies the position of the content when the object has multiple contents; otherwise, use 0.pageModifier
- Specifies the page modifier for the rendition- Returns:
- Return the new content object of the document
- Throws:
com.documentum.fc.common.DfException
- the exception during the operation
-
setRendition
ContentMetaData setRendition(String objectId, InputStream contentStream, String mimeType, String format, String charset, int pageNumber, String pageModifier, boolean overwrite) throws com.documentum.fc.common.DfException Create a rendition on the existing document- Parameters:
objectId
- The source document object to create contentcontentStream
- The input stream of the contentmimeType
- The MIME type of the contentoverwrite
- TRUE indicate to overwrite the existing primary content; FALSE indicates to throw exception when there is an existing primary content. This parameter is effective only when importVersionPolicy is same.format
- Specifies the file format of the content. This value overwrites the MIME typecharset
- The charset/encoding of the contentpageNumber
- Identifies the position of the content when the object has multiple contents; otherwise, use 0.pageModifier
- Specifies the page modifier for the rendition- Returns:
- Return the new content object of the document
- Throws:
com.documentum.fc.common.DfException
- the exception during the operation
-
getContent
org.springframework.core.io.Resource getContent(String id, long size, int page, String format, String modifier) throws com.documentum.fc.common.DfException Get primary content and write them back to output stream- Parameters:
id
- the object id from which to get primary contentsize
- the size of the contentpage
- the page number of the contentformat
- the content formatmodifier
- page modifier- Returns:
- Resource related to content
- Throws:
com.documentum.fc.common.DfException
- the exception during the operation
-
removeContent
void removeContent(String objectId, String format, int pageNumber, String pageModifier) throws com.documentum.fc.common.DfException Remove a content associated with a document object- Parameters:
objectId
- Object ID of the document objectformat
- Specifies the file format of the content. This value overwrites the MIME typepageNumber
- Identifies the position of the content when the object has multiple contents; otherwise, use 0.pageModifier
- Specifies the page modifier for the rendition- Throws:
com.documentum.fc.common.DfException
- the exception during the operation
-
getMultiObjectContents
Map<String,org.springframework.core.io.Resource> getMultiObjectContents(Set<String> objectIds, boolean allPages, String format) throws com.documentum.fc.common.DfException Get multiple objects' contents- Parameters:
objectIds
- the target objects' idsallPages
- specify whether to include all page contents of a object, false to only get the first page contentsformat
- specify the content format to get with- Returns:
- the contents map of the input ids
- Throws:
com.documentum.fc.common.DfException
- the exception during the operation
-
getSingleObjectContents
String getSingleObjectContents(String objectId, Map<String, org.springframework.core.io.Resource> contentsMap, String format, com.emc.documentum.rest.dfc.util.VirtualDocumentOptions vdOption) throws com.documentum.fc.common.DfExceptionGet a single object's contents. If the object is a folder, then get all objects' contents that under this folder directly, if the object is a virtual document, whether to get its children objects' contents is defined by VirtualDocumentOptions- Parameters:
objectId
- the target object idcontentsMap
- a hash map to store each content objectformat
- specify the content format to get withvdOption
- specify the option for a virtual document- Returns:
- the target object name
- Throws:
com.documentum.fc.common.DfException
- the exception during the operation
-
setPrimaryContent(String, InputStream, long, String, String, String, int, boolean, CheckinPolicy, String)