Package com.emc.d2fs.interfaces

# Interface IDownloadService

All Superinterfaces:
  `ID2fsService`

public interface IDownloadService extends ID2fsService
Document download & upload services.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `COMMAND_READ`
  read
  `static final String`
  `COMMAND_WRITE`
  write

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `canPrintControlledView(Context context, String id, List<Attribute> parameters)`
  Test if there is a controlled viewing allows print
  `String`
  `checkin(Context context, String id, File uploadFile, long fileLength, String contentType, String logEntry, String checkinVersionT, boolean makeCurrent, boolean retainLock, boolean keepSymbolicLabel, boolean keepLogEntry, boolean queueRendition, String location, boolean asynchronous, boolean useBocs, Object contentMover)`
  Called by D2 when uploaded files are check in.
  `String`
  `extractDcoumentProperty(Context context, String id, String configName)`
  Extract document property using O2 plugin, if document format is supported by O2.
  `List<String>`
  `getCheckinUrls(Context context, String objectId, String format, String eventName, int pageNumber, String pageModifier, String configName, String linkId, List<Attribute> parameters)`
  Get checkin urls for specified object id and location -- Note that uploading content to this URL will perform checkin with content as an atomic operation.
  `ServerInfo`
  `getDefaultServerInfo()`
  Get base server information used to down/up load
  `String`
  `getDispatchDownloadUrl(Context context, String id, boolean current, boolean viewNative, List<Attribute> parameters)`
  Get Dispatch download url
  `List<FileDetails>`
  `getDownloadFileDetails(Context context, List<String> ids, List<Attribute> parameters)`
  Get download file details for specified object id
  `List<String>`
  `getDownloadUrls(Context context, String id, List<Attribute> parameters)`
  Get download urls for specified object id
  `List<String>`
  `getExtractUrls(Context context, String objectId, String configName, String objectType, String format, String linkId, List<Attribute> parameters)`
  Get extract urls for specified object id and location
  `Attribute`
  `getFileInfo(Context context, String objectId, String formatName)`
  Get file information for specified object id
  `List<String>`
  `getImportStructureUrls(Context context, String masterId, String folderPath, String structureConfigName, String contentId)`
  Get import structure urls for specified master object id
  `List<DownloadobjectInfo>`
  `getObjectsDownloadUrls(Context context, List<String> ids, List<Attribute> parameters)`
  Get download urls for specified set object ids
  `String`
  `getPageServingUrl(Context context, String id, List<Attribute> parameters)`
  `List<String>`
  `getUploadUrls(Context context, String objectId, String format, String eventName, int pageNumber, String pageModifier, String configName, String linkId)`
  Deprecated.
  `List<String>`
  `getUploadUrls(Context context, String objectId, String format, String eventName, int pageNumber, String pageModifier, String configName, String linkId, List<Attribute> parameters)`
  Get upload urls for specified object id and location
  `boolean`
  `isProtectedInControlledView(Context context, String id, List<Attribute> parameters)`
  Test if the document is encrypted through controlled view
  `void`
  `setBaseUrl(String url)`
  Set server base url used to build the url for `getDownloadUrls` or `getUploadUrls`
  `boolean`
  `setDocumentProperty(Context context, String id, String configName)`
  Set MS office properties using O2 plugin, if document format is supported by O2.

  ### Methods inherited from interface com.emc.d2fs.interfaces.ID2fsService

  `isRemote, setRemote`

- ## Field Details

  - ### COMMAND_READ

    static final String COMMAND_READ
    read
    See Also:
      - Constant Field Values

  - ### COMMAND_WRITE

    static final String COMMAND_WRITE
    write
    See Also:
      - Constant Field Values

- ## Method Details

  - ### setBaseUrl

    void setBaseUrl(String url)
    Set server base url used to build the url for `getDownloadUrls` or `getUploadUrls`
    Parameters:
      `url` - String value of base url
    Since:
      4.0.1

  - ### getDownloadUrls

    List<String> getDownloadUrls(Context context, String id, List<Attribute> parameters) throws Exception
    Get download urls for specified object id
    Parameters:
      `context` - `Context` object containing information about client/session
      `id` - String value of document id
      `parameters` - `Attribute` list of parameters
      It can contain the following attribute names:
      - format : String value of file format
      - pageNumber : Integer value of page number (to get only one specific page)
      - pageModifier : String value of page modifier (key for specific render)
      - event_name : String value of event type name (view, edit or print)
      - contentId : (optional) Id of dmrContent from which to calculate the format
    Returns:
      String list of urls
    Throws:
      `Exception`
    Since:
      4.0.1

  - ### getPageServingUrl

    String getPageServingUrl(Context context, String id, List<Attribute> parameters) throws Exception
    Throws:
      `Exception`

  - ### getObjectsDownloadUrls

    List<DownloadobjectInfo> getObjectsDownloadUrls(Context context, List<String> ids, List<Attribute> parameters) throws Exception
    Get download urls for specified set object ids
    Parameters:
      `context` - `Context` object containing information about client/session
      `ids` - List value of document ids
      `parameters` - `Attribute` list of parameters
      It can contain the following attribute names:
      - format : String value of file format
      - pageNumber : Integer value of page number (to get only one specific page)
      - pageModifier : String value of page modifier (key for specific render)
      - event_name : String value of event type name (view, edit or print)
      - contentId : (optional) Id of dmrContent from which to calculate the format
    Returns:
      String list of urls and objectIds
    Throws:
      `Exception`
    Since:
      4.7

  - ### getDownloadFileDetails

    List<FileDetails> getDownloadFileDetails(Context context, List<String> ids, List<Attribute> parameters) throws Exception
    Get download file details for specified object id
    Parameters:
      `context` - `Context` object containing information about client/session
      `ids` - String value of set of document ids
      `parameters` - `Attribute` list of parameters
      It can contain the following attribute names:
      - format : String value of file format
      - pageNumber : Integer value of page number (to get only one specific page)
      - pageModifier : String value of page modifier (key for specific render)
      - event_name : String value of event type name (view, edit or print)
      - contentId : (optional) Id of dmrContent from which to calculate the format
    Returns:
      String list of FileDetails
    Throws:
      `Exception`
    Since:
      4.2.1

  - ### getUploadUrls

    @Deprecated List<String> getUploadUrls(Context context, String objectId, String format, String eventName, int pageNumber, String pageModifier, String configName, String linkId) throws Exception
    Deprecated.
    Get upload urls for specified object id and location
    Parameters:
      `context` - `Context` object containing information about client/session
      `objectId` - String value of document id
      `format` - String value of file format
      `eventName` - String value of event type name (view, edit or print)
      `pageNumber` - Integer value of page number (to get only one specific page)
      `pageModifier` - String value of page modifier (key for specific render)
      `configName` - String value of configuration name
      `linkId` - String value of location id
    Returns:
      String value of upload url
    Throws:
      `Exception`
    Since:
      4.0.1

  - ### getUploadUrls

    List<String> getUploadUrls(Context context, String objectId, String format, String eventName, int pageNumber, String pageModifier, String configName, String linkId, List<Attribute> parameters) throws Exception
    Get upload urls for specified object id and location
    Parameters:
      `context` - `Context` object containing information about client/session
      `objectId` - String value of document id
      `format` - String value of file format
      `eventName` - String value of event type name (view, edit or print)
      `pageNumber` - Integer value of page number (to get only one specific page)
      `pageModifier` - String value of page modifier (key for specific render)
      `configName` - String value of configuration name
      `linkId` - String value of location id
      `parameters` - `Attribute` list of parameters
      It can contain the following attribute names:
      - content_size : (optional) size of the content in bytes or -1 if unknown. If the size of the content to be uploaded is sufficiently small (less than the value of the minFileSizeForBocs in D2FS.properties), it will be uploaded directly to the appserver instead of going through D2-BOCS
    Returns:
      String value of upload url
    Throws:
      `Exception`
    Since:
      4.2.0

  - ### getCheckinUrls

    List<String> getCheckinUrls(Context context, String objectId, String format, String eventName, int pageNumber, String pageModifier, String configName, String linkId, List<Attribute> parameters) throws Exception
    Get checkin urls for specified object id and location -- Note that uploading content to this URL will perform checkin with content as an atomic operation.
    Parameters:
      `context` - `Context` object containing information about client/session
      `objectId` - String value of document id
      `format` - String value of file format
      `eventName` - String value of event type name (view, edit or print)
      `pageNumber` - Integer value of page number (to get only one specific page)
      `pageModifier` - String value of page modifier (key for specific render)
      `configName` - String value of configuration name
      `linkId` - String value of location id
      `parameters` - `Attribute` list of parameters
      It can contain the following attribute names:
      - content_size : (optional) size of the content in bytes or -1 if unknown. If the size of the content to be uploaded is sufficiently small (less than the value of the minFileSizeForBocs in D2FS.properties), it will be uploaded directly to the appserver instead of going through D2-BOCS
      The following are attributes to be added to the multipart/form post to the Checkin servlet:
      - file_url : file url
      - log_entry : String log entry
      - a_content_type : String content type
      - checkin_version : Integer, Control version checkin. {0=MAJOR_VERSION, 1=MINOR_VERSION, 2==SAME_VERSION, 3=BRANCH_VERSION, -1=VERSION_NOT_SET}
      - make_current : Boolean, true to make this version current
      - retain_lock : Boolean, true to retain the current lock
      - keep_symbolic_label : Boolean, true to keep the symbolic label
      - keep_log_entry : Boolean, true to keep current log entry
      - keep_symbolic_label : Boolean, to keep the symbolic label
      - queue_rendition : Boolean, to queue generation of a new rendition
      - location : String containing the client location identifier
      - asynchronous : Boolean, true for asynchronous
    Returns:
      String value of checkin url
    Throws:
      `Exception`
    Since:
      4.2.0

  - ### getExtractUrls

    List<String> getExtractUrls(Context context, String objectId, String configName, String objectType, String format, String linkId, List<Attribute> parameters) throws Exception
    Get extract urls for specified object id and location
    Parameters:
      `context` - `Context` object containing information about client/session
      `objectId` - String value of document id
      `configName` - String value of configuration name
      `objectType` - type of the object created
      `format` - String value of file format
      `linkId` - String value of location id
      `parameters` - List of `Attribute`s which must include content_size attribute holding size of file to be uploaded
    Returns:
      String value of extract url
    Throws:
      `Exception`
    Since:
      4.2

  - ### getFileInfo

    Attribute getFileInfo(Context context, String objectId, String formatName) throws Exception
    Get file information for specified object id
    Parameters:
      `context` - `Context` object containing information about client/session
      `objectId` - String value of document id
      `formatName` - String value of file format
    Returns:
      `Attribute` object containing file information
    Throws:
      `Exception`
    Since:
      4.0.1

  - ### getDefaultServerInfo

    ServerInfo getDefaultServerInfo() throws Exception
    Get base server information used to down/up load
    Returns:
      `ServerInfo` object containing server information
    Throws:
      `Exception`
    Since:
      4.0.1

  - ### canPrintControlledView

    boolean canPrintControlledView(Context context, String id, List<Attribute> parameters) throws Exception
    Test if there is a controlled viewing allows print
    Parameters:
      `context` - `Context` object containing information about client/session
      `id` - String value of document id
      `parameters` - `Attribute` list of parameters
    Returns:
      true if viewing is controlled
    Throws:
      `Exception`
    Since:
      4.0.1

  - ### isProtectedInControlledView

    boolean isProtectedInControlledView(Context context, String id, List<Attribute> parameters) throws Exception
    Test if the document is encrypted through controlled view
    Parameters:
      `context` - `Context` object containing information about client/session
      `id` - String value of document id
      `parameters` - `Attribute` list of parameters
    Returns:
      true if document is protected
    Throws:
      `Exception`
    Since:
      4.0.1

  - ### getImportStructureUrls

    List<String> getImportStructureUrls(Context context, String masterId, String folderPath, String structureConfigName, String contentId) throws Exception
    Get import structure urls for specified master object id
    Parameters:
      `context` - `Context` object containing information about client/session
      `masterId` - String value of document id
      `folderPath` - Path of the folder on the local machine
      `structureConfigName` - : import structure configuration name
      `contentId` - : id of the folder where the import has been requested, in case of no autolink configured
    Returns:
      String value of import structure urls
    Throws:
      `Exception`
    Since:
      5.0

  - ### getDispatchDownloadUrl

    String getDispatchDownloadUrl(Context context, String id, boolean current, boolean viewNative, List<Attribute> parameters) throws Exception
    Get Dispatch download url
    Parameters:
      `context` - `Context` object containing information about client/session
      `id` - String value of document id
      `current` - Boolean true if a current version is required
      `viewNative` - Boolean true if a native version is required
      `parameters` - `Attribute` list of parameters
    Returns:
      String The DispatchDownload servlet url
    Throws:
      `Exception`
    Since:
      4.2.1

  - ### checkin

    String checkin(Context context, String id, File uploadFile, long fileLength, String contentType, String logEntry, String checkinVersionT, boolean makeCurrent, boolean retainLock, boolean keepSymbolicLabel, boolean keepLogEntry, boolean queueRendition, String location, boolean asynchronous, boolean useBocs, Object contentMover) throws Exception
    Called by D2 when uploaded files are check in.
    Parameters:
      `context` - `Context` object containing information about client/session
      `id` - String value of document id
      `uploadFile` - File being uploaded/checked in
      `fileLength` - Length of the file
      `contentType` - String document content type
      `logEntry` - String checkin log entry
      `checkinVersionT` - String version type as "major", "minor", "branch" or "version" (a DFC IDfCheckinOperation valued)
      `makeCurrent` - Boolean Make new version as current
      `retainLock` - Boolean Keep check out status after check in
      `keepSymbolicLabel` - Boolean Keep label such as "new", "current", "not current" or "vd"
      `keepLogEntry` - Boolean Keep previous check in comment
      `queueRendition` - Boolean Ask for rendition
      `location` - String Location
      `asynchronous` - Boolean Asynchronous
      `useBocs` - Boolean Use BOCS server
      `contentMover` - Object used internally by D2 (for internal use only).
    Returns:
      String containing the document id after checkin.
    Throws:
      `Exception`
    Since:
      4.5.0

  - ### extractDcoumentProperty

    String extractDcoumentProperty(Context context, String id, String configName) throws Exception
    Extract document property using O2 plugin, if document format is supported by O2.
    Parameters:
      `context` -
      `id` - Document Id
      `configName` - O2 config Name
    Returns:
      XML containing document property and it's value.
    Throws:
      `Exception`

  - ### setDocumentProperty

    boolean setDocumentProperty(Context context, String id, String configName) throws Exception
    Set MS office properties using O2 plugin, if document format is supported by O2.
    Parameters:
      `context` -
      `id` - Document Id
      `configName` - O2 config Name
    Returns:
    Throws:
      `Exception`