public void run() { try { if (object == null) { storageService.putBucketAcl(bucket); result = bucket; } else { storageService.putObjectAcl(bucketName, object); result = object; } } catch (RuntimeException e) { result = e; throw e; } catch (Exception e) { result = e; } }
public void run() { try { if (object == null) { storageService.putBucketAcl(bucket); result = bucket; } else { storageService.putObjectAcl(bucketName, object); result = object; } } catch (RuntimeException e) { result = e; throw e; } catch (Exception e) { result = e; } }
/** * Applies access control settings to an object. The ACL settings must be included * with the object. * * This method can be performed by anonymous services, but can only succeed if the * object's existing ACL already allows write access by the anonymous user. * In general, you can only access the ACL of an object if the ACL already in place * for that object allows you to do so. * * @param bucketName * the name of the bucket containing the object to modify. * @param object * the object with ACL settings that will be applied. * @throws ServiceException */ public void putObjectAcl(String bucketName, StorageObject object) throws ServiceException { assertValidObject(object, "Put Object Access Control List"); putObjectAcl(bucketName, object.getKey(), object.getAcl()); }
/** * Applies access control settings to an object. The ACL settings must be included * with the object. * * This method can be performed by anonymous services, but can only succeed if the * object's existing ACL already allows write access by the anonymous user. * In general, you can only access the ACL of an object if the ACL already in place * for that object allows you to do so. * * @param bucketName * the name of the bucket containing the object to modify. * @param object * the object with ACL settings that will be applied. * @throws ServiceException */ public void putObjectAcl(String bucketName, StorageObject object) throws ServiceException { assertValidObject(object, "Put Object Access Control List"); putObjectAcl(bucketName, object.getKey(), object.getAcl()); }