Package org.openstack4j.api.storage
Interface ObjectStorageContainerService
-
- All Superinterfaces:
RestService
- All Known Implementing Classes:
ObjectStorageContainerServiceImpl
public interface ObjectStorageContainerService extends RestService
Provides access to the OpenStack Object Storage (Swift) Container API features.- Author:
- Jeremy Unruh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ActionResponsecreate(String name)Creates a new container with the specifiednameActionResponsecreate(String name, CreateUpdateContainerOptions options)Creates a new container with the specifiednamewith optionsStringcreatePath(String containerName, String path)Creates a pseudo path aka directory for the specifiedcontainerNameActionResponsedelete(String name)Deletes an empty container with the specifiednamebooleandeleteMetadata(String name, Map<String,String> metadata)Deletes metadata items from the specified containernameMap<String,String>getMetadata(String name)Gets the Metadata for a given containerList<? extends SwiftContainer>list()Listing of all containers associated with the Account (max result size is 10,000);List<? extends SwiftContainer>list(ContainerListOptions options)Listing of all containers with the associated options used in the queryActionResponseupdate(String name, CreateUpdateContainerOptions options)Updates a container with the specifiednamewith optionsbooleanupdateMetadata(String name, Map<String,String> metadata)Creates or Updates metadata items for the specified containername
-
-
-
Method Detail
-
list
List<? extends SwiftContainer> list()
Listing of all containers associated with the Account (max result size is 10,000);- Returns:
- List of containers ordered by name
-
list
List<? extends SwiftContainer> list(ContainerListOptions options)
Listing of all containers with the associated options used in the query- Parameters:
options- the query based options- Returns:
- List of containers ordered by name
-
create
ActionResponse create(String name)
Creates a new container with the specifiedname- Parameters:
name- the name of the new container- Returns:
- the action response
-
createPath
String createPath(String containerName, String path)
Creates a pseudo path aka directory for the specifiedcontainerName- Parameters:
containerName- the name of the containerpath- the path to create- Returns:
- the ETAG checksum of the new path
-
create
ActionResponse create(String name, CreateUpdateContainerOptions options)
Creates a new container with the specifiednamewith options- Parameters:
name- the name of the new containeroptions- the options to use when creating a container- Returns:
- the action response
-
update
ActionResponse update(String name, CreateUpdateContainerOptions options)
Updates a container with the specifiednamewith options- Parameters:
name- the name of the container to updateoptions- the options to use when updating a containerthe- action response
-
delete
ActionResponse delete(String name)
Deletes an empty container with the specifiedname- Parameters:
name- the name of the container to delete- Returns:
- the action response (true if successfully deleted)
-
getMetadata
Map<String,String> getMetadata(String name)
Gets the Metadata for a given container- Parameters:
name- the container name- Returns:
- Map of key to value metadata
-
updateMetadata
boolean updateMetadata(String name, Map<String,String> metadata)
Creates or Updates metadata items for the specified containername- Parameters:
name- the name of the containermetadata- the metadata to create/update for this container- Returns:
- true if the create/update was successful, false if not
-
deleteMetadata
boolean deleteMetadata(String name, Map<String,String> metadata)
Deletes metadata items from the specified containername- Parameters:
name- the name of the containermetadata- the metadata items to remove from the container's metadata- Returns:
- true if the removal of items was successful, false if not
-
-