test_class.file: herd-code/herd-tools/herd-downloader/src/test/java/org/finra/herd/tools/downloader/DownloaderWebClientTest.java
test_class.identifier: DownloaderWebClientTest
test_class.superclass: extends AbstractDownloaderTest
test_case.body: @Test
      public void testGetData() throws Exception
      {
          // Upload and register business object data parents.
          uploadAndRegisterTestDataParents(downloaderWebClient);
  
          // Upload and register the initial version if of the test business object data.
          uploadTestDataFilesToS3(S3_TEST_PATH_V0);
          final UploaderInputManifestDto uploaderInputManifestDto = getTestUploaderInputManifestDto();
  
          executeWithoutLogging(DataBridgeWebClient.class, new Command()
          {
              @Override
              public void execute() throws Exception
              {
                  BusinessObjectData businessObjectData =
                      downloaderWebClient.preRegisterBusinessObjectData(uploaderInputManifestDto, StorageEntity.MANAGED_STORAGE, false);
                  BusinessObjectDataKey businessObjectDataKey = businessObjectDataHelper.getBusinessObjectDataKey(businessObjectData);
                  downloaderWebClient
                      .addStorageFiles(businessObjectDataKey, uploaderInputManifestDto, getTestS3FileTransferRequestParamsDto(S3_TEST_PATH_V0 + "/"),
                          StorageEntity.MANAGED_STORAGE);
                  downloaderWebClient.updateBusinessObjectDataStatus(businessObjectDataKey, BusinessObjectDataStatusEntity.VALID);
              }
          });
  
          // Get business object data information.
          DownloaderInputManifestDto downloaderInputManifestDto = getTestDownloaderInputManifestDto();
          BusinessObjectData resultBusinessObjectData = downloaderWebClient.getBusinessObjectData(downloaderInputManifestDto);
  
          // Validate the results.
          assertNotNull(resultBusinessObjectData);
      }
test_case.class_method_signature: DownloaderWebClientTest.testGetData()
test_case.full_signature: @Test public void testGetData()
test_case.identifier: testGetData
test_case.invocations: uploadAndRegisterTestDataParents uploadTestDataFilesToS3 getTestUploaderInputManifestDto executeWithoutLogging preRegisterBusinessObjectData getBusinessObjectDataKey addStorageFiles getTestS3FileTransferRequestParamsDto updateBusinessObjectDataStatus getTestDownloaderInputManifestDto getBusinessObjectData assertNotNull
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetData()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(DownloaderWebClient.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(DownloaderWebClient.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.file: herd-code/herd-tools/herd-downloader/src/main/java/org/finra/herd/tools/downloader/DownloaderWebClient.java
focal_class.identifier: DownloaderWebClient
focal_class.class_method_signature: DownloaderWebClient.getBusinessObjectData(DownloaderInputManifestDto manifest)
focal_class.full_signature: public BusinessObjectData getBusinessObjectData(DownloaderInputManifestDto manifest)
focal_class.identifier: getBusinessObjectData
focal_class.modifiers: public
focal_class.parameters: (DownloaderInputManifestDto manifest)
focal_class.return: BusinessObjectData
focal_class.signature: BusinessObjectData getBusinessObjectData(DownloaderInputManifestDto manifest)
focal_class.class_method_signature: DownloaderWebClient.getS3KeyPrefix(BusinessObjectData businessObjectData)
focal_class.full_signature: public S3KeyPrefixInformation getS3KeyPrefix(BusinessObjectData businessObjectData)
focal_class.identifier: getS3KeyPrefix
focal_class.modifiers: public
focal_class.parameters: (BusinessObjectData businessObjectData)
focal_class.return: S3KeyPrefixInformation
focal_class.signature: S3KeyPrefixInformation getS3KeyPrefix(BusinessObjectData businessObjectData)
focal_class.class_method_signature: DownloaderWebClient.getStorageUnitDownloadCredential(DownloaderInputManifestDto manifest, String storageName)
focal_class.full_signature: public StorageUnitDownloadCredential getStorageUnitDownloadCredential(DownloaderInputManifestDto manifest, String storageName)
focal_class.identifier: getStorageUnitDownloadCredential
focal_class.modifiers: public
focal_class.parameters: (DownloaderInputManifestDto manifest, String storageName)
focal_class.return: StorageUnitDownloadCredential
focal_class.signature: StorageUnitDownloadCredential getStorageUnitDownloadCredential(DownloaderInputManifestDto manifest, String storageName)
focal_class.class_method_signature: DownloaderWebClient.getStorageUnitDownloadCredential(CloseableHttpResponse response)
focal_class.full_signature: private StorageUnitDownloadCredential getStorageUnitDownloadCredential(CloseableHttpResponse response)
focal_class.identifier: getStorageUnitDownloadCredential
focal_class.modifiers: private
focal_class.parameters: (CloseableHttpResponse response)
focal_class.return: StorageUnitDownloadCredential
focal_class.signature: StorageUnitDownloadCredential getStorageUnitDownloadCredential(CloseableHttpResponse response)
focal_class.superclass: extends DataBridgeWebClient
focal_method.body: public BusinessObjectData getBusinessObjectData(DownloaderInputManifestDto manifest)
          throws IOException, JAXBException, URISyntaxException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
      {
          LOGGER.info("Retrieving business object data information from the registration server...");
  
          StringBuilder uriPathBuilder = new StringBuilder(HERD_APP_REST_URI_PREFIX);
          uriPathBuilder.append("/businessObjectData");
          uriPathBuilder.append("/namespaces/").append(manifest.getNamespace());
          uriPathBuilder.append("/businessObjectDefinitionNames/").append(manifest.getBusinessObjectDefinitionName());
          uriPathBuilder.append("/businessObjectFormatUsages/").append(manifest.getBusinessObjectFormatUsage());
          uriPathBuilder.append("/businessObjectFormatFileTypes/").append(manifest.getBusinessObjectFormatFileType());
  
          URIBuilder uriBuilder =
              new URIBuilder().setScheme(getUriScheme()).setHost(regServerAccessParamsDto.getRegServerHost()).setPort(regServerAccessParamsDto.getRegServerPort())
                  .setPath(uriPathBuilder.toString()).setParameter("partitionKey", manifest.getPartitionKey())
                  .setParameter("partitionValue", manifest.getPartitionValue())
                  .setParameter("businessObjectFormatVersion", manifest.getBusinessObjectFormatVersion())
                  .setParameter("businessObjectDataVersion", manifest.getBusinessObjectDataVersion());
  
          if (manifest.getSubPartitionValues() != null)
          {
              uriBuilder.setParameter("subPartitionValues", herdStringHelper.join(manifest.getSubPartitionValues(), "|", "\\"));
          }
  
          URI uri = uriBuilder.build();
  
          CloseableHttpClient client = httpClientHelper
              .createHttpClient(regServerAccessParamsDto.isTrustSelfSignedCertificate(), regServerAccessParamsDto.isDisableHostnameVerification());
          HttpGet request = new HttpGet(uri);
          request.addHeader("Accepts", "application/xml");
  
          // If SSL is enabled, set the client authentication header.
          if (regServerAccessParamsDto.isUseSsl())
          {
              request.addHeader(getAuthorizationHeader());
          }
  
          LOGGER.info(String.format("    HTTP GET URI: %s", request.getURI().toString()));
  
          BusinessObjectData businessObjectData =
              getBusinessObjectData(httpClientOperations.execute(client, request), "retrieve business object data from the registration server");
  
          LOGGER.info("Successfully retrieved business object data from the registration server.");
  
          return businessObjectData;
      }
focal_method.class_method_signature: DownloaderWebClient.getBusinessObjectData(DownloaderInputManifestDto manifest)
focal_method.full_signature: public BusinessObjectData getBusinessObjectData(DownloaderInputManifestDto manifest)
focal_method.identifier: getBusinessObjectData
focal_method.invocations: info append append append getNamespace append append getBusinessObjectDefinitionName append append getBusinessObjectFormatUsage append append getBusinessObjectFormatFileType setParameter setParameter setParameter setParameter setPath setPort setHost setScheme getUriScheme getRegServerHost getRegServerPort toString getPartitionKey getPartitionValue getBusinessObjectFormatVersion getBusinessObjectDataVersion getSubPartitionValues setParameter join getSubPartitionValues build createHttpClient isTrustSelfSignedCertificate isDisableHostnameVerification addHeader isUseSsl addHeader getAuthorizationHeader info format toString getURI getBusinessObjectData execute info
focal_method.modifiers: public
focal_method.parameters: (DownloaderInputManifestDto manifest)
focal_method.return: BusinessObjectData
focal_method.signature: BusinessObjectData getBusinessObjectData(DownloaderInputManifestDto manifest)