Package com.opentext.ia.sdk.client.impl
Class InfoArchiveRestClient
- java.lang.Object
-
- com.opentext.ia.sdk.client.impl.InfoArchiveRestClient
-
- All Implemented Interfaces:
ArchiveClient
,InfoArchiveLinkRelations
,StandardLinkRelations
public class InfoArchiveRestClient extends java.lang.Object implements ArchiveClient, InfoArchiveLinkRelations
Implementation of ArchiveClient that uses the REST API of a running InfoArchive server.
-
-
Field Summary
-
Fields inherited from interface com.opentext.ia.sdk.client.api.InfoArchiveLinkRelations
LINK_ADD, LINK_AICS, LINK_AIPS, LINK_ALLCOMPONENTS, LINK_APPLICATIONS, LINK_CI, LINK_CONFIGURATION, LINK_CONTENT_ADDRESSED_STORAGES, LINK_CONTENTS, LINK_CRYPTO_OBJECTS, LINK_CUSTOM_STORAGES, LINK_DATABASES, LINK_DOWNLOAD, LINK_EXPORT, LINK_EXPORT_CONFIG, LINK_EXPORT_PIPELINE, LINK_EXPORT_TRANSFORMATION, LINK_EXPORT_TRANSFORMATION_ZIP, LINK_FEDERATIONS, LINK_FILE_SYSTEM_FOLDERS, LINK_FILE_SYSTEM_ROOTS, LINK_HOLDING_CRYPTOS, LINK_HOLDINGS, LINK_INGEST, LINK_INGEST_DIRECT, LINK_INGEST_NODES, LINK_INGESTS, LINK_JOB_CONFIRMATION, LINK_JOB_DEFINITIONS, LINK_JOB_INSTANCES, LINK_LIBRARIES, LINK_PDI_CRYPTOS, LINK_PDI_SCHEMAS, LINK_PDIS, LINK_PREFIX, LINK_PRODUCT_INFO, LINK_QUERIES, LINK_QUERY_QUOTAS, LINK_RECEIVER_NODES, LINK_RESULT_CONFIGURATION_HELPERS, LINK_RETENTION_POLICIES, LINK_SEARCH_COMPOSITIONS, LINK_SEARCHES, LINK_SPACE_ROOT_FOLDERS, LINK_SPACE_ROOT_LIBRARIES, LINK_SPACES, LINK_STORAGE_END_POINTS, LINK_STORES, LINK_TENANT, LINK_XFORMS
-
Fields inherited from interface com.opentext.ia.sdk.support.http.rest.StandardLinkRelations
LINK_SELF
-
-
Constructor Summary
Constructors Constructor Description InfoArchiveRestClient(RestClient restClient, ApplicationIngestionResourcesCache resourceCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description OrderItem
export(SearchResults searchResults, ExportConfiguration exportConfiguration, java.lang.String outputName)
Start the export of the search results for the specified export configuration.OrderItem
exportAndWaitForDownloadLink(SearchResults searchResults, ExportConfiguration exportConfiguration, java.lang.String outputName, java.util.concurrent.TimeUnit timeUnit, long timeOut)
Start and wait the export of the search results for the specified export configuration.ContentResult
fetchContent(java.lang.String contentId)
Deprecated.Will be removed without replacement in a future versionContentResult
fetchOrderContent(OrderItem orderItem)
Deprecated.Will be removed without replacement in a future versionjava.lang.String
ingest(java.io.InputStream sip)
Ingest a Submission Information Package (SIP) into the Archive.java.lang.String
ingestDirect(java.io.InputStream sip)
Ingest a Submission Information Package (SIP) into the Archive.SearchResults
search(SearchQuery searchQuery, SearchComposition searchComposition)
Get the search results for the specified search query and composition.LinkContainer
uploadTransformation(ExportTransformation exportTransformation, java.io.InputStream zip)
Deprecated.Use declarative configuration to define transformations
-
-
-
Constructor Detail
-
InfoArchiveRestClient
public InfoArchiveRestClient(RestClient restClient, ApplicationIngestionResourcesCache resourceCache)
-
-
Method Detail
-
ingest
public java.lang.String ingest(java.io.InputStream sip) throws java.io.IOException
Description copied from interface:ArchiveClient
Ingest a Submission Information Package (SIP) into the Archive.- Specified by:
ingest
in interfaceArchiveClient
- 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:
java.io.IOException
- When an I/O error occurs
-
ingestDirect
public java.lang.String ingestDirect(java.io.InputStream sip) throws java.io.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 interfaceArchiveClient
- 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:
java.io.IOException
- When an I/O error occurs
-
fetchContent
@Deprecated public ContentResult fetchContent(java.lang.String contentId) throws java.io.IOException
Deprecated.Will be removed without replacement in a future versionFetch the content for the specified content id.- Specified by:
fetchContent
in interfaceArchiveClient
- Parameters:
contentId
- The id of the content to fetch.- Returns:
- A ContentResult
- Throws:
java.io.IOException
- When an I/O error occurs
-
fetchOrderContent
@Deprecated public ContentResult fetchOrderContent(OrderItem orderItem) throws java.io.IOException
Deprecated.Will be removed without replacement in a future versionFetch the content for the specified order item.- Specified by:
fetchOrderContent
in interfaceArchiveClient
- Parameters:
orderItem
- The order item.- Returns:
- A ContentResult
- Throws:
java.io.IOException
- When an I/O error occurs
-
search
public SearchResults search(SearchQuery searchQuery, SearchComposition searchComposition) throws java.io.IOException
Description copied from interface:ArchiveClient
Get the search results for the specified search query and composition.- Specified by:
search
in interfaceArchiveClient
- Parameters:
searchQuery
- The search query.searchComposition
- The search composition.- Returns:
- A SearchResults
- Throws:
java.io.IOException
- When an I/O error occurs
-
export
public OrderItem export(SearchResults searchResults, ExportConfiguration exportConfiguration, java.lang.String outputName) throws java.io.IOException
Description copied from interface:ArchiveClient
Start the export of the search results for the specified export configuration.- Specified by:
export
in interfaceArchiveClient
- 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:
java.io.IOException
- When an I/O error occurs
-
exportAndWaitForDownloadLink
public OrderItem exportAndWaitForDownloadLink(SearchResults searchResults, ExportConfiguration exportConfiguration, java.lang.String outputName, java.util.concurrent.TimeUnit timeUnit, long timeOut) throws java.io.IOException
Description copied from interface:ArchiveClient
Start and wait the export of the search results for the specified export configuration.- Specified by:
exportAndWaitForDownloadLink
in interfaceArchiveClient
- Parameters:
searchResults
- The search results.exportConfiguration
- The export configuration.outputName
- The output name of result package.timeUnit
- The unit of thetimeOut
valuetimeOut
- The time out of export process- Returns:
- An OrderItem object that contains information about exported package and link to download it
- Throws:
java.io.IOException
- When an I/O error occurs
-
uploadTransformation
@Deprecated public LinkContainer uploadTransformation(ExportTransformation exportTransformation, java.io.InputStream zip) throws java.io.IOException
Deprecated.Use declarative configuration to define transformationsUpload the transformation zip with the stylesheet into Archive.- Specified by:
uploadTransformation
in interfaceArchiveClient
- Parameters:
exportTransformation
- The export transformation.zip
- The input stream of zip with stylesheet.- Returns:
- The uploaded transformation
- Throws:
java.io.IOException
- When an I/O error occurs
-
-