Interface BucketApi
@Consumes("application/json")
public interface BucketApi
Provides access to Bucket entities via their REST API.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbucketExist(String bucketName) Check the existence of a bucketcreateBucket(String projectId, BucketTemplate bucketTemplate) Creates a new bucketcreateBucket(String projectId, BucketTemplate bucketTemplate, InsertBucketOptions options) Creates a new BucketbooleandeleteBucket(String bucketName) Permanently deletes an empty Bucket.If bucket is not empty 409 error to indicate the conflict.booleandeleteBucket(String bucketName, DeleteBucketOptions options) Permanently deletes an empty Bucket.If bucket is not empty 409 error to indicate the conflict.Returns metadata for the specified bucket.getBucket(String bucketName, GetBucketOptions options) Returns metadata for the specified bucketlistBucket(String projectId) Retrieves a list of buckets for a given projectlistBucket(String projectId, ListOptions options) Retrieves a list of buckets for a given projectpatchBucket(String bucketName, BucketTemplate bucketTemplate) Updates a bucket supporting patch semantics.patchBucket(String bucketName, BucketTemplate bucketTemplate, UpdateBucketOptions options) Updates a bucket supporting patch semantics.updateBucket(String bucketName, BucketTemplate bucketTemplate) Updates a bucketupdateBucket(String bucketName, BucketTemplate bucketTemplate, UpdateBucketOptions options) Updates a bucket
-
Method Details
-
bucketExist
@Named("Bucket:get") @GET @Path("/b/{bucket}") boolean bucketExist(@PathParam("bucket") String bucketName) Check the existence of a bucket- Parameters:
bucketName- Name of the bucket- Returns:
- a
Buckettrue if bucket exist
-
getBucket
@Named("Bucket:get") @GET @Produces("application/json") @Path("/b/{bucket}") @Nullable Bucket getBucket(@PathParam("bucket") String bucketName) Returns metadata for the specified bucket.- Parameters:
bucketName- Name of the bucket- Returns:
- a
Bucketresource
-
getBucket
@Named("Bucket:get") @GET @Produces("application/json") @Path("/b/{bucket}") @Nullable Bucket getBucket(@PathParam("bucket") String bucketName, GetBucketOptions options) Returns metadata for the specified bucket- Parameters:
bucketName- Name of the bucketoptions- SupplyGetBucketOptionswith optional query parameters- Returns:
- a
Bucketresource
-
createBucket
@Named("Bucket:insert") @POST @Path("/b") Bucket createBucket(@QueryParam("project") String projectId, BucketTemplate bucketTemplate) Creates a new bucket- Parameters:
projectId- A valid API project identifierbucketTemplate- supply aBucketTemplateresource- Returns:
- If successful, this method returns a
Bucketresource.
-
createBucket
@Named("Bucket:insert") @POST @Path("/b") Bucket createBucket(@QueryParam("project") String projectId, BucketTemplate bucketTemplate, InsertBucketOptions options) Creates a new Bucket- Parameters:
projectId- A valid API project identifierbucketTemplate- Supply aBucketTemplateresourceoptions- SupplyInsertBucketOptionswith optional query parameters- Returns:
- If successful, this method returns a
Bucketresource.
-
deleteBucket
@Named("Bucket:delete") @DELETE @Path("/b/{bucket}") boolean deleteBucket(@PathParam("bucket") String bucketName) Permanently deletes an empty Bucket.If bucket is not empty 409 error to indicate the conflict.- Parameters:
bucketName- Name of the bucket
-
deleteBucket
@Named("Bucket:delete") @DELETE @Path("/b/{bucket}") boolean deleteBucket(@PathParam("bucket") String bucketName, DeleteBucketOptions options) Permanently deletes an empty Bucket.If bucket is not empty 409 error to indicate the conflict.- Parameters:
bucketName- Name of the bucketoptions- SupplyDeleteBucketOptionswith optional query parameters
-
listBucket
@Named("Bucket:list") @GET @Produces("application/json") @Path("/b") ListPage<Bucket> listBucket(@QueryParam("project") String projectId) Retrieves a list of buckets for a given project -
listBucket
@Named("Bucket:list") @GET @Produces("application/json") @Path("/b") ListPage<Bucket> listBucket(@QueryParam("project") String projectId, ListOptions options) Retrieves a list of buckets for a given project- Parameters:
projectId- A valid API project identifieroptions- SupplyListOptionswith optional query parameters
-
updateBucket
@Named("Bucket:update") @PUT @Produces("application/json") @Path("/b/{bucket}") Bucket updateBucket(@PathParam("bucket") String bucketName, BucketTemplate bucketTemplate) Updates a bucket- Parameters:
bucketName- Name of the bucketbucketTemplate- Supply aBucketTemplateresource with list ofinvalid reference
BucketAccessControls- Returns:
- If successful, this method returns the updated
Bucketresource.
-
updateBucket
@Named("Bucket:update") @PUT @Produces("application/json") @Path("/b/{bucket}") Bucket updateBucket(@PathParam("bucket") String bucketName, BucketTemplate bucketTemplate, UpdateBucketOptions options) Updates a bucket- Parameters:
bucketName- Name of the bucketbucketTemplate- Supply aBucketTemplateresource with list ofinvalid reference
BucketAccessControlsoptions- SupplyUpdateBucketOptionswith optional query parameters- Returns:
- If successful,this method returns the updated
Bucketresource.
-
patchBucket
@Named("Bucket:patch") @Produces("application/json") @Path("/b/{bucket}") Bucket patchBucket(@PathParam("bucket") String bucketName, BucketTemplate bucketTemplate) Updates a bucket supporting patch semantics.- Parameters:
bucketName- Name of the bucketbucketTemplate- Supply aBucketTemplateresource with list ofinvalid reference
BucketAccessControls- Returns:
- If successful, this method returns the updated
Bucketresource. - See Also:
-
patchBucket
@Named("Bucket:patch") @Produces("application/json") @Path("/b/{bucket}") Bucket patchBucket(@PathParam("bucket") String bucketName, BucketTemplate bucketTemplate, UpdateBucketOptions options) Updates a bucket supporting patch semantics.- Parameters:
bucketName- Name of the bucketbucketTemplate- Supply aBucketTemplateresource with list ofinvalid reference
BucketAccessControlsoptions- SupplyUpdateBucketOptionswith optional query parameters- Returns:
- If successful, this method returns the updated
Bucketresource. - See Also:
-