Interface ContentManager


public interface ContentManager
The content manager to manage the content stream on the sysobject.
  • 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
      Create a primary content on the existing document with version policy
      Parameters:
      objectId - The source document object to create content
      contentStream - The input stream of the content
      mimeType - The MIME type of the content
      overwrite - 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 increment
      symbolicLabels - 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 type
      pageNumber - 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 content
      contentStream - The input stream of the content
      contentSize - The size of the content. Set to 0 if the size can not be obtained.
      mimeType - The MIME type of the content
      overwrite - 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 increment
      symbolicLabels - 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 type
      charset - The charset/encoding of the content
      pageNumber - 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 content
      contentStream - The input stream of the content
      mimeType - The MIME type of the content
      overwrite - 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 type
      pageNumber - 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 content
      contentStream - The input stream of the content
      mimeType - The MIME type of the content
      overwrite - 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 type
      charset - The charset/encoding of the content
      pageNumber - 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 content
      size - the size of the content
      page - the page number of the content
      format - the content format
      modifier - 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 object
      format - Specifies the file format of the content. This value overwrites the MIME type
      pageNumber - 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' ids
      allPages - specify whether to include all page contents of a object, false to only get the first page contents
      format - 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.DfException
      Get 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 id
      contentsMap - a hash map to store each content object
      format - specify the content format to get with
      vdOption - specify the option for a virtual document
      Returns:
      the target object name
      Throws:
      com.documentum.fc.common.DfException - the exception during the operation