/** * Gets a new storage object with the specified information. * * @param storageName the storage name. * * @return the newly created storage. */ private Storage getNewStorage(String storageName) { Storage storage = new Storage(); storage.setName(storageName); storage.setStoragePlatformName(StoragePlatformEntity.S3); List<Attribute> attributes = new ArrayList<>(); attributes.add(new Attribute(configurationHelper.getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_BUCKET_NAME), "testBucket")); /* * Set the KMS key attribute if the storage name contains ignore case the word "KMS" (ex. S3_MANAGED_KMS) */ if (storageName.toLowerCase().contains("kms")) { attributes.add(new Attribute(configurationHelper.getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_KMS_KEY_ID), "testKmsKeyId")); } storage.setAttributes(attributes); return storage; }
storage.setStoragePlatformName(storageEntity.getStoragePlatform().getName());
storage.setStoragePlatformName(storageEntity.getStoragePlatform().getName());
sourceStoragePlatformName = this.getStoragePlatformName(); String copyStoragePlatformName = ((String) strategy.copy(LocatorUtils.property(locator, "storagePlatformName", sourceStoragePlatformName), sourceStoragePlatformName, (this.storagePlatformName!= null))); copy.setStoragePlatformName(copyStoragePlatformName); } else { if (storagePlatformNameShouldBeCopiedAndSet == Boolean.FALSE) {
sourceStoragePlatformName = this.getStoragePlatformName(); String copyStoragePlatformName = ((String) strategy.copy(LocatorUtils.property(locator, "storagePlatformName", sourceStoragePlatformName), sourceStoragePlatformName, (this.storagePlatformName!= null))); copy.setStoragePlatformName(copyStoragePlatformName); } else { if (storagePlatformNameShouldBeCopiedAndSet == Boolean.FALSE) {
sourceStoragePlatformName = this.getStoragePlatformName(); String copyStoragePlatformName = ((String) strategy.copy(LocatorUtils.property(locator, "storagePlatformName", sourceStoragePlatformName), sourceStoragePlatformName, (this.storagePlatformName!= null))); copy.setStoragePlatformName(copyStoragePlatformName); } else { if (storagePlatformNameShouldBeCopiedAndSet == Boolean.FALSE) {