test_class.declarator: s3Operations
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private S3Operations s3Operations;
test_class.type: S3Operations
test_class.var_name: s3Operations
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/helper/BusinessObjectDataInvalidateUnregisteredHelperTest.java
test_class.identifier: BusinessObjectDataInvalidateUnregisteredHelperTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testInvalidateUnregisteredBusinessObjectDataValidationBusinessObjectDefinitionNameRequired()
      {
          BusinessObjectDataInvalidateUnregisteredRequest request =
              new BusinessObjectDataInvalidateUnregisteredRequest(NAMESPACE, BLANK_TEXT, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION,
                  PARTITION_VALUE, NO_SUBPARTITION_VALUES, StorageEntity.MANAGED_STORAGE);
  
          // Given a business object format
          try
          {
              businessObjectFormatServiceTestHelper.createBusinessObjectFormat(request);
          }
          catch (Exception e)
          {
              throw new IllegalArgumentException("Test failed during setup. Most likely setup or developer error.", e);
          }
  
          // Call the API
          try
          {
              businessObjectDataInvalidateUnregisteredHelper.invalidateUnregisteredBusinessObjectData(request);
              Assert.fail("expected a IllegalArgumentException, but no exception was thrown");
          }
          catch (Exception e)
          {
              Assert.assertEquals("thrown exception type", IllegalArgumentException.class, e.getClass());
              Assert.assertEquals("thrown exception message", "The business object definition name is required", e.getMessage());
          }
      }
test_case.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelperTest.testInvalidateUnregisteredBusinessObjectDataValidationBusinessObjectDefinitionNameRequired()
test_case.full_signature: @Test public void testInvalidateUnregisteredBusinessObjectDataValidationBusinessObjectDefinitionNameRequired()
test_case.identifier: testInvalidateUnregisteredBusinessObjectDataValidationBusinessObjectDefinitionNameRequired
test_case.invocations: createBusinessObjectFormat invalidateUnregisteredBusinessObjectData fail assertEquals getClass assertEquals getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInvalidateUnregisteredBusinessObjectDataValidationBusinessObjectDefinitionNameRequired()
focal_class.declarator: UNREGISTERED_STATUS = BusinessObjectDataStatusEntity.INVALID
focal_class.modifier: public static final
focal_class.original_string: public static final String UNREGISTERED_STATUS = BusinessObjectDataStatusEntity.INVALID;
focal_class.type: String
focal_class.var_name: UNREGISTERED_STATUS
focal_class.declarator: businessObjectDataDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDataDao businessObjectDataDao;
focal_class.type: BusinessObjectDataDao
focal_class.var_name: businessObjectDataDao
focal_class.declarator: businessObjectDataHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDataHelper businessObjectDataHelper;
focal_class.type: BusinessObjectDataHelper
focal_class.var_name: businessObjectDataHelper
focal_class.declarator: businessObjectDataStatusDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDataStatusDao businessObjectDataStatusDao;
focal_class.type: BusinessObjectDataStatusDao
focal_class.var_name: businessObjectDataStatusDao
focal_class.declarator: businessObjectFormatDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectFormatDaoHelper businessObjectFormatDaoHelper;
focal_class.type: BusinessObjectFormatDaoHelper
focal_class.var_name: businessObjectFormatDaoHelper
focal_class.declarator: herdCollectionHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private HerdCollectionHelper herdCollectionHelper;
focal_class.type: HerdCollectionHelper
focal_class.var_name: herdCollectionHelper
focal_class.declarator: s3Dao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private S3Dao s3Dao;
focal_class.type: S3Dao
focal_class.var_name: s3Dao
focal_class.declarator: s3KeyPrefixHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private S3KeyPrefixHelper s3KeyPrefixHelper;
focal_class.type: S3KeyPrefixHelper
focal_class.var_name: s3KeyPrefixHelper
focal_class.declarator: sqsNotificationEventService
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private MessageNotificationEventService sqsNotificationEventService;
focal_class.type: MessageNotificationEventService
focal_class.var_name: sqsNotificationEventService
focal_class.declarator: storageDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageDaoHelper storageDaoHelper;
focal_class.type: StorageDaoHelper
focal_class.var_name: storageDaoHelper
focal_class.declarator: storageFileHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageFileHelper storageFileHelper;
focal_class.type: StorageFileHelper
focal_class.var_name: storageFileHelper
focal_class.declarator: storageHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageHelper storageHelper;
focal_class.type: StorageHelper
focal_class.var_name: storageHelper
focal_class.declarator: storageUnitStatusDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitStatusDao storageUnitStatusDao;
focal_class.type: StorageUnitStatusDao
focal_class.var_name: storageUnitStatusDao
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/helper/BusinessObjectDataInvalidateUnregisteredHelper.java
focal_class.identifier: BusinessObjectDataInvalidateUnregisteredHelper
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.invalidateUnregisteredBusinessObjectData(
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.full_signature: public BusinessObjectDataInvalidateUnregisteredResponse invalidateUnregisteredBusinessObjectData(
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.identifier: invalidateUnregisteredBusinessObjectData
focal_class.modifiers: public
focal_class.parameters: (
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.return: BusinessObjectDataInvalidateUnregisteredResponse
focal_class.signature: BusinessObjectDataInvalidateUnregisteredResponse invalidateUnregisteredBusinessObjectData(
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.getBusinessObjectDataInvalidateUnregisteredResponse(
          BusinessObjectDataInvalidateUnregisteredRequest request, List<BusinessObjectDataEntity> registeredBusinessObjectDataEntities)
focal_class.full_signature: private BusinessObjectDataInvalidateUnregisteredResponse getBusinessObjectDataInvalidateUnregisteredResponse(
          BusinessObjectDataInvalidateUnregisteredRequest request, List<BusinessObjectDataEntity> registeredBusinessObjectDataEntities)
focal_class.identifier: getBusinessObjectDataInvalidateUnregisteredResponse
focal_class.modifiers: private
focal_class.parameters: (
          BusinessObjectDataInvalidateUnregisteredRequest request, List<BusinessObjectDataEntity> registeredBusinessObjectDataEntities)
focal_class.return: BusinessObjectDataInvalidateUnregisteredResponse
focal_class.signature: BusinessObjectDataInvalidateUnregisteredResponse getBusinessObjectDataInvalidateUnregisteredResponse(
          BusinessObjectDataInvalidateUnregisteredRequest request, List<BusinessObjectDataEntity> registeredBusinessObjectDataEntities)
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.getBusinessObjectDataKey(BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.full_signature: private BusinessObjectDataKey getBusinessObjectDataKey(BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.identifier: getBusinessObjectDataKey
focal_class.modifiers: private
focal_class.parameters: (BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.return: BusinessObjectDataKey
focal_class.signature: BusinessObjectDataKey getBusinessObjectDataKey(BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.getBusinessObjectDataVersion(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.full_signature: private Integer getBusinessObjectDataVersion(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.identifier: getBusinessObjectDataVersion
focal_class.modifiers: private
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity)
focal_class.return: Integer
focal_class.signature: Integer getBusinessObjectDataVersion(BusinessObjectDataEntity businessObjectDataEntity)
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.getBusinessObjectFormatEntity(BusinessObjectDataInvalidateUnregisteredRequest request)
focal_class.full_signature: private BusinessObjectFormatEntity getBusinessObjectFormatEntity(BusinessObjectDataInvalidateUnregisteredRequest request)
focal_class.identifier: getBusinessObjectFormatEntity
focal_class.modifiers: private
focal_class.parameters: (BusinessObjectDataInvalidateUnregisteredRequest request)
focal_class.return: BusinessObjectFormatEntity
focal_class.signature: BusinessObjectFormatEntity getBusinessObjectFormatEntity(BusinessObjectDataInvalidateUnregisteredRequest request)
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.getLatestBusinessObjectDataEntity(
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.full_signature: private BusinessObjectDataEntity getLatestBusinessObjectDataEntity(
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.identifier: getLatestBusinessObjectDataEntity
focal_class.modifiers: private
focal_class.parameters: (
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.return: BusinessObjectDataEntity
focal_class.signature: BusinessObjectDataEntity getLatestBusinessObjectDataEntity(
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.getResponseBusinessObjectDatas(List<BusinessObjectDataEntity> registeredBusinessObjectDataEntities)
focal_class.full_signature: private List<BusinessObjectData> getResponseBusinessObjectDatas(List<BusinessObjectDataEntity> registeredBusinessObjectDataEntities)
focal_class.identifier: getResponseBusinessObjectDatas
focal_class.modifiers: private
focal_class.parameters: (List<BusinessObjectDataEntity> registeredBusinessObjectDataEntities)
focal_class.return: List<BusinessObjectData>
focal_class.signature: List<BusinessObjectData> getResponseBusinessObjectDatas(List<BusinessObjectDataEntity> registeredBusinessObjectDataEntities)
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.getS3ObjectKeys(BusinessObjectFormatEntity businessObjectFormatEntity, BusinessObjectDataKey businessObjectDataKey,
          StorageEntity storageEntity)
focal_class.full_signature: private List<String> getS3ObjectKeys(BusinessObjectFormatEntity businessObjectFormatEntity, BusinessObjectDataKey businessObjectDataKey,
          StorageEntity storageEntity)
focal_class.identifier: getS3ObjectKeys
focal_class.modifiers: private
focal_class.parameters: (BusinessObjectFormatEntity businessObjectFormatEntity, BusinessObjectDataKey businessObjectDataKey,
          StorageEntity storageEntity)
focal_class.return: List<String>
focal_class.signature: List<String> getS3ObjectKeys(BusinessObjectFormatEntity businessObjectFormatEntity, BusinessObjectDataKey businessObjectDataKey,
          StorageEntity storageEntity)
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.getUnregisteredBusinessObjectDataKeys(BusinessObjectDataInvalidateUnregisteredRequest request,
          StorageEntity storageEntity, BusinessObjectFormatEntity businessObjectFormatEntity, Integer latestRegisteredBusinessObjectDataVersion)
focal_class.full_signature: private List<BusinessObjectDataKey> getUnregisteredBusinessObjectDataKeys(BusinessObjectDataInvalidateUnregisteredRequest request,
          StorageEntity storageEntity, BusinessObjectFormatEntity businessObjectFormatEntity, Integer latestRegisteredBusinessObjectDataVersion)
focal_class.identifier: getUnregisteredBusinessObjectDataKeys
focal_class.modifiers: private
focal_class.parameters: (BusinessObjectDataInvalidateUnregisteredRequest request,
          StorageEntity storageEntity, BusinessObjectFormatEntity businessObjectFormatEntity, Integer latestRegisteredBusinessObjectDataVersion)
focal_class.return: List<BusinessObjectDataKey>
focal_class.signature: List<BusinessObjectDataKey> getUnregisteredBusinessObjectDataKeys(BusinessObjectDataInvalidateUnregisteredRequest request,
          StorageEntity storageEntity, BusinessObjectFormatEntity businessObjectFormatEntity, Integer latestRegisteredBusinessObjectDataVersion)
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.processBusinessObjectDataStatusChangeNotificationEvents(List<BusinessObjectDataEntity> businessObjectDataEntities)
focal_class.full_signature: private void processBusinessObjectDataStatusChangeNotificationEvents(List<BusinessObjectDataEntity> businessObjectDataEntities)
focal_class.identifier: processBusinessObjectDataStatusChangeNotificationEvents
focal_class.modifiers: private
focal_class.parameters: (List<BusinessObjectDataEntity> businessObjectDataEntities)
focal_class.return: void
focal_class.signature: void processBusinessObjectDataStatusChangeNotificationEvents(List<BusinessObjectDataEntity> businessObjectDataEntities)
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.registerInvalidBusinessObjectDatas(BusinessObjectDataEntity latestBusinessObjectDataEntity,
          BusinessObjectFormatEntity businessObjectFormatEntity, List<BusinessObjectDataKey> businessObjectDataKeys, StorageEntity storageEntity)
focal_class.full_signature: private List<BusinessObjectDataEntity> registerInvalidBusinessObjectDatas(BusinessObjectDataEntity latestBusinessObjectDataEntity,
          BusinessObjectFormatEntity businessObjectFormatEntity, List<BusinessObjectDataKey> businessObjectDataKeys, StorageEntity storageEntity)
focal_class.identifier: registerInvalidBusinessObjectDatas
focal_class.modifiers: private
focal_class.parameters: (BusinessObjectDataEntity latestBusinessObjectDataEntity,
          BusinessObjectFormatEntity businessObjectFormatEntity, List<BusinessObjectDataKey> businessObjectDataKeys, StorageEntity storageEntity)
focal_class.return: List<BusinessObjectDataEntity>
focal_class.signature: List<BusinessObjectDataEntity> registerInvalidBusinessObjectDatas(BusinessObjectDataEntity latestBusinessObjectDataEntity,
          BusinessObjectFormatEntity businessObjectFormatEntity, List<BusinessObjectDataKey> businessObjectDataKeys, StorageEntity storageEntity)
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.trimRequest(BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.full_signature: private void trimRequest(BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.identifier: trimRequest
focal_class.modifiers: private
focal_class.parameters: (BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.return: void
focal_class.signature: void trimRequest(BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.validateRequest(BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.full_signature: private void validateRequest(BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.identifier: validateRequest
focal_class.modifiers: private
focal_class.parameters: (BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_class.return: void
focal_class.signature: void validateRequest(BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_method.body: public BusinessObjectDataInvalidateUnregisteredResponse invalidateUnregisteredBusinessObjectData(
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
      {
          // Validate request
          validateRequest(businessObjectDataInvalidateUnregisteredRequest);
  
          // Trim
          trimRequest(businessObjectDataInvalidateUnregisteredRequest);
  
          // Validate format exists
          // Get format
          BusinessObjectFormatEntity businessObjectFormatEntity = getBusinessObjectFormatEntity(businessObjectDataInvalidateUnregisteredRequest);
  
          // Validate storage exists
          // Get storage by name
          String storageName = businessObjectDataInvalidateUnregisteredRequest.getStorageName();
          StorageEntity storageEntity = storageDaoHelper.getStorageEntity(storageName);
  
          // Validate that storage platform is S3
          if (!StoragePlatformEntity.S3.equals(storageEntity.getStoragePlatform().getName()))
          {
              throw new IllegalArgumentException("The specified storage '" + storageName + "' is not an S3 storage platform.");
          }
  
          // Get data with latest version
          BusinessObjectDataEntity latestBusinessObjectDataEntity = getLatestBusinessObjectDataEntity(businessObjectDataInvalidateUnregisteredRequest);
          Integer latestBusinessObjectDataVersion = getBusinessObjectDataVersion(latestBusinessObjectDataEntity);
  
          // List data which are not registered, but exists in S3
          List<BusinessObjectDataKey> unregisteredBusinessObjectDataKeys =
              getUnregisteredBusinessObjectDataKeys(businessObjectDataInvalidateUnregisteredRequest, storageEntity, businessObjectFormatEntity,
                  latestBusinessObjectDataVersion);
  
          // Register the unregistered data as INVALID
          List<BusinessObjectDataEntity> registeredBusinessObjectDataEntities =
              registerInvalidBusinessObjectDatas(latestBusinessObjectDataEntity, businessObjectFormatEntity, unregisteredBusinessObjectDataKeys, storageEntity);
  
          // Fire notifications
          processBusinessObjectDataStatusChangeNotificationEvents(registeredBusinessObjectDataEntities);
  
          // Create and return response
          return getBusinessObjectDataInvalidateUnregisteredResponse(businessObjectDataInvalidateUnregisteredRequest, registeredBusinessObjectDataEntities);
      }
focal_method.class_method_signature: BusinessObjectDataInvalidateUnregisteredHelper.invalidateUnregisteredBusinessObjectData(
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_method.full_signature: public BusinessObjectDataInvalidateUnregisteredResponse invalidateUnregisteredBusinessObjectData(
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_method.identifier: invalidateUnregisteredBusinessObjectData
focal_method.invocations: validateRequest trimRequest getBusinessObjectFormatEntity getStorageName getStorageEntity equals getName getStoragePlatform getLatestBusinessObjectDataEntity getBusinessObjectDataVersion getUnregisteredBusinessObjectDataKeys registerInvalidBusinessObjectDatas processBusinessObjectDataStatusChangeNotificationEvents getBusinessObjectDataInvalidateUnregisteredResponse
focal_method.modifiers: public
focal_method.parameters: (
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)
focal_method.return: BusinessObjectDataInvalidateUnregisteredResponse
focal_method.signature: BusinessObjectDataInvalidateUnregisteredResponse invalidateUnregisteredBusinessObjectData(
          BusinessObjectDataInvalidateUnregisteredRequest businessObjectDataInvalidateUnregisteredRequest)