Search in sources :

Example 21 with BusinessObjectDataStorageFilesCreateResponse

use of org.finra.herd.model.api.xml.BusinessObjectDataStorageFilesCreateResponse in project herd by FINRAOS.

the class BusinessObjectDataStorageFileServiceImpl method createBusinessObjectDataStorageFilesCreateResponse.

/**
 * Creates and populates the business object data storage files create response.
 *
 * @param storageEntity the storage entity
 * @param businessObjectDataEntity the business object data entity
 * @param storageFiles the list of storage files
 *
 * @return the business object data storage files create response
 */
private BusinessObjectDataStorageFilesCreateResponse createBusinessObjectDataStorageFilesCreateResponse(StorageEntity storageEntity, BusinessObjectDataEntity businessObjectDataEntity, List<StorageFile> storageFiles) {
    BusinessObjectDataStorageFilesCreateResponse response = new BusinessObjectDataStorageFilesCreateResponse();
    response.setNamespace(businessObjectDataEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getNamespace().getCode());
    response.setBusinessObjectDefinitionName(businessObjectDataEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getName());
    response.setBusinessObjectFormatUsage(businessObjectDataEntity.getBusinessObjectFormat().getUsage());
    response.setBusinessObjectFormatFileType(businessObjectDataEntity.getBusinessObjectFormat().getFileType().getCode());
    response.setBusinessObjectFormatVersion(businessObjectDataEntity.getBusinessObjectFormat().getBusinessObjectFormatVersion());
    response.setPartitionValue(businessObjectDataEntity.getPartitionValue());
    response.setSubPartitionValues(businessObjectDataHelper.getSubPartitionValues(businessObjectDataEntity));
    response.setBusinessObjectDataVersion(businessObjectDataEntity.getVersion());
    response.setStorageName(storageEntity.getName());
    response.setStorageFiles(storageFiles);
    return response;
}
Also used : BusinessObjectDataStorageFilesCreateResponse(org.finra.herd.model.api.xml.BusinessObjectDataStorageFilesCreateResponse)

Aggregations

BusinessObjectDataStorageFilesCreateResponse (org.finra.herd.model.api.xml.BusinessObjectDataStorageFilesCreateResponse)21 Test (org.junit.Test)16 BusinessObjectDataStorageFilesCreateRequest (org.finra.herd.model.api.xml.BusinessObjectDataStorageFilesCreateRequest)14 StringEntity (org.apache.http.entity.StringEntity)4 CloseableHttpResponse (org.apache.http.client.methods.CloseableHttpResponse)3 BasicStatusLine (org.apache.http.message.BasicStatusLine)3 MockCloseableHttpResponse (org.finra.herd.dao.impl.MockCloseableHttpResponse)3 BusinessObjectDataKey (org.finra.herd.model.api.xml.BusinessObjectDataKey)2 StorageFile (org.finra.herd.model.api.xml.StorageFile)2 S3FileTransferRequestParamsDto (org.finra.herd.model.dto.S3FileTransferRequestParamsDto)2 UploaderInputManifestDto (org.finra.herd.model.dto.UploaderInputManifestDto)2 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)1 StringWriter (java.io.StringWriter)1 URI (java.net.URI)1 ArrayList (java.util.ArrayList)1 JAXBContext (javax.xml.bind.JAXBContext)1 Marshaller (javax.xml.bind.Marshaller)1 HttpPost (org.apache.http.client.methods.HttpPost)1 URIBuilder (org.apache.http.client.utils.URIBuilder)1 CloseableHttpClient (org.apache.http.impl.client.CloseableHttpClient)1