Interface BucketApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
bucketExist(String bucketName)
Check the existence of a bucketBucket
createBucket(String projectId, BucketTemplate bucketTemplate)
Creates a new bucketBucket
createBucket(String projectId, BucketTemplate bucketTemplate, InsertBucketOptions options)
Creates a new Bucketboolean
deleteBucket(String bucketName)
Permanently deletes an empty Bucket.If bucket is not empty 409 error to indicate the conflict.boolean
deleteBucket(String bucketName, DeleteBucketOptions options)
Permanently deletes an empty Bucket.If bucket is not empty 409 error to indicate the conflict.Bucket
getBucket(String bucketName)
Returns metadata for the specified bucket.Bucket
getBucket(String bucketName, GetBucketOptions options)
Returns metadata for the specified bucketListPage<Bucket>
listBucket(String projectId)
Retrieves a list of buckets for a given projectListPage<Bucket>
listBucket(String projectId, ListOptions options)
Retrieves a list of buckets for a given projectBucket
patchBucket(String bucketName, BucketTemplate bucketTemplate)
Updates a bucket supporting patch semantics.Bucket
patchBucket(String bucketName, BucketTemplate bucketTemplate, UpdateBucketOptions options)
Updates a bucket supporting patch semantics.Bucket
updateBucket(String bucketName, BucketTemplate bucketTemplate)
Updates a bucketBucket
updateBucket(String bucketName, BucketTemplate bucketTemplate, UpdateBucketOptions options)
Updates a bucket
-
-
-
Method Detail
-
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
Bucket
true 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
Bucket
resource
-
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
- SupplyGetBucketOptions
with optional query parameters- Returns:
- a
Bucket
resource
-
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 aBucketTemplate
resource- Returns:
- If successful, this method returns a
Bucket
resource.
-
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 aBucketTemplate
resourceoptions
- SupplyInsertBucketOptions
with optional query parameters- Returns:
- If successful, this method returns a
Bucket
resource.
-
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
- SupplyDeleteBucketOptions
with 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- Parameters:
projectId
- A valid API project identifier- Returns:
- a
ListPage
-
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
- SupplyListOptions
with 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 aBucketTemplate
resource with list ofBucketAccessControls
- Returns:
- If successful, this method returns the updated
Bucket
resource.
-
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 aBucketTemplate
resource with list ofBucketAccessControls
options
- SupplyUpdateBucketOptions
with optional query parameters- Returns:
- If successful,this method returns the updated
Bucket
resource.
-
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 aBucketTemplate
resource with list ofBucketAccessControls
- Returns:
- If successful, this method returns the updated
Bucket
resource. - 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 aBucketTemplate
resource with list ofBucketAccessControls
options
- SupplyUpdateBucketOptions
with optional query parameters- Returns:
- If successful, this method returns the updated
Bucket
resource. - See Also:
-
-