@Override protected StorageBucket newBucket() { return new GSBucket(); }
@Override public String toString() { return "GSBucket [name=" + getName() + "] Metadata=" + getMetadataMap(); }
System.out.println("Created test bucket: " + testBucket.getName()); System.out.println("Bucket '" + buckets[b].getName() + "' contains:"); GSObject[] objects = gsService.listObjects(buckets[b].getName()); GSBucket publicBucket = new GSBucket(publicBucketName); gsService.createBucket(publicBucketName); publicBucket.setAcl(bucketAcl); gsService.putBucketAcl(publicBucket);
/** * 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. * * @param bucket * a bucket with ACL settings to apply. * @throws ServiceException Service error */ public void putBucketAcl(GSBucket bucket) throws ServiceException { assertValidBucket(bucket, "Put Bucket Access Control List"); putBucketAcl(bucket.getName(), bucket.getAcl()); }
/** * List all buckets in a given project * @param projectId The ID of the project being listed * @return a list of {@link GSBucket} * @throws ServiceException Service error */ public GSBucket[] listAllBuckets(String projectId) throws ServiceException { assertAuthenticatedConnection("List all buckets"); StorageBucket[] buckets = listAllBucketsImpl(projectId); MxDelegate.getInstance().registerStorageBucketMBeans(buckets); return GSBucket.cast(buckets); }
System.out.println("Created test bucket: " + testBucket.getName()); System.out.println("Bucket '" + buckets[b].getName() + "' contains:"); GSObject[] objects = gsService.listObjects(buckets[b].getName()); GSBucket publicBucket = new GSBucket(publicBucketName); gsService.createBucket(publicBucketName); publicBucket.setAcl(bucketAcl); gsService.putBucketAcl(publicBucket);
/** * 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. * * @param bucket * a bucket with ACL settings to apply. * @throws ServiceException Service error */ public void putBucketAcl(GSBucket bucket) throws ServiceException { assertValidBucket(bucket, "Put Bucket Access Control List"); putBucketAcl(bucket.getName(), bucket.getAcl()); }
/** * List all buckets in a given project * @param projectId The ID of the project being listed * @return a list of {@link GSBucket} * @throws ServiceException Service error */ public GSBucket[] listAllBuckets(String projectId) throws ServiceException { assertAuthenticatedConnection("List all buckets"); StorageBucket[] buckets = listAllBucketsImpl(projectId); MxDelegate.getInstance().registerStorageBucketMBeans(buckets); return GSBucket.cast(buckets); }
@Override public String toString() { return "GSBucket [name=" + getName() + "] Metadata=" + getMetadataMap(); }
@Override protected StorageBucket newBucket() { return new GSBucket(); }
protected StorageBucket newBucket() { if (isGoogleStorageMode) { return new GSBucket(); } else { return new S3Bucket(); } }
protected StorageBucket newBucket() { if (isGoogleStorageMode) { return new GSBucket(); } else { return new S3Bucket(); } }