test_class.declarator: businessObjectDataDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDataDaoHelper businessObjectDataDaoHelper;
test_class.type: BusinessObjectDataDaoHelper
test_class.var_name: businessObjectDataDaoHelper
test_class.declarator: businessObjectDataHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private BusinessObjectDataHelper businessObjectDataHelper;
test_class.type: BusinessObjectDataHelper
test_class.var_name: businessObjectDataHelper
test_class.declarator: configurationHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ConfigurationHelper configurationHelper;
test_class.type: ConfigurationHelper
test_class.var_name: configurationHelper
test_class.declarator: jsonHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private JsonHelper jsonHelper;
test_class.type: JsonHelper
test_class.var_name: jsonHelper
test_class.declarator: s3KeyPrefixHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private S3KeyPrefixHelper s3KeyPrefixHelper;
test_class.type: S3KeyPrefixHelper
test_class.var_name: s3KeyPrefixHelper
test_class.declarator: s3Service
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private S3Service s3Service;
test_class.type: S3Service
test_class.var_name: s3Service
test_class.declarator: storageFileHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageFileHelper storageFileHelper;
test_class.type: StorageFileHelper
test_class.var_name: storageFileHelper
test_class.declarator: storageHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageHelper storageHelper;
test_class.type: StorageHelper
test_class.var_name: storageHelper
test_class.declarator: storagePolicyDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StoragePolicyDaoHelper storagePolicyDaoHelper;
test_class.type: StoragePolicyDaoHelper
test_class.var_name: storagePolicyDaoHelper
test_class.declarator: storagePolicyHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StoragePolicyHelper storagePolicyHelper;
test_class.type: StoragePolicyHelper
test_class.var_name: storagePolicyHelper
test_class.declarator: storagePolicyProcessorHelperServiceImpl
test_class.modifier: @InjectMocks
      private
test_class.original_string: @InjectMocks
      private StoragePolicyProcessorHelperServiceImpl storagePolicyProcessorHelperServiceImpl;
test_class.type: StoragePolicyProcessorHelperServiceImpl
test_class.var_name: storagePolicyProcessorHelperServiceImpl
test_class.declarator: storageUnitDao
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageUnitDao storageUnitDao;
test_class.type: StorageUnitDao
test_class.var_name: storageUnitDao
test_class.declarator: storageUnitDaoHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageUnitDaoHelper storageUnitDaoHelper;
test_class.type: StorageUnitDaoHelper
test_class.var_name: storageUnitDaoHelper
test_class.declarator: storageUnitHelper
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private StorageUnitHelper storageUnitHelper;
test_class.type: StorageUnitHelper
test_class.var_name: storageUnitHelper
test_class.file: herd-code/herd-service/src/test/java/org/finra/herd/service/impl/StoragePolicyProcessorHelperServiceImplTest.java
test_class.identifier: StoragePolicyProcessorHelperServiceImplTest
test_class.superclass: extends AbstractServiceTest
test_case.body: @Test
      public void testInitiateStoragePolicyTransitionImpl()
      {
          // Create an empty storage policy transition parameters DTO.
          StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto = new StoragePolicyTransitionParamsDto();
  
          // Create a business object data key.
          BusinessObjectDataKey businessObjectDataKey =
              new BusinessObjectDataKey(BDEF_NAMESPACE, BDEF_NAME, FORMAT_USAGE_CODE, FORMAT_FILE_TYPE_CODE, FORMAT_VERSION, PARTITION_VALUE,
                  NO_SUBPARTITION_VALUES, DATA_VERSION);
  
          // Create a business object format entity.
          BusinessObjectFormatEntity businessObjectFormatEntity = new BusinessObjectFormatEntity();
  
          // Create a business object data status entity.
          BusinessObjectDataStatusEntity businessObjectDataStatusEntity = new BusinessObjectDataStatusEntity();
          businessObjectDataStatusEntity.setCode(BusinessObjectDataStatusEntity.VALID);
  
          // Create a business object data entity.
          BusinessObjectDataEntity businessObjectDataEntity = new BusinessObjectDataEntity();
          businessObjectDataEntity.setBusinessObjectFormat(businessObjectFormatEntity);
          businessObjectDataEntity.setStatus(businessObjectDataStatusEntity);
  
          // Create a storage policy key.
          StoragePolicyKey storagePolicyKey = new StoragePolicyKey(STORAGE_POLICY_NAMESPACE_CD, STORAGE_POLICY_NAME);
  
          // Create a storage platform entity.
          StoragePlatformEntity storagePlatformEntity = new StoragePlatformEntity();
          storagePlatformEntity.setName(StoragePlatformEntity.S3);
  
          // Create a storage entity.
          StorageEntity storageEntity = new StorageEntity();
          storageEntity.setStoragePlatform(storagePlatformEntity);
          storageEntity.setName(STORAGE_NAME);
  
          // Create a storage policy entity.
          StoragePolicyTransitionTypeEntity storagePolicyTransitionTypeEntity = new StoragePolicyTransitionTypeEntity();
          storagePolicyTransitionTypeEntity.setCode(StoragePolicyTransitionTypeEntity.GLACIER);
  
          // Create a storage policy entity.
          StoragePolicyEntity storagePolicyEntity = new StoragePolicyEntity();
          storagePolicyEntity.setStorage(storageEntity);
          storagePolicyEntity.setStoragePolicyTransitionType(storagePolicyTransitionTypeEntity);
  
          // Create a list of storage file entities.
          List<StorageFileEntity> storageFileEntities = Arrays.asList(new StorageFileEntity());
  
          // Create a storage unit status entity.
          StorageUnitStatusEntity storageUnitStatusEntity = new StorageUnitStatusEntity();
          storageUnitStatusEntity.setCode(StorageUnitStatusEntity.ENABLED);
  
          // Create a storage unit entity.
          StorageUnitEntity storageUnitEntity = new StorageUnitEntity();
          storageUnitEntity.setStorage(storageEntity);
          storageUnitEntity.setBusinessObjectData(businessObjectDataEntity);
          storageUnitEntity.setStorageFiles(storageFileEntities);
          storageUnitEntity.setStatus(storageUnitStatusEntity);
  
          // Create a list of storage files.
          List<StorageFile> storageFiles = Arrays.asList(new StorageFile(S3_KEY, FILE_SIZE_1_KB, ROW_COUNT_1000));
  
          // Mock the external calls.
          when(businessObjectDataDaoHelper.getBusinessObjectDataEntity(businessObjectDataKey)).thenReturn(businessObjectDataEntity);
          when(storagePolicyDaoHelper.getStoragePolicyEntityByKeyAndVersion(storagePolicyKey, STORAGE_POLICY_VERSION)).thenReturn(storagePolicyEntity);
          when(configurationHelper.getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_VALIDATE_PATH_PREFIX)).thenReturn(S3_ATTRIBUTE_NAME_VALIDATE_PATH_PREFIX);
          when(storageHelper.getBooleanStorageAttributeValueByName(S3_ATTRIBUTE_NAME_VALIDATE_PATH_PREFIX, storageEntity, false, true)).thenReturn(true);
          when(configurationHelper.getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_VALIDATE_FILE_EXISTENCE))
              .thenReturn(S3_ATTRIBUTE_NAME_VALIDATE_FILE_EXISTENCE);
          when(storageHelper.getBooleanStorageAttributeValueByName(S3_ATTRIBUTE_NAME_VALIDATE_FILE_EXISTENCE, storageEntity, false, true)).thenReturn(true);
          when(configurationHelper.getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_BUCKET_NAME)).thenReturn(S3_ATTRIBUTE_NAME_BUCKET_NAME);
          when(storageHelper.getStorageAttributeValueByName(S3_ATTRIBUTE_NAME_BUCKET_NAME, storageEntity, true)).thenReturn(S3_BUCKET_NAME);
          when(configurationHelper.getRequiredProperty(ConfigurationValue.S3_ARCHIVE_TO_GLACIER_TAG_KEY)).thenReturn(S3_OBJECT_TAG_KEY);
          when(configurationHelper.getRequiredProperty(ConfigurationValue.S3_ARCHIVE_TO_GLACIER_TAG_VALUE)).thenReturn(S3_OBJECT_TAG_VALUE);
          when(configurationHelper.getRequiredProperty(ConfigurationValue.S3_ARCHIVE_TO_GLACIER_ROLE_ARN)).thenReturn(S3_OBJECT_TAGGER_ROLE_ARN);
          when(configurationHelper.getRequiredProperty(ConfigurationValue.S3_ARCHIVE_TO_GLACIER_ROLE_SESSION_NAME))
              .thenReturn(S3_OBJECT_TAGGER_ROLE_SESSION_NAME);
          when(storageUnitDaoHelper.getStorageUnitEntity(STORAGE_NAME, businessObjectDataEntity)).thenReturn(storageUnitEntity);
          when(s3KeyPrefixHelper.buildS3KeyPrefix(storageEntity, businessObjectFormatEntity, businessObjectDataKey)).thenReturn(S3_KEY_PREFIX);
          when(storageFileHelper.getAndValidateStorageFiles(storageUnitEntity, S3_KEY_PREFIX, STORAGE_NAME, businessObjectDataKey))
              .thenReturn(storageFiles);
          doAnswer(new Answer<Void>()
          {
              public Void answer(InvocationOnMock invocation)
              {
                  // Get the new storage unit status.
                  String storageUnitStatus = (String) invocation.getArguments()[1];
  
                  // Create a storage unit status entity for the new storage unit status.
                  StorageUnitStatusEntity storageUnitStatusEntity = new StorageUnitStatusEntity();
                  storageUnitStatusEntity.setCode(storageUnitStatus);
  
                  // Update the storage unit with the new status.
                  StorageUnitEntity storageUnitEntity = (StorageUnitEntity) invocation.getArguments()[0];
                  storageUnitEntity.setStatus(storageUnitStatusEntity);
  
                  return null;
              }
          }).when(storageUnitDaoHelper).updateStorageUnitStatus(storageUnitEntity, StorageUnitStatusEntity.ARCHIVING, StorageUnitStatusEntity.ARCHIVING);
          when(configurationHelper.getProperty(ConfigurationValue.S3_ENDPOINT)).thenReturn(S3_ENDPOINT);
  
          // Call the method under test.
          storagePolicyProcessorHelperServiceImpl.initiateStoragePolicyTransitionImpl(storagePolicyTransitionParamsDto,
              new StoragePolicySelection(businessObjectDataKey, storagePolicyKey, STORAGE_POLICY_VERSION));
  
          // Verify the external calls.
          verify(businessObjectDataHelper).validateBusinessObjectDataKey(businessObjectDataKey, true, true);
          verify(storagePolicyHelper).validateStoragePolicyKey(storagePolicyKey);
          verify(businessObjectDataDaoHelper).getBusinessObjectDataEntity(businessObjectDataKey);
          verify(businessObjectDataHelper, times(2)).businessObjectDataKeyToString(businessObjectDataKey);
          verify(storagePolicyDaoHelper).getStoragePolicyEntityByKeyAndVersion(storagePolicyKey, STORAGE_POLICY_VERSION);
          verify(storagePolicyHelper, times(2)).storagePolicyKeyAndVersionToString(storagePolicyKey, STORAGE_POLICY_VERSION);
          verify(configurationHelper).getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_VALIDATE_PATH_PREFIX);
          verify(storageHelper).getBooleanStorageAttributeValueByName(S3_ATTRIBUTE_NAME_VALIDATE_PATH_PREFIX, storageEntity, false, true);
          verify(configurationHelper).getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_VALIDATE_FILE_EXISTENCE);
          verify(storageHelper).getBooleanStorageAttributeValueByName(S3_ATTRIBUTE_NAME_VALIDATE_FILE_EXISTENCE, storageEntity, false, true);
          verify(configurationHelper).getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_BUCKET_NAME);
          verify(storageHelper).getStorageAttributeValueByName(S3_ATTRIBUTE_NAME_BUCKET_NAME, storageEntity, true);
          verify(configurationHelper).getRequiredProperty(ConfigurationValue.S3_ARCHIVE_TO_GLACIER_TAG_KEY);
          verify(configurationHelper).getRequiredProperty(ConfigurationValue.S3_ARCHIVE_TO_GLACIER_TAG_VALUE);
          verify(configurationHelper).getRequiredProperty(ConfigurationValue.S3_ARCHIVE_TO_GLACIER_ROLE_ARN);
          verify(configurationHelper).getRequiredProperty(ConfigurationValue.S3_ARCHIVE_TO_GLACIER_ROLE_SESSION_NAME);
          verify(storageUnitDaoHelper).getStorageUnitEntity(STORAGE_NAME, businessObjectDataEntity);
          verify(s3KeyPrefixHelper).buildS3KeyPrefix(storageEntity, businessObjectFormatEntity, businessObjectDataKey);
          verify(storageFileHelper).getAndValidateStorageFiles(storageUnitEntity, S3_KEY_PREFIX, STORAGE_NAME, businessObjectDataKey);
          verify(storageUnitDaoHelper)
              .validateNoExplicitlyRegisteredSubPartitionInStorageForBusinessObjectData(storageEntity, businessObjectFormatEntity, businessObjectDataKey,
                  S3_KEY_PREFIX);
          verify(storageUnitDaoHelper).updateStorageUnitStatus(storageUnitEntity, StorageUnitStatusEntity.ARCHIVING, StorageUnitStatusEntity.ARCHIVING);
          verify(configurationHelper).getProperty(ConfigurationValue.S3_ENDPOINT);
          verifyNoMoreInteractionsHelper();
  
          // Validate the results.
          assertEquals(new StoragePolicyTransitionParamsDto(businessObjectDataKey, STORAGE_NAME, S3_ENDPOINT, S3_BUCKET_NAME, S3_KEY_PREFIX,
              StorageUnitStatusEntity.ARCHIVING, StorageUnitStatusEntity.ENABLED, storageFiles, S3_OBJECT_TAG_KEY, S3_OBJECT_TAG_VALUE, S3_OBJECT_TAGGER_ROLE_ARN,
              S3_OBJECT_TAGGER_ROLE_SESSION_NAME), storagePolicyTransitionParamsDto);
      }
test_case.class_method_signature: StoragePolicyProcessorHelperServiceImplTest.testInitiateStoragePolicyTransitionImpl()
test_case.full_signature: @Test public void testInitiateStoragePolicyTransitionImpl()
test_case.identifier: testInitiateStoragePolicyTransitionImpl
test_case.invocations: setCode setBusinessObjectFormat setStatus setName setStoragePlatform setName setCode setStorage setStoragePolicyTransitionType asList setCode setStorage setBusinessObjectData setStorageFiles setStatus asList thenReturn when getBusinessObjectDataEntity thenReturn when getStoragePolicyEntityByKeyAndVersion thenReturn when getProperty thenReturn when getBooleanStorageAttributeValueByName thenReturn when getProperty thenReturn when getBooleanStorageAttributeValueByName thenReturn when getProperty thenReturn when getStorageAttributeValueByName thenReturn when getRequiredProperty thenReturn when getRequiredProperty thenReturn when getRequiredProperty thenReturn when getRequiredProperty thenReturn when getStorageUnitEntity thenReturn when buildS3KeyPrefix thenReturn when getAndValidateStorageFiles updateStorageUnitStatus when doAnswer getArguments setCode getArguments setStatus thenReturn when getProperty initiateStoragePolicyTransitionImpl validateBusinessObjectDataKey verify validateStoragePolicyKey verify getBusinessObjectDataEntity verify businessObjectDataKeyToString verify times getStoragePolicyEntityByKeyAndVersion verify storagePolicyKeyAndVersionToString verify times getProperty verify getBooleanStorageAttributeValueByName verify getProperty verify getBooleanStorageAttributeValueByName verify getProperty verify getStorageAttributeValueByName verify getRequiredProperty verify getRequiredProperty verify getRequiredProperty verify getRequiredProperty verify getStorageUnitEntity verify buildS3KeyPrefix verify getAndValidateStorageFiles verify validateNoExplicitlyRegisteredSubPartitionInStorageForBusinessObjectData verify updateStorageUnitStatus verify getProperty verify verifyNoMoreInteractionsHelper assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInitiateStoragePolicyTransitionImpl()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(StoragePolicyProcessorHelperServiceImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(StoragePolicyProcessorHelperServiceImpl.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: businessObjectDataDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private BusinessObjectDataDaoHelper businessObjectDataDaoHelper;
focal_class.type: BusinessObjectDataDaoHelper
focal_class.var_name: businessObjectDataDaoHelper
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: configurationHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ConfigurationHelper configurationHelper;
focal_class.type: ConfigurationHelper
focal_class.var_name: configurationHelper
focal_class.declarator: jsonHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private JsonHelper jsonHelper;
focal_class.type: JsonHelper
focal_class.var_name: jsonHelper
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: s3Service
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private S3Service s3Service;
focal_class.type: S3Service
focal_class.var_name: s3Service
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: storagePolicyDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StoragePolicyDaoHelper storagePolicyDaoHelper;
focal_class.type: StoragePolicyDaoHelper
focal_class.var_name: storagePolicyDaoHelper
focal_class.declarator: storagePolicyHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StoragePolicyHelper storagePolicyHelper;
focal_class.type: StoragePolicyHelper
focal_class.var_name: storagePolicyHelper
focal_class.declarator: storageUnitDao
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitDao storageUnitDao;
focal_class.type: StorageUnitDao
focal_class.var_name: storageUnitDao
focal_class.declarator: storageUnitDaoHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitDaoHelper storageUnitDaoHelper;
focal_class.type: StorageUnitDaoHelper
focal_class.var_name: storageUnitDaoHelper
focal_class.declarator: storageUnitHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private StorageUnitHelper storageUnitHelper;
focal_class.type: StorageUnitHelper
focal_class.var_name: storageUnitHelper
focal_class.file: herd-code/herd-service/src/main/java/org/finra/herd/service/impl/StoragePolicyProcessorHelperServiceImpl.java
focal_class.identifier: StoragePolicyProcessorHelperServiceImpl
focal_class.interfaces: implements StoragePolicyProcessorHelperService
focal_class.class_method_signature: StoragePolicyProcessorHelperServiceImpl.initiateStoragePolicyTransition(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)
focal_class.full_signature: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public void initiateStoragePolicyTransition(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)
focal_class.identifier: initiateStoragePolicyTransition
focal_class.modifiers: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_class.parameters: (StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)
focal_class.return: void
focal_class.signature: void initiateStoragePolicyTransition(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)
focal_class.class_method_signature: StoragePolicyProcessorHelperServiceImpl.initiateStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)
focal_class.full_signature: protected void initiateStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)
focal_class.identifier: initiateStoragePolicyTransitionImpl
focal_class.modifiers: protected
focal_class.parameters: (StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)
focal_class.return: void
focal_class.signature: void initiateStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)
focal_class.class_method_signature: StoragePolicyProcessorHelperServiceImpl.validateStoragePolicySelection(StoragePolicySelection storagePolicySelection)
focal_class.full_signature: private void validateStoragePolicySelection(StoragePolicySelection storagePolicySelection)
focal_class.identifier: validateStoragePolicySelection
focal_class.modifiers: private
focal_class.parameters: (StoragePolicySelection storagePolicySelection)
focal_class.return: void
focal_class.signature: void validateStoragePolicySelection(StoragePolicySelection storagePolicySelection)
focal_class.class_method_signature: StoragePolicyProcessorHelperServiceImpl.validateBusinessObjectData(BusinessObjectDataEntity businessObjectDataEntity, BusinessObjectDataKey businessObjectDataKey)
focal_class.full_signature: private void validateBusinessObjectData(BusinessObjectDataEntity businessObjectDataEntity, BusinessObjectDataKey businessObjectDataKey)
focal_class.identifier: validateBusinessObjectData
focal_class.modifiers: private
focal_class.parameters: (BusinessObjectDataEntity businessObjectDataEntity, BusinessObjectDataKey businessObjectDataKey)
focal_class.return: void
focal_class.signature: void validateBusinessObjectData(BusinessObjectDataEntity businessObjectDataEntity, BusinessObjectDataKey businessObjectDataKey)
focal_class.class_method_signature: StoragePolicyProcessorHelperServiceImpl.validateStorage(StorageEntity storageEntity, StoragePolicyKey storagePolicyKey, Integer storagePolicyVersion)
focal_class.full_signature: private void validateStorage(StorageEntity storageEntity, StoragePolicyKey storagePolicyKey, Integer storagePolicyVersion)
focal_class.identifier: validateStorage
focal_class.modifiers: private
focal_class.parameters: (StorageEntity storageEntity, StoragePolicyKey storagePolicyKey, Integer storagePolicyVersion)
focal_class.return: void
focal_class.signature: void validateStorage(StorageEntity storageEntity, StoragePolicyKey storagePolicyKey, Integer storagePolicyVersion)
focal_class.class_method_signature: StoragePolicyProcessorHelperServiceImpl.validateStorageUnit(StorageUnitEntity storageUnitEntity, String storageName, BusinessObjectDataKey businessObjectDataKey)
focal_class.full_signature: private void validateStorageUnit(StorageUnitEntity storageUnitEntity, String storageName, BusinessObjectDataKey businessObjectDataKey)
focal_class.identifier: validateStorageUnit
focal_class.modifiers: private
focal_class.parameters: (StorageUnitEntity storageUnitEntity, String storageName, BusinessObjectDataKey businessObjectDataKey)
focal_class.return: void
focal_class.signature: void validateStorageUnit(StorageUnitEntity storageUnitEntity, String storageName, BusinessObjectDataKey businessObjectDataKey)
focal_class.class_method_signature: StoragePolicyProcessorHelperServiceImpl.executeStoragePolicyTransition(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.full_signature: @Override @Transactional(propagation = Propagation.NOT_SUPPORTED) public void executeStoragePolicyTransition(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.identifier: executeStoragePolicyTransition
focal_class.modifiers: @Override @Transactional(propagation = Propagation.NOT_SUPPORTED) public
focal_class.parameters: (StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.return: void
focal_class.signature: void executeStoragePolicyTransition(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.class_method_signature: StoragePolicyProcessorHelperServiceImpl.executeStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.full_signature: protected void executeStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.identifier: executeStoragePolicyTransitionImpl
focal_class.modifiers: protected
focal_class.parameters: (StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.return: void
focal_class.signature: void executeStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.class_method_signature: StoragePolicyProcessorHelperServiceImpl.completeStoragePolicyTransition(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.full_signature: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public void completeStoragePolicyTransition(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.identifier: completeStoragePolicyTransition
focal_class.modifiers: @PublishNotificationMessages @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_class.parameters: (StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.return: void
focal_class.signature: void completeStoragePolicyTransition(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.class_method_signature: StoragePolicyProcessorHelperServiceImpl.completeStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.full_signature: protected void completeStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.identifier: completeStoragePolicyTransitionImpl
focal_class.modifiers: protected
focal_class.parameters: (StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.return: void
focal_class.signature: void completeStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.class_method_signature: StoragePolicyProcessorHelperServiceImpl.updateStoragePolicyTransitionFailedAttemptsIgnoreException(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.full_signature: @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public void updateStoragePolicyTransitionFailedAttemptsIgnoreException(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.identifier: updateStoragePolicyTransitionFailedAttemptsIgnoreException
focal_class.modifiers: @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public
focal_class.parameters: (StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.return: void
focal_class.signature: void updateStoragePolicyTransitionFailedAttemptsIgnoreException(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.class_method_signature: StoragePolicyProcessorHelperServiceImpl.updateStoragePolicyTransitionFailedAttemptsIgnoreExceptionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.full_signature: protected void updateStoragePolicyTransitionFailedAttemptsIgnoreExceptionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.identifier: updateStoragePolicyTransitionFailedAttemptsIgnoreExceptionImpl
focal_class.modifiers: protected
focal_class.parameters: (StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_class.return: void
focal_class.signature: void updateStoragePolicyTransitionFailedAttemptsIgnoreExceptionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto)
focal_method.body: protected void initiateStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)
      {
          // Validate and trim the storage policy selection message content.
          validateStoragePolicySelection(storagePolicySelection);
  
          // Get the business object data and storage policy keys from the storage policy selection message.
          BusinessObjectDataKey businessObjectDataKey = storagePolicySelection.getBusinessObjectDataKey();
          StoragePolicyKey storagePolicyKey = storagePolicySelection.getStoragePolicyKey();
          Integer storagePolicyVersion = storagePolicySelection.getStoragePolicyVersion();
  
          // Retrieve the business object data entity and ensure it exists.
          BusinessObjectDataEntity businessObjectDataEntity = businessObjectDataDaoHelper.getBusinessObjectDataEntity(businessObjectDataKey);
  
          // Retrieve the storage policy and ensure it exists.
          StoragePolicyEntity storagePolicyEntity = storagePolicyDaoHelper.getStoragePolicyEntityByKeyAndVersion(storagePolicyKey, storagePolicyVersion);
  
          // Get the storage name.
          String storageName = storagePolicyEntity.getStorage().getName();
  
          // Initialize the storage policy transition parameters DTO by setting business object data key and storage name.
          storagePolicyTransitionParamsDto.setBusinessObjectDataKey(businessObjectDataKey);
          storagePolicyTransitionParamsDto.setStorageName(storageName);
  
          // Validate the business object data.
          validateBusinessObjectData(businessObjectDataEntity, businessObjectDataKey);
  
          // Validate the storage.
          validateStorage(storagePolicyEntity.getStorage(), storagePolicyKey, storagePolicyVersion);
  
          // Validate that storage policy filter storage has S3 bucket name configured.
          // Please note that since S3 bucket name attribute value is required we pass a "true" flag.
          String s3BucketName = storageHelper
              .getStorageAttributeValueByName(configurationHelper.getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_BUCKET_NAME), storagePolicyEntity.getStorage(),
                  true);
  
          // Validate that storage policy transition type is GLACIER.
          Assert.isTrue(StoragePolicyTransitionTypeEntity.GLACIER.equals(storagePolicyEntity.getStoragePolicyTransitionType().getCode()), String
              .format("Storage policy transition type \"%s\" is not supported. Storage policy: {%s}",
                  storagePolicyEntity.getStoragePolicyTransitionType().getCode(),
                  storagePolicyHelper.storagePolicyKeyAndVersionToString(storagePolicyKey, storagePolicyVersion)));
  
          // Get the S3 object tag key to be used to tag the objects for archiving.
          String s3ObjectTagKey = configurationHelper.getRequiredProperty(ConfigurationValue.S3_ARCHIVE_TO_GLACIER_TAG_KEY);
  
          // Get the S3 object tag value to be used to tag S3 objects for archiving to Glacier.
          String s3ObjectTagValue = configurationHelper.getRequiredProperty(ConfigurationValue.S3_ARCHIVE_TO_GLACIER_TAG_VALUE);
  
          // Get the ARN of the role to assume to tag S3 objects for archiving to Glacier.
          String s3ObjectTaggerRoleArn = configurationHelper.getRequiredProperty(ConfigurationValue.S3_ARCHIVE_TO_GLACIER_ROLE_ARN);
  
          // Get the session identifier for the assumed role to be used to tag S3 objects for archiving to Glacier.
          String s3ObjectTaggerRoleSessionName = configurationHelper.getRequiredProperty(ConfigurationValue.S3_ARCHIVE_TO_GLACIER_ROLE_SESSION_NAME);
  
          // Retrieve the storage unit and ensure it exists.
          StorageUnitEntity storageUnitEntity = storageUnitDaoHelper.getStorageUnitEntity(storageName, businessObjectDataEntity);
  
          // Validate the storage unit.
          validateStorageUnit(storageUnitEntity, storageName, businessObjectDataKey);
  
          // Get S3 key prefix for this business object data.
          String s3KeyPrefix = s3KeyPrefixHelper
              .buildS3KeyPrefix(storagePolicyEntity.getStorage(), storageUnitEntity.getBusinessObjectData().getBusinessObjectFormat(), businessObjectDataKey);
  
          // Retrieve and validate storage files registered with the storage unit.
          List<StorageFile> storageFiles = storageFileHelper.getAndValidateStorageFiles(storageUnitEntity, s3KeyPrefix, storageName, businessObjectDataKey);
  
          // Validate that this storage does not have any other registered storage files that
          // start with the S3 key prefix, but belong to other business object data instances.
          storageUnitDaoHelper.validateNoExplicitlyRegisteredSubPartitionInStorageForBusinessObjectData(storageUnitEntity.getStorage(),
              businessObjectDataEntity.getBusinessObjectFormat(), businessObjectDataKey, s3KeyPrefix);
  
          // Update the storage unit status.
          String reason = StorageUnitStatusEntity.ARCHIVING;
          String oldStorageUnitStatus = storageUnitEntity.getStatus().getCode();
          storageUnitDaoHelper.updateStorageUnitStatus(storageUnitEntity, StorageUnitStatusEntity.ARCHIVING, reason);
  
          // Update the policy transition parameters DTO.
          storagePolicyTransitionParamsDto.setS3Endpoint(configurationHelper.getProperty(ConfigurationValue.S3_ENDPOINT));
          storagePolicyTransitionParamsDto.setS3BucketName(s3BucketName);
          storagePolicyTransitionParamsDto.setS3KeyPrefix(s3KeyPrefix);
          storagePolicyTransitionParamsDto.setNewStorageUnitStatus(storageUnitEntity.getStatus().getCode());
          storagePolicyTransitionParamsDto.setOldStorageUnitStatus(oldStorageUnitStatus);
          storagePolicyTransitionParamsDto.setStorageFiles(storageFiles);
          storagePolicyTransitionParamsDto.setS3ObjectTagKey(s3ObjectTagKey);
          storagePolicyTransitionParamsDto.setS3ObjectTagValue(s3ObjectTagValue);
          storagePolicyTransitionParamsDto.setS3ObjectTaggerRoleArn(s3ObjectTaggerRoleArn);
          storagePolicyTransitionParamsDto.setS3ObjectTaggerRoleSessionName(s3ObjectTaggerRoleSessionName);
      }
focal_method.class_method_signature: StoragePolicyProcessorHelperServiceImpl.initiateStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)
focal_method.full_signature: protected void initiateStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)
focal_method.identifier: initiateStoragePolicyTransitionImpl
focal_method.invocations: validateStoragePolicySelection getBusinessObjectDataKey getStoragePolicyKey getStoragePolicyVersion getBusinessObjectDataEntity getStoragePolicyEntityByKeyAndVersion getName getStorage setBusinessObjectDataKey setStorageName validateBusinessObjectData validateStorage getStorage getStorageAttributeValueByName getProperty getStorage isTrue equals getCode getStoragePolicyTransitionType format getCode getStoragePolicyTransitionType storagePolicyKeyAndVersionToString getRequiredProperty getRequiredProperty getRequiredProperty getRequiredProperty getStorageUnitEntity validateStorageUnit buildS3KeyPrefix getStorage getBusinessObjectFormat getBusinessObjectData getAndValidateStorageFiles validateNoExplicitlyRegisteredSubPartitionInStorageForBusinessObjectData getStorage getBusinessObjectFormat getCode getStatus updateStorageUnitStatus setS3Endpoint getProperty setS3BucketName setS3KeyPrefix setNewStorageUnitStatus getCode getStatus setOldStorageUnitStatus setStorageFiles setS3ObjectTagKey setS3ObjectTagValue setS3ObjectTaggerRoleArn setS3ObjectTaggerRoleSessionName
focal_method.modifiers: protected
focal_method.parameters: (StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)
focal_method.return: void
focal_method.signature: void initiateStoragePolicyTransitionImpl(StoragePolicyTransitionParamsDto storagePolicyTransitionParamsDto,
          StoragePolicySelection storagePolicySelection)