@NamespacePermission(fields = "#businessObjectDataKey?.namespace", permissions = NamespacePermissionEnum.READ) @Override public StorageUnitDownloadCredential getStorageUnitDownloadCredential(BusinessObjectDataKey businessObjectDataKey, String storageName) { StorageUnitDownloadCredential businessObjectDataDownloadCredential = new StorageUnitDownloadCredential(); businessObjectDataDownloadCredential.setAwsCredential(getBusinessObjectDataS3Credential(businessObjectDataKey, null, storageName, false)); return businessObjectDataDownloadCredential; }
@NamespacePermission(fields = "#businessObjectDataKey?.namespace", permissions = NamespacePermissionEnum.READ) @Override public StorageUnitDownloadCredential getStorageUnitDownloadCredential(BusinessObjectDataKey businessObjectDataKey, String storageName) { StorageUnitDownloadCredential businessObjectDataDownloadCredential = new StorageUnitDownloadCredential(); businessObjectDataDownloadCredential.setAwsCredential(getBusinessObjectDataS3Credential(businessObjectDataKey, null, storageName, false)); return businessObjectDataDownloadCredential; }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof StorageUnitDownloadCredential) { final StorageUnitDownloadCredential copy = ((StorageUnitDownloadCredential) draftCopy); { Boolean awsCredentialShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.awsCredential!= null)); if (awsCredentialShouldBeCopiedAndSet == Boolean.TRUE) { AwsCredential sourceAwsCredential; sourceAwsCredential = this.getAwsCredential(); AwsCredential copyAwsCredential = ((AwsCredential) strategy.copy(LocatorUtils.property(locator, "awsCredential", sourceAwsCredential), sourceAwsCredential, (this.awsCredential!= null))); copy.setAwsCredential(copyAwsCredential); } else { if (awsCredentialShouldBeCopiedAndSet == Boolean.FALSE) { copy.awsCredential = null; } } } } return draftCopy; }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof StorageUnitDownloadCredential) { final StorageUnitDownloadCredential copy = ((StorageUnitDownloadCredential) draftCopy); { Boolean awsCredentialShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.awsCredential!= null)); if (awsCredentialShouldBeCopiedAndSet == Boolean.TRUE) { AwsCredential sourceAwsCredential; sourceAwsCredential = this.getAwsCredential(); AwsCredential copyAwsCredential = ((AwsCredential) strategy.copy(LocatorUtils.property(locator, "awsCredential", sourceAwsCredential), sourceAwsCredential, (this.awsCredential!= null))); copy.setAwsCredential(copyAwsCredential); } else { if (awsCredentialShouldBeCopiedAndSet == Boolean.FALSE) { copy.awsCredential = null; } } } } return draftCopy; }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof StorageUnitDownloadCredential) { final StorageUnitDownloadCredential copy = ((StorageUnitDownloadCredential) draftCopy); { Boolean awsCredentialShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.awsCredential!= null)); if (awsCredentialShouldBeCopiedAndSet == Boolean.TRUE) { AwsCredential sourceAwsCredential; sourceAwsCredential = this.getAwsCredential(); AwsCredential copyAwsCredential = ((AwsCredential) strategy.copy(LocatorUtils.property(locator, "awsCredential", sourceAwsCredential), sourceAwsCredential, (this.awsCredential!= null))); copy.setAwsCredential(copyAwsCredential); } else { if (awsCredentialShouldBeCopiedAndSet == Boolean.FALSE) { copy.awsCredential = null; } } } } return draftCopy; }
private void getStorageUnitDownloadCredentialResponse(MockCloseableHttpResponse response, URI uri) throws UnsupportedCharsetException, JAXBException { StorageUnitDownloadCredential storageUnitDownloadCredential = new StorageUnitDownloadCredential(); AwsCredential awsCredential = new AwsCredential(); awsCredential.setAwsAccessKey(uri.toString()); storageUnitDownloadCredential.setAwsCredential(awsCredential); response.setEntity(getHttpEntity(storageUnitDownloadCredential)); } }