test_class.file: herd-code/herd-tools/herd-retention-expiration-exporter/src/test/java/org/finra/herd/tools/retention/exporter/RetentionExpirationExporterWebClientTest.java
test_class.identifier: RetentionExpirationExporterWebClientTest
test_class.superclass: extends AbstractExporterTest
test_case.body: @Test
      public void testSearchBusinessObjectDataPageNum2() throws Exception
      {
          retentionExpirationExporterWebClient.getRegServerAccessParamsDto().setUseSsl(false);
          BusinessObjectDataSearchResult result = retentionExpirationExporterWebClient.searchBusinessObjectData(new BusinessObjectDataSearchRequest(), 2);
          assertNotNull(result);
          assertEquals(0, CollectionUtils.size(result.getBusinessObjectDataElements()));
      }
test_case.class_method_signature: RetentionExpirationExporterWebClientTest.testSearchBusinessObjectDataPageNum2()
test_case.full_signature: @Test public void testSearchBusinessObjectDataPageNum2()
test_case.identifier: testSearchBusinessObjectDataPageNum2
test_case.invocations: setUseSsl getRegServerAccessParamsDto searchBusinessObjectData assertNotNull assertEquals size getBusinessObjectDataElements
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSearchBusinessObjectDataPageNum2()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(RetentionExpirationExporterWebClient.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(RetentionExpirationExporterWebClient.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.file: herd-code/herd-tools/herd-retention-expiration-exporter/src/main/java/org/finra/herd/tools/retention/exporter/RetentionExpirationExporterWebClient.java
focal_class.identifier: RetentionExpirationExporterWebClient
focal_class.class_method_signature: RetentionExpirationExporterWebClient.getBusinessObjectDefinition(String namespace, String businessObjectDefinitionName)
focal_class.full_signature:  BusinessObjectDefinition getBusinessObjectDefinition(String namespace, String businessObjectDefinitionName)
focal_class.identifier: getBusinessObjectDefinition
focal_class.parameters: (String namespace, String businessObjectDefinitionName)
focal_class.return: BusinessObjectDefinition
focal_class.signature: BusinessObjectDefinition getBusinessObjectDefinition(String namespace, String businessObjectDefinitionName)
focal_class.class_method_signature: RetentionExpirationExporterWebClient.searchBusinessObjectData(BusinessObjectDataSearchRequest businessObjectDataSearchRequest, Integer pageNum)
focal_class.full_signature:  BusinessObjectDataSearchResult searchBusinessObjectData(BusinessObjectDataSearchRequest businessObjectDataSearchRequest, Integer pageNum)
focal_class.identifier: searchBusinessObjectData
focal_class.parameters: (BusinessObjectDataSearchRequest businessObjectDataSearchRequest, Integer pageNum)
focal_class.return: BusinessObjectDataSearchResult
focal_class.signature: BusinessObjectDataSearchResult searchBusinessObjectData(BusinessObjectDataSearchRequest businessObjectDataSearchRequest, Integer pageNum)
focal_class.class_method_signature: RetentionExpirationExporterWebClient.getBusinessObjectDataSearchResult(CloseableHttpResponse httpResponse)
focal_class.full_signature: private BusinessObjectDataSearchResult getBusinessObjectDataSearchResult(CloseableHttpResponse httpResponse)
focal_class.identifier: getBusinessObjectDataSearchResult
focal_class.modifiers: private
focal_class.parameters: (CloseableHttpResponse httpResponse)
focal_class.return: BusinessObjectDataSearchResult
focal_class.signature: BusinessObjectDataSearchResult getBusinessObjectDataSearchResult(CloseableHttpResponse httpResponse)
focal_class.class_method_signature: RetentionExpirationExporterWebClient.getBusinessObjectDefinition(CloseableHttpResponse httpResponse)
focal_class.full_signature: private BusinessObjectDefinition getBusinessObjectDefinition(CloseableHttpResponse httpResponse)
focal_class.identifier: getBusinessObjectDefinition
focal_class.modifiers: private
focal_class.parameters: (CloseableHttpResponse httpResponse)
focal_class.return: BusinessObjectDefinition
focal_class.signature: BusinessObjectDefinition getBusinessObjectDefinition(CloseableHttpResponse httpResponse)
focal_class.superclass: extends DataBridgeWebClient
focal_method.body: BusinessObjectDataSearchResult searchBusinessObjectData(BusinessObjectDataSearchRequest businessObjectDataSearchRequest, Integer pageNum)
          throws IOException, JAXBException, URISyntaxException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
      {
          LOGGER.info("Sending business object data search request to the registration server...");
  
          URIBuilder uriBuilder =
              new URIBuilder().setScheme(getUriScheme()).setHost(regServerAccessParamsDto.getRegServerHost()).setPort(regServerAccessParamsDto.getRegServerPort())
                  .setPath(HERD_APP_REST_URI_PREFIX + "/businessObjectData/search").setParameter("pageNum", pageNum.toString());
  
          URI uri = uriBuilder.build();
  
          // Create a JAXB context and marshaller
          JAXBContext requestContext = JAXBContext.newInstance(BusinessObjectDataSearchRequest.class);
          Marshaller requestMarshaller = requestContext.createMarshaller();
          requestMarshaller.setProperty(Marshaller.JAXB_ENCODING, StandardCharsets.UTF_8.name());
          requestMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
  
          StringWriter stringWriter = new StringWriter();
          requestMarshaller.marshal(businessObjectDataSearchRequest, stringWriter);
  
          try (CloseableHttpClient client = httpClientHelper
              .createHttpClient(regServerAccessParamsDto.isTrustSelfSignedCertificate(), regServerAccessParamsDto.isDisableHostnameVerification()))
          {
              HttpPost request = new HttpPost(uri);
              request.addHeader("Content-Type", DEFAULT_CONTENT_TYPE);
              request.addHeader("Accepts", DEFAULT_ACCEPT);
  
              // If SSL is enabled, set the client authentication header.
              if (regServerAccessParamsDto.isUseSsl())
              {
                  request.addHeader(getAuthorizationHeader());
              }
  
              request.setEntity(new StringEntity(stringWriter.toString()));
  
              LOGGER.info(String.format("    HTTP POST URI: %s", request.getURI().toString()));
              LOGGER.info(String.format("    HTTP POST Entity Content:%n%s", stringWriter.toString()));
  
              BusinessObjectDataSearchResult businessObjectDataSearchResult = getBusinessObjectDataSearchResult(httpClientOperations.execute(client, request));
  
              LOGGER.info("Successfully received search business object data response from the registration server.");
  
              return businessObjectDataSearchResult;
          }
      }
focal_method.class_method_signature: RetentionExpirationExporterWebClient.searchBusinessObjectData(BusinessObjectDataSearchRequest businessObjectDataSearchRequest, Integer pageNum)
focal_method.full_signature:  BusinessObjectDataSearchResult searchBusinessObjectData(BusinessObjectDataSearchRequest businessObjectDataSearchRequest, Integer pageNum)
focal_method.identifier: searchBusinessObjectData
focal_method.invocations: info setParameter setPath setPort setHost setScheme getUriScheme getRegServerHost getRegServerPort toString build newInstance createMarshaller setProperty name setProperty marshal createHttpClient isTrustSelfSignedCertificate isDisableHostnameVerification addHeader addHeader isUseSsl addHeader getAuthorizationHeader setEntity toString info format toString getURI info format toString getBusinessObjectDataSearchResult execute info
focal_method.parameters: (BusinessObjectDataSearchRequest businessObjectDataSearchRequest, Integer pageNum)
focal_method.return: BusinessObjectDataSearchResult
focal_method.signature: BusinessObjectDataSearchResult searchBusinessObjectData(BusinessObjectDataSearchRequest businessObjectDataSearchRequest, Integer pageNum)