/** * 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());
theOldStorageUnitStatus = this.getOldStorageUnitStatus(); strategy.appendField(locator, this, "oldStorageUnitStatus", buffer, theOldStorageUnitStatus, (this.oldStorageUnitStatus!= null));
assertEquals(StorageUnitStatusEntity.RESTORING, businessObjectDataRestoreDto.getOldStorageUnitStatus());
assertEquals(StorageUnitStatusEntity.EXPIRING, businessObjectDataRestoreDto.getOldStorageUnitStatus());
lhsOldStorageUnitStatus = this.getOldStorageUnitStatus(); String rhsOldStorageUnitStatus; rhsOldStorageUnitStatus = that.getOldStorageUnitStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "oldStorageUnitStatus", lhsOldStorageUnitStatus), LocatorUtils.property(thatLocator, "oldStorageUnitStatus", rhsOldStorageUnitStatus), lhsOldStorageUnitStatus, rhsOldStorageUnitStatus, (this.oldStorageUnitStatus!= null), (that.oldStorageUnitStatus!= null))) { return false;
theOldStorageUnitStatus = this.getOldStorageUnitStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "oldStorageUnitStatus", theOldStorageUnitStatus), currentHashCode, theOldStorageUnitStatus, (this.oldStorageUnitStatus!= null));
if (oldStorageUnitStatusShouldBeCopiedAndSet == Boolean.TRUE) { String sourceOldStorageUnitStatus; sourceOldStorageUnitStatus = this.getOldStorageUnitStatus(); String copyOldStorageUnitStatus = ((String) strategy.copy(LocatorUtils.property(locator, "oldStorageUnitStatus", sourceOldStorageUnitStatus), sourceOldStorageUnitStatus, (this.oldStorageUnitStatus!= null))); copy.setOldStorageUnitStatus(copyOldStorageUnitStatus);