/** * Expires a restored S3 storage unit. * * @param storageUnitKey the storage unit key */ protected void expireS3StorageUnitImpl(BusinessObjectDataStorageUnitKey storageUnitKey) { // Build the business object data restore DTO. BusinessObjectDataRestoreDto businessObjectDataRestoreDto = expireRestoredBusinessObjectDataHelperService.prepareToExpireStorageUnit(storageUnitKey); // Create storage unit notification for the storage unit. notificationEventService.processStorageUnitNotificationEventAsync(NotificationEventTypeEntity.EventTypesStorageUnit.STRGE_UNIT_STTS_CHG, businessObjectDataRestoreDto.getBusinessObjectDataKey(), businessObjectDataRestoreDto.getStorageName(), businessObjectDataRestoreDto.getNewStorageUnitStatus(), businessObjectDataRestoreDto.getOldStorageUnitStatus()); // Execute the S3 specific steps required to expire business object data. expireRestoredBusinessObjectDataHelperService.executeS3SpecificSteps(businessObjectDataRestoreDto); // Execute the after step. expireRestoredBusinessObjectDataHelperService.completeStorageUnitExpiration(businessObjectDataRestoreDto); // Create storage unit notification for the storage unit. notificationEventService.processStorageUnitNotificationEventAsync(NotificationEventTypeEntity.EventTypesStorageUnit.STRGE_UNIT_STTS_CHG, businessObjectDataRestoreDto.getBusinessObjectDataKey(), businessObjectDataRestoreDto.getStorageName(), businessObjectDataRestoreDto.getNewStorageUnitStatus(), businessObjectDataRestoreDto.getOldStorageUnitStatus()); }
/** * Expires a restored S3 storage unit. * * @param storageUnitKey the storage unit key */ protected void expireS3StorageUnitImpl(BusinessObjectDataStorageUnitKey storageUnitKey) { // Build the business object data restore DTO. BusinessObjectDataRestoreDto businessObjectDataRestoreDto = expireRestoredBusinessObjectDataHelperService.prepareToExpireStorageUnit(storageUnitKey); // Create storage unit notification for the storage unit. notificationEventService.processStorageUnitNotificationEventAsync(NotificationEventTypeEntity.EventTypesStorageUnit.STRGE_UNIT_STTS_CHG, businessObjectDataRestoreDto.getBusinessObjectDataKey(), businessObjectDataRestoreDto.getStorageName(), businessObjectDataRestoreDto.getNewStorageUnitStatus(), businessObjectDataRestoreDto.getOldStorageUnitStatus()); // Execute the S3 specific steps required to expire business object data. expireRestoredBusinessObjectDataHelperService.executeS3SpecificSteps(businessObjectDataRestoreDto); // Execute the after step. expireRestoredBusinessObjectDataHelperService.completeStorageUnitExpiration(businessObjectDataRestoreDto); // Create storage unit notification for the storage unit. notificationEventService.processStorageUnitNotificationEventAsync(NotificationEventTypeEntity.EventTypesStorageUnit.STRGE_UNIT_STTS_CHG, businessObjectDataRestoreDto.getBusinessObjectDataKey(), businessObjectDataRestoreDto.getStorageName(), businessObjectDataRestoreDto.getNewStorageUnitStatus(), businessObjectDataRestoreDto.getOldStorageUnitStatus()); }
/** * Finalizes restore of an S3 storage unit. * * @param storageUnitKey the storage unit key */ protected void finalizeRestoreImpl(BusinessObjectDataStorageUnitKey storageUnitKey) { // Build the business object data restore DTO. BusinessObjectDataRestoreDto businessObjectDataRestoreDto = businessObjectDataFinalizeRestoreHelperService.prepareToFinalizeRestore(storageUnitKey); // Execute the S3 specific steps required to finalize the business object data restore. businessObjectDataFinalizeRestoreHelperService.executeS3SpecificSteps(businessObjectDataRestoreDto); // Execute the after step regardless if the above step failed or not. Please note that the after step returns true on success and false otherwise. businessObjectDataFinalizeRestoreHelperService.completeFinalizeRestore(businessObjectDataRestoreDto); // Create storage unit notification for the origin storage unit. notificationEventService.processStorageUnitNotificationEventAsync(NotificationEventTypeEntity.EventTypesStorageUnit.STRGE_UNIT_STTS_CHG, businessObjectDataRestoreDto.getBusinessObjectDataKey(), businessObjectDataRestoreDto.getStorageName(), businessObjectDataRestoreDto.getNewStorageUnitStatus(), businessObjectDataRestoreDto.getOldStorageUnitStatus()); }
/** * Finalizes restore of an S3 storage unit. * * @param storageUnitKey the storage unit key */ protected void finalizeRestoreImpl(BusinessObjectDataStorageUnitKey storageUnitKey) { // Build the business object data restore DTO. BusinessObjectDataRestoreDto businessObjectDataRestoreDto = businessObjectDataFinalizeRestoreHelperService.prepareToFinalizeRestore(storageUnitKey); // Execute the S3 specific steps required to finalize the business object data restore. businessObjectDataFinalizeRestoreHelperService.executeS3SpecificSteps(businessObjectDataRestoreDto); // Execute the after step regardless if the above step failed or not. Please note that the after step returns true on success and false otherwise. businessObjectDataFinalizeRestoreHelperService.completeFinalizeRestore(businessObjectDataRestoreDto); // Create storage unit notification for the origin storage unit. notificationEventService.processStorageUnitNotificationEventAsync(NotificationEventTypeEntity.EventTypesStorageUnit.STRGE_UNIT_STTS_CHG, businessObjectDataRestoreDto.getBusinessObjectDataKey(), businessObjectDataRestoreDto.getStorageName(), businessObjectDataRestoreDto.getNewStorageUnitStatus(), businessObjectDataRestoreDto.getOldStorageUnitStatus()); }
businessObjectDataRestoreDto.getNewStorageUnitStatus(), businessObjectDataRestoreDto.getOldStorageUnitStatus()); businessObjectDataRestoreDto.getNewStorageUnitStatus(), businessObjectDataRestoreDto.getOldStorageUnitStatus());
businessObjectDataRestoreDto.getNewStorageUnitStatus(), businessObjectDataRestoreDto.getOldStorageUnitStatus()); businessObjectDataRestoreDto.getNewStorageUnitStatus(), businessObjectDataRestoreDto.getOldStorageUnitStatus());
theNewStorageUnitStatus = this.getNewStorageUnitStatus(); strategy.appendField(locator, this, "newStorageUnitStatus", buffer, theNewStorageUnitStatus, (this.newStorageUnitStatus!= null));
assertEquals(StorageUnitStatusEntity.RESTORED, businessObjectDataRestoreDto.getNewStorageUnitStatus()); assertEquals(StorageUnitStatusEntity.RESTORING, businessObjectDataRestoreDto.getOldStorageUnitStatus());
assertEquals(StorageUnitStatusEntity.ARCHIVED, businessObjectDataRestoreDto.getNewStorageUnitStatus()); assertEquals(StorageUnitStatusEntity.EXPIRING, businessObjectDataRestoreDto.getOldStorageUnitStatus());
lhsNewStorageUnitStatus = this.getNewStorageUnitStatus(); String rhsNewStorageUnitStatus; rhsNewStorageUnitStatus = that.getNewStorageUnitStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "newStorageUnitStatus", lhsNewStorageUnitStatus), LocatorUtils.property(thatLocator, "newStorageUnitStatus", rhsNewStorageUnitStatus), lhsNewStorageUnitStatus, rhsNewStorageUnitStatus, (this.newStorageUnitStatus!= null), (that.newStorageUnitStatus!= null))) { return false;
theNewStorageUnitStatus = this.getNewStorageUnitStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "newStorageUnitStatus", theNewStorageUnitStatus), currentHashCode, theNewStorageUnitStatus, (this.newStorageUnitStatus!= null));
if (newStorageUnitStatusShouldBeCopiedAndSet == Boolean.TRUE) { String sourceNewStorageUnitStatus; sourceNewStorageUnitStatus = this.getNewStorageUnitStatus(); String copyNewStorageUnitStatus = ((String) strategy.copy(LocatorUtils.property(locator, "newStorageUnitStatus", sourceNewStorageUnitStatus), sourceNewStorageUnitStatus, (this.newStorageUnitStatus!= null))); copy.setNewStorageUnitStatus(copyNewStorageUnitStatus);