public StorageObject prepareUploadObject() throws Exception { StorageObject newObject = ObjectUtils.createObjectForUpload( targetKey, file, md5HashOfFile, encryptionUtil, isGzipEnabled, null); if ("PUBLIC_READ".equalsIgnoreCase(aclString)) { newObject.setAcl(AccessControlList.REST_CANNED_PUBLIC_READ); } else if ("PUBLIC_READ_WRITE".equalsIgnoreCase(aclString)) { newObject.setAcl(AccessControlList.REST_CANNED_PUBLIC_READ_WRITE); } else if ("PRIVATE".equalsIgnoreCase(aclString)) { // Private is the default, no need to add an ACL } else { throw new Exception("Invalid value for ACL string: " + aclString); } // Apply custom metadata items to upload object. newObject.addAllMetadata(customMetadata); return newObject; }
public StorageObject prepareUploadObject() throws Exception { StorageObject newObject = ObjectUtils.createObjectForUpload( targetKey, file, md5HashOfFile, encryptionUtil, isGzipEnabled, null); if ("PUBLIC_READ".equalsIgnoreCase(aclString)) { newObject.setAcl(AccessControlList.REST_CANNED_PUBLIC_READ); } else if ("PUBLIC_READ_WRITE".equalsIgnoreCase(aclString)) { newObject.setAcl(AccessControlList.REST_CANNED_PUBLIC_READ_WRITE); } else if ("PRIVATE".equalsIgnoreCase(aclString)) { // Private is the default, no need to add an ACL } else { throw new Exception("Invalid value for ACL string: " + aclString); } // Apply custom metadata items to upload object. newObject.addAllMetadata(customMetadata); return newObject; }
public void run() { try { AccessControlList acl = storageService.getObjectAcl( bucketName, object.getKey()); object.setAcl(acl); result = object; } catch (RuntimeException e) { result = e; throw e; } catch (Exception e) { result = e; } }
public void run() { try { AccessControlList acl = storageService.getObjectAcl( bucketName, object.getKey()); object.setAcl(acl); result = object; } catch (RuntimeException e) { result = e; throw e; } catch (Exception e) { result = e; } }
new StorageObject(credentialObjectKey[0]); encryptedCredentialsObject.setDataInputStream(bais[0]); encryptedCredentialsObject.setAcl(AccessControlList.REST_CANNED_PUBLIC_READ);
new StorageObject(credentialObjectKey[0]); encryptedCredentialsObject.setDataInputStream(bais[0]); encryptedCredentialsObject.setAcl(AccessControlList.REST_CANNED_PUBLIC_READ);
log.warn(String.format("Ignore failure %s", e.getDetail())); target.setAcl(accessControlListFeature.convert(acl));