/** * Creates a bucket. * * <b>Caution:</b> Performing this operation unnecessarily when a bucket already * exists may cause OperationAborted errors with the message "A conflicting conditional * operation is currently in progress against this resource.". To avoid this error, use the * {@link #getOrCreateBucket(String)} in situations where the bucket may already exist. * * This method cannot be performed by anonymous services. * * @param bucketName * the name of the bucket to create. * @return * the created bucket object. <b>Note:</b> the object returned has minimal information about * the bucket that was created, including only the bucket's name. * @throws ServiceException */ public StorageBucket createBucket(String bucketName) throws ServiceException { return createBucketImpl(bucketName, null, null); }
/** * Creates a bucket. * * <b>Caution:</b> Performing this operation unnecessarily when a bucket already * exists may cause OperationAborted errors with the message "A conflicting conditional * operation is currently in progress against this resource.". To avoid this error, use the * {@link #getOrCreateBucket(String)} in situations where the bucket may already exist. * * This method cannot be performed by anonymous services. * * @param bucketName * the name of the bucket to create. * @return * the created bucket object. <b>Note:</b> the object returned has minimal information about * the bucket that was created, including only the bucket's name. * @throws ServiceException */ public StorageBucket createBucket(String bucketName) throws ServiceException { return createBucketImpl(bucketName, null, null); }
/** * Creates a bucket. * * <b>Implementation notes</b><p> * The implementing method must populate the bucket object's metadata with the results of the * operation before returning the object. It must also apply any <code>AccessControlList</code> * settings included with the bucket. * * @param bucketName * the name of the bucket to create. * @param location * the geographical location where the bucket will be stored (if applicable for the target * service). A null string value will cause the bucket to be stored in the default location. * @param acl * an access control object representing the initial acl values for the bucket. * May be null, in which case the default permissions are applied. * @return * the created bucket object, populated with all metadata made available by the creation operation. * @throws ServiceException */ protected StorageBucket createBucketImpl(String bucketName, String location, AccessControlList acl) throws ServiceException { return this.createBucketImpl(bucketName, location, acl, Collections.<String, Object>emptyMap()); }
/** * Creates a bucket. * * <b>Implementation notes</b><p> * The implementing method must populate the bucket object's metadata with the results of the * operation before returning the object. It must also apply any <code>AccessControlList</code> * settings included with the bucket. * * @param bucketName * the name of the bucket to create. * @param location * the geographical location where the bucket will be stored (if applicable for the target * service). A null string value will cause the bucket to be stored in the default location. * @param acl * an access control object representing the initial acl values for the bucket. * May be null, in which case the default permissions are applied. * @return * the created bucket object, populated with all metadata made available by the creation operation. * @throws ServiceException */ protected StorageBucket createBucketImpl(String bucketName, String location, AccessControlList acl) throws ServiceException { return this.createBucketImpl(bucketName, location, acl, Collections.<String, Object>emptyMap()); }
/** * Create a bucket with the Access Control List settings of the bucket object (if any). * <p> * <b>Caution:</b> Performing this operation unnecessarily when a bucket already * exists may cause OperationAborted errors with the message "A conflicting conditional * operation is currently in progress against this resource.". To avoid this error, use the * {@link #getOrCreateBucket(String)} in situations where the bucket may already exist. * <p> * This method cannot be performed by anonymous services. * * @param bucket * the bucket to create, including optional ACL settings. * @return * the created bucket object. <b>Note:</b> the object returned has minimal information about * the bucket that was created, including only the bucket's name. * @throws ServiceException */ public StorageBucket createBucket(StorageBucket bucket) throws ServiceException { return createBucketImpl(bucket.getName(), bucket.getLocation(), bucket.getAcl()); }
/** * Create a bucket with the Access Control List settings of the bucket object (if any). * <p> * <b>Caution:</b> Performing this operation unnecessarily when a bucket already * exists may cause OperationAborted errors with the message "A conflicting conditional * operation is currently in progress against this resource.". To avoid this error, use the * {@link #getOrCreateBucket(String)} in situations where the bucket may already exist. * <p> * This method cannot be performed by anonymous services. * * @param bucket * the bucket to create, including optional ACL settings. * @return * the created bucket object. <b>Note:</b> the object returned has minimal information about * the bucket that was created, including only the bucket's name. * @throws ServiceException */ public StorageBucket createBucket(StorageBucket bucket) throws ServiceException { return createBucketImpl(bucket.getName(), bucket.getLocation(), bucket.getAcl()); }