public abstract class DataBridgeWebClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_ACCEPT |
protected static String |
DEFAULT_CONTENT_TYPE |
protected static String |
HERD_APP_REST_URI_PREFIX |
protected HerdStringHelper |
herdStringHelper |
protected HttpClientHelper |
httpClientHelper |
protected HttpClientOperations |
httpClientOperations |
protected RegServerAccessParamsDto |
regServerAccessParamsDto
The DTO for the parameters required to communicate with the registration server.
|
| Constructor and Description |
|---|
DataBridgeWebClient() |
| Modifier and Type | Method and Description |
|---|---|
BusinessObjectDataStorageFilesCreateResponse |
addStorageFiles(BusinessObjectDataKey businessObjectDataKey,
UploaderInputManifestDto manifest,
S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto,
String storageName)
Calls the registration server to add storage files to the business object data.
|
protected org.apache.http.message.BasicHeader |
getAuthorizationHeader()
Returns an authorization header required for HTTPS client authentication with the registration server.
|
protected BusinessObjectData |
getBusinessObjectData(org.apache.http.client.methods.CloseableHttpResponse httpResponse,
String actionDescription)
Extracts BusinessObjectData object from the registration server HTTP response.
|
protected BusinessObjectDataStorageFilesCreateResponse |
getBusinessObjectDataStorageFilesCreateResponse(org.apache.http.client.methods.CloseableHttpResponse httpResponse)
Extracts BusinessObjectDataStorageFilesCreateResponse object from the registration server HTTP response.
|
RegServerAccessParamsDto |
getRegServerAccessParamsDto()
Returns the Registration Server Access Parameters DTO.
|
protected S3KeyPrefixInformation |
getS3KeyPrefix(DataBridgeBaseManifestDto manifest,
Integer businessObjectDataVersion,
Boolean createNewVersion)
Retrieves S3 key prefix from the registration server.
|
Storage |
getStorage(String storageName)
Gets storage information from the registration server.
|
protected String |
getUriScheme()
Returns an URI scheme.
|
BusinessObjectData |
preRegisterBusinessObjectData(UploaderInputManifestDto manifest,
String storageName,
Boolean createNewVersion)
Pre-registers business object data with the registration server.
|
protected Object |
processXmlHttpResponse(org.apache.http.client.methods.CloseableHttpResponse response,
String actionDescription,
Class<?>... responseClass)
Extracts an instance of the specified object class from the registration server response.
|
void |
setRegServerAccessParamsDto(RegServerAccessParamsDto regServerAccessParamsDto)
Sets the Registration Server Access Parameters DTO.
|
BusinessObjectDataStatusUpdateResponse |
updateBusinessObjectDataStatus(BusinessObjectDataKey businessObjectDataKey,
String businessObjectDataStatus)
Updates the business object data status.
|
protected static final String DEFAULT_ACCEPT
protected static final String DEFAULT_CONTENT_TYPE
protected static final String HERD_APP_REST_URI_PREFIX
@Autowired protected HerdStringHelper herdStringHelper
@Autowired protected HttpClientHelper httpClientHelper
@Autowired protected HttpClientOperations httpClientOperations
protected RegServerAccessParamsDto regServerAccessParamsDto
public BusinessObjectDataStorageFilesCreateResponse addStorageFiles(BusinessObjectDataKey businessObjectDataKey, UploaderInputManifestDto manifest, S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto, String storageName) throws IOException, JAXBException, URISyntaxException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
businessObjectDataKey - the business object data keymanifest - the uploader input manifest files3FileTransferRequestParamsDto - the S3 file transfer request parameters to be used to retrieve local path and S3 key prefix valuesstorageName - the storage nameIOException - if an I/O error was encounteredJAXBException - if a JAXB error was encounteredURISyntaxException - if a URI syntax error was encounteredKeyStoreException - if a key store exception occursNoSuchAlgorithmException - if a no such algorithm exception occursKeyManagementException - if key management exceptionpublic RegServerAccessParamsDto getRegServerAccessParamsDto()
public void setRegServerAccessParamsDto(RegServerAccessParamsDto regServerAccessParamsDto)
regServerAccessParamsDto - the DTO for the parameters required to communicate with the registration serverpublic Storage getStorage(String storageName) throws IOException, JAXBException, URISyntaxException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
storageName - the storage nameIOException - if an I/O error was encounteredJAXBException - if a JAXB error was encounteredURISyntaxException - if a URI syntax error was encounteredKeyStoreException - if a key store exception occursNoSuchAlgorithmException - if a no such algorithm exception occursKeyManagementException - if key management exceptionpublic BusinessObjectData preRegisterBusinessObjectData(UploaderInputManifestDto manifest, String storageName, Boolean createNewVersion) throws IOException, JAXBException, URISyntaxException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
manifest - the uploader input manifest filestorageName - the storage namecreateNewVersion - if not set, only initial version of the business object data is allowed to be createdIOException - if an I/O error was encounteredJAXBException - if a JAXB error was encounteredURISyntaxException - if a URI syntax error was encounteredKeyStoreException - if a key store exception occursNoSuchAlgorithmException - if a no such algorithm exception occursKeyManagementException - if key management exceptionpublic BusinessObjectDataStatusUpdateResponse updateBusinessObjectDataStatus(BusinessObjectDataKey businessObjectDataKey, String businessObjectDataStatus) throws URISyntaxException, IOException, JAXBException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
businessObjectDataKey - the business object data keybusinessObjectDataStatus - the status of the business object dataBusinessObjectDataStatusUpdateResponseURISyntaxException - if error occurs while URI creationIOException - if error occurs communicating with serverJAXBException - if error occurs parsing the XMLKeyStoreException - if a key store exception occursNoSuchAlgorithmException - if a no such algorithm exception occursKeyManagementException - if key management exceptionprotected org.apache.http.message.BasicHeader getAuthorizationHeader()
protected BusinessObjectData getBusinessObjectData(org.apache.http.client.methods.CloseableHttpResponse httpResponse, String actionDescription)
httpResponse - the response received from the supported options.actionDescription - the description of the action being performed with the registration server (to be used in an error message).protected BusinessObjectDataStorageFilesCreateResponse getBusinessObjectDataStorageFilesCreateResponse(org.apache.http.client.methods.CloseableHttpResponse httpResponse)
httpResponse - the response received from the supported options.protected S3KeyPrefixInformation getS3KeyPrefix(DataBridgeBaseManifestDto manifest, Integer businessObjectDataVersion, Boolean createNewVersion) throws IOException, JAXBException, URISyntaxException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
manifest - the manifest file informationbusinessObjectDataVersion - the business object data version (optional)createNewVersion - if not set, only initial version of the business object data is allowed to be created. This parameter is ignored, when the
business object data version is specified.IOException - if an I/O error was encounteredJAXBException - if a JAXB error was encounteredURISyntaxException - if a URI syntax error was encounteredKeyStoreException - if a key store exception occursNoSuchAlgorithmException - if a no such algorithm exception occursKeyManagementException - if key management exceptionprotected String getUriScheme()
protected Object processXmlHttpResponse(org.apache.http.client.methods.CloseableHttpResponse response, String actionDescription, Class<?>... responseClass)
response - the HTTP response received from the registration server.actionDescription - the description of the action being performed with the registration server (to be used in an error message).responseClass - the class of the object expected to be returned by the registration server.Copyright © 2021. All rights reserved.