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 a bucket. The ACL settings must be included * inside the bucket. * * This method can be performed by anonymous services, but can only succeed if the * bucket's existing ACL already allows write access by the anonymous user. * In general, you can only access the ACL of a bucket if the ACL already in place * for that bucket allows you to do so. * * @param bucket * a bucket with ACL settings to apply. * @throws ServiceException */ public void putBucketAcl(StorageBucket bucket) throws ServiceException { assertValidBucket(bucket, "Put Bucket Access Control List"); putBucketAcl(bucket.getName(), bucket.getAcl()); }
/** * Applies access control settings to a bucket. The ACL settings must be included * inside the bucket. * * This method can be performed by anonymous services, but can only succeed if the * bucket's existing ACL already allows write access by the anonymous user. * In general, you can only access the ACL of a bucket if the ACL already in place * for that bucket allows you to do so. * * @param bucket * a bucket with ACL settings to apply. * @throws ServiceException */ public void putBucketAcl(StorageBucket bucket) throws ServiceException { assertValidBucket(bucket, "Put Bucket Access Control List"); putBucketAcl(bucket.getName(), bucket.getAcl()); }