Class InfoArchiveRestClient

java.lang.Object
com.opentext.ia.sdk.client.impl.InfoArchiveRestClient
All Implemented Interfaces:
ArchiveClient, InfoArchiveLinkRelations, StandardLinkRelations

public class InfoArchiveRestClient extends Object implements ArchiveClient, InfoArchiveLinkRelations
Implementation of ArchiveClient that uses the REST API of a running InfoArchive server.
  • Constructor Details

  • Method Details

    • ingest

      public String ingest(InputStream sip) throws IOException
      Description copied from interface: ArchiveClient
      Ingest a Submission Information Package (SIP) into the Archive.
      Specified by:
      ingest in interface ArchiveClient
      Parameters:
      sip - The SIP to add to the Archive
      Returns:
      The ID of the Archival Information Package (AIP) that was generated from the SIP
      Throws:
      IOException - When an I/O error occurs
    • ingestDirect

      public String ingestDirect(InputStream sip) throws IOException
      Description copied from interface: ArchiveClient
      Ingest a Submission Information Package (SIP) into the Archive. Will take advantage of the ingestDirect resource if present, otherwise will revert to receive + ingest. Note: only works if synchronous commit is enabled on the holding and the SIP being ingested is NOT part of a multi-SIP DSS.
      Specified by:
      ingestDirect in interface ArchiveClient
      Parameters:
      sip - The SIP to add to the Archive
      Returns:
      The ID of the Archival Information Package (AIP) that was generated from the SIP
      Throws:
      IOException - When an I/O error occurs
    • fetchContent

      @Deprecated public ContentResult fetchContent(String contentId) throws IOException
      Deprecated.
      Will be removed without replacement in a future version
      Fetch the content for the specified content id.
      Specified by:
      fetchContent in interface ArchiveClient
      Parameters:
      contentId - The id of the content to fetch.
      Returns:
      A ContentResult
      Throws:
      IOException - When an I/O error occurs
    • fetchOrderContent

      @Deprecated public ContentResult fetchOrderContent(OrderItem orderItem) throws IOException
      Deprecated.
      Will be removed without replacement in a future version
      Fetch the content for the specified order item.
      Specified by:
      fetchOrderContent in interface ArchiveClient
      Parameters:
      orderItem - The order item.
      Returns:
      A ContentResult
      Throws:
      IOException - When an I/O error occurs
    • search

      public SearchResults search(SearchQuery searchQuery, SearchComposition searchComposition) throws IOException
      Description copied from interface: ArchiveClient
      Get the search results for the specified search query and composition.
      Specified by:
      search in interface ArchiveClient
      Parameters:
      searchQuery - The search query.
      searchComposition - The search composition.
      Returns:
      A SearchResults
      Throws:
      IOException - When an I/O error occurs
    • export

      public OrderItem export(SearchResults searchResults, ExportConfiguration exportConfiguration, String outputName) throws IOException
      Description copied from interface: ArchiveClient
      Start the export of the search results for the specified export configuration.
      Specified by:
      export in interface ArchiveClient
      Parameters:
      searchResults - The search results.
      exportConfiguration - The export configuration.
      outputName - The output name of result package.
      Returns:
      An OrderItem object that contains information about exported package without link to download it
      Throws:
      IOException - When an I/O error occurs
    • exportAndWaitForDownloadLink

      public OrderItem exportAndWaitForDownloadLink(SearchResults searchResults, ExportConfiguration exportConfiguration, String outputName, TimeUnit timeUnit, long timeOut) throws IOException
      Description copied from interface: ArchiveClient
      Start and wait the export of the search results for the specified export configuration.
      Specified by:
      exportAndWaitForDownloadLink in interface ArchiveClient
      Parameters:
      searchResults - The search results.
      exportConfiguration - The export configuration.
      outputName - The output name of result package.
      timeUnit - The unit of the timeOut value
      timeOut - The time out of export process
      Returns:
      An OrderItem object that contains information about exported package and link to download it
      Throws:
      IOException - When an I/O error occurs
    • uploadTransformation

      @Deprecated public LinkContainer uploadTransformation(ExportTransformation exportTransformation, InputStream zip) throws IOException
      Deprecated.
      Use declarative configuration to define transformations
      Upload the transformation zip with the stylesheet into Archive.
      Specified by:
      uploadTransformation in interface ArchiveClient
      Parameters:
      exportTransformation - The export transformation.
      zip - The input stream of zip with stylesheet.
      Returns:
      The uploaded transformation
      Throws:
      IOException - When an I/O error occurs
    • search

      public JobInstance search(String jobName, String applicationName, String tenantName) throws IOException
      Description copied from interface: ArchiveClient
      Creates Job Instance for the specified tenant and application .
      Specified by:
      search in interface ArchiveClient
      Parameters:
      jobName - The anme of the Job to run
      applicationName - The application name that the job in run over
      tenantName - The tenant name that the application is located at
      Returns:
      A JobInstance
      Throws:
      IOException - When an I/O error occurs