Class ObjectStorageContainerServiceImpl
- java.lang.Object
-
- org.openstack4j.openstack.internal.BaseOpenStackService
-
- org.openstack4j.openstack.storage.object.internal.BaseObjectStorageService
-
- org.openstack4j.openstack.storage.object.internal.ObjectStorageContainerServiceImpl
-
- All Implemented Interfaces:
ObjectStorageContainerService,RestService
public class ObjectStorageContainerServiceImpl extends BaseObjectStorageService implements ObjectStorageContainerService
Provides access to the OpenStack Object Storage (Swift) Container API features.- Author:
- Jeremy Unruh
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
BaseOpenStackService.Invocation<R>
-
-
Constructor Summary
Constructors Constructor Description ObjectStorageContainerServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete 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-
Methods inherited from class org.openstack4j.openstack.storage.object.internal.BaseObjectStorageService
isResponseSuccess, isResponseSuccess
-
Methods inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
delete, deleteWithResponse, get, getProvider, getServiceVersion, getWithResponse, getXOpenstackRequestId, head, patch, patchWithResponse, post, postWithResponse, put, putWithResponse, request, toList, uri
-
-
-
-
Method Detail
-
list
public List<? extends SwiftContainer> list()
Listing of all containers associated with the Account (max result size is 10,000);- Specified by:
listin interfaceObjectStorageContainerService- Returns:
- List of containers ordered by name
-
list
public List<? extends SwiftContainer> list(ContainerListOptions options)
Listing of all containers with the associated options used in the query- Specified by:
listin interfaceObjectStorageContainerService- Parameters:
options- the query based options- Returns:
- List of containers ordered by name
-
create
public ActionResponse create(String name)
Creates a new container with the specifiedname- Specified by:
createin interfaceObjectStorageContainerService- Parameters:
name- the name of the new container- Returns:
- the action response
-
create
public ActionResponse create(String name, CreateUpdateContainerOptions options)
Creates a new container with the specifiednamewith options- Specified by:
createin interfaceObjectStorageContainerService- Parameters:
name- the name of the new containeroptions- the options to use when creating a container- Returns:
- the action response
-
createPath
public String createPath(String containerName, String path)
Creates a pseudo path aka directory for the specifiedcontainerName- Specified by:
createPathin interfaceObjectStorageContainerService- Parameters:
containerName- the name of the containerpath- the path to create- Returns:
- the ETAG checksum of the new path
-
update
public ActionResponse update(String name, CreateUpdateContainerOptions options)
Updates a container with the specifiednamewith options- Specified by:
updatein interfaceObjectStorageContainerService- Parameters:
name- the name of the container to updateoptions- the options to use when updating a container
-
delete
public ActionResponse delete(String name)
Deletes an empty container with the specifiedname- Specified by:
deletein interfaceObjectStorageContainerService- Parameters:
name- the name of the container to delete- Returns:
- the action response (true if successfully deleted)
-
getMetadata
public Map<String,String> getMetadata(String name)
Gets the Metadata for a given container- Specified by:
getMetadatain interfaceObjectStorageContainerService- Parameters:
name- the container name- Returns:
- Map of key to value metadata
-
updateMetadata
public boolean updateMetadata(String name, Map<String,String> metadata)
Creates or Updates metadata items for the specified containername- Specified by:
updateMetadatain interfaceObjectStorageContainerService- 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
public boolean deleteMetadata(String name, Map<String,String> metadata)
Deletes metadata items from the specified containername- Specified by:
deleteMetadatain interfaceObjectStorageContainerService- 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
-
-