Class ObjectStorageObjectServiceImpl
- java.lang.Object
-
- org.openstack4j.openstack.internal.BaseOpenStackService
-
- org.openstack4j.openstack.storage.object.internal.BaseObjectStorageService
-
- org.openstack4j.openstack.storage.object.internal.ObjectStorageObjectServiceImpl
-
- All Implemented Interfaces:
ObjectStorageObjectService,RestService
public class ObjectStorageObjectServiceImpl extends BaseObjectStorageService implements ObjectStorageObjectService
A service responsible for maintaining directory and file objects within containers for an Object Service within OpenStack- 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 ObjectStorageObjectServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcopy(ObjectLocation source, ObjectLocation dest)Copies an object to another object in the object storeActionResponsedelete(String containerName, String name)Deletes an Object from the specified containerActionResponsedelete(ObjectLocation location)Deletes an Object from the specified containerActionResponsedelete(ObjectLocation location, ObjectDeleteOptions options)Deletes an Object from the specified containerDLPayloaddownload(String containerName, String name)Retrieves the Payload for the data backing the givencontainerNameandnameDLPayloaddownload(String containerName, String name, DownloadOptions options)Retrieves the Payload for the data backing the givencontainerNameandnameDLPayloaddownload(ObjectLocation location, DownloadOptions options)Retrieves the Payload for the data backing the givenlocationSwiftObjectget(String containerName, String name)Gets the specified object based on thecontainerNameandnameof the objectSwiftObjectget(ObjectLocation location)Gets the specified object based on the ObjectLocationlocationMap<String,String>getMetadata(String containerName, String name)Map<String,String>getMetadata(ObjectLocation location)Gets the metadata for the specified object locationList<? extends SwiftObject>list(String containerName)Lists all objects for the given container nameList<? extends SwiftObject>list(String containerName, ObjectListOptions options)Lists all objects for the given container name and list optionsStringput(String containerName, String name, Payload<?> payload)Adds/Updates a file to the specified containerStringput(String containerName, String name, Payload<?> payload, ObjectPutOptions options)Adds/Updates a file to the specified containerbooleanupdateMetadata(ObjectLocation location, Map<String,String> metadata)Creates or Updates the given metadata for the specified object location-
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 SwiftObject> list(String containerName)
Description copied from interface:ObjectStorageObjectServiceLists all objects for the given container name- Specified by:
listin interfaceObjectStorageObjectService- Parameters:
containerName- the container name- Returns:
- List of File objects including Directories
-
list
public List<? extends SwiftObject> list(String containerName, ObjectListOptions options)
Description copied from interface:ObjectStorageObjectServiceLists all objects for the given container name and list options- Specified by:
listin interfaceObjectStorageObjectService- Parameters:
containerName- the container nameoptions- additional filter based options- Returns:
- List of File objects including Directories
-
get
public SwiftObject get(ObjectLocation location)
Gets the specified object based on the ObjectLocationlocation- Specified by:
getin interfaceObjectStorageObjectService- Parameters:
location- the object location- Returns:
- SwiftObject or null if not found
-
get
public SwiftObject get(String containerName, String name)
Gets the specified object based on thecontainerNameandnameof the object- Specified by:
getin interfaceObjectStorageObjectService- Parameters:
containerName- the objects container namename- the name of the object- Returns:
- SwiftObject or null if not found
-
put
public String put(String containerName, String name, Payload<?> payload)
Adds/Updates a file to the specified container- Specified by:
putin interfaceObjectStorageObjectService- Parameters:
containerName- the container namename- the name of the filepayload- the file payload- Returns:
- the ETAG checksum
-
put
public String put(String containerName, String name, Payload<?> payload, ObjectPutOptions options)
Adds/Updates a file to the specified container- Specified by:
putin interfaceObjectStorageObjectService- Parameters:
containerName- the container namename- the name of the filepayload- the file payloadoptions- extended options to associate with this object- Returns:
- the ETAG checksum
-
delete
public ActionResponse delete(String containerName, String name)
Description copied from interface:ObjectStorageObjectServiceDeletes an Object from the specified container- Specified by:
deletein interfaceObjectStorageObjectService- Parameters:
containerName- the container namename- the name of the object (full path if directories are used)- Returns:
- the action response
-
delete
public ActionResponse delete(ObjectLocation location)
Description copied from interface:ObjectStorageObjectServiceDeletes an Object from the specified container- Specified by:
deletein interfaceObjectStorageObjectService- Parameters:
location- location containing container name and object name- Returns:
- the action response
-
delete
public ActionResponse delete(ObjectLocation location, ObjectDeleteOptions options)
Description copied from interface:ObjectStorageObjectServiceDeletes an Object from the specified container- Specified by:
deletein interfaceObjectStorageObjectService- Parameters:
location- location containing container name and object nameoptions- the deleting options- Returns:
- the action response
-
copy
public String copy(ObjectLocation source, ObjectLocation dest)
Copies an object to another object in the object store- Specified by:
copyin interfaceObjectStorageObjectService- Parameters:
source- the source container and object namedest- the destination container and object name- Returns:
- the ETAG checksum if successful
-
getMetadata
public Map<String,String> getMetadata(ObjectLocation location)
Description copied from interface:ObjectStorageObjectServiceGets the metadata for the specified object location- Specified by:
getMetadatain interfaceObjectStorageObjectService- Parameters:
location- the object location- Returns:
- Map of Key to Value metadata
-
getMetadata
public Map<String,String> getMetadata(String containerName, String name)
Description copied from interface:ObjectStorageObjectService- Specified by:
getMetadatain interfaceObjectStorageObjectService- Parameters:
containerName- the container namename- the object name- Returns:
- Map of Key to Value metadata
-
updateMetadata
public boolean updateMetadata(ObjectLocation location, Map<String,String> metadata)
Description copied from interface:ObjectStorageObjectServiceCreates or Updates the given metadata for the specified object location- Specified by:
updateMetadatain interfaceObjectStorageObjectService- Parameters:
location- the location of the object to create/update metadatametadata- the metadata- Returns:
- true if successful
-
download
public DLPayload download(String containerName, String name)
Description copied from interface:ObjectStorageObjectServiceRetrieves the Payload for the data backing the givencontainerNameandname- Specified by:
downloadin interfaceObjectStorageObjectService- Parameters:
containerName- the container namename- the object name- Returns:
- the download payload
-
download
public DLPayload download(String containerName, String name, DownloadOptions options)
Description copied from interface:ObjectStorageObjectServiceRetrieves the Payload for the data backing the givencontainerNameandname- Specified by:
downloadin interfaceObjectStorageObjectService- Parameters:
containerName- the container namename- the object nameoptions- the download options- Returns:
- the download payload
-
download
public DLPayload download(ObjectLocation location, DownloadOptions options)
Description copied from interface:ObjectStorageObjectServiceRetrieves the Payload for the data backing the givenlocation- Specified by:
downloadin interfaceObjectStorageObjectService- Parameters:
location- the object locationoptions- the download options- Returns:
- the download payload
-
-