@Beta
public interface ObjectApi
| Modifier and Type | Method and Description |
|---|---|
void |
copy(String destinationObject,
String sourceContainer,
String sourceObject)
Deprecated.
call copy(String, String, String, CopyOptions) instead
|
void |
copy(String destinationObject,
String sourceContainer,
String sourceObject,
CopyOptions options)
Copies an object from one container to another.
|
void |
copy(String destinationObject,
String sourceContainer,
String sourceObject,
Map<String,String> userMetadata,
Map<String,String> objectMetadata)
Deprecated.
call copy(String, String, String, Map, Map, CopyOptions) instead
|
void |
copy(String destinationObject,
String sourceContainer,
String sourceObject,
Map<String,String> userMetadata,
Map<String,String> objectMetadata,
CopyOptions options)
Copies an object from one container to another, replacing metadata.
|
void |
copyAppendMetadata(String destinationObject,
String sourceContainer,
String sourceObject,
Map<String,String> userMetadata,
Map<String,String> objectMetadata)
Deprecated.
call copyAppendMetadata(String, String, String, Map, Map, CopyOptions) instead
|
void |
copyAppendMetadata(String destinationObject,
String sourceContainer,
String sourceObject,
Map<String,String> userMetadata,
Map<String,String> objectMetadata,
CopyOptions options)
Copies an object from one container to another, appending metadata.
|
void |
delete(String objectName)
Deletes an object, if present.
|
boolean |
deleteMetadata(String objectName,
Map<String,String> metadata)
Deletes the metadata from a
SwiftObject. |
SwiftObject |
get(String objectName)
Gets the
SwiftObject including its body. |
SwiftObject |
get(String objectName,
GetOptions options)
Gets the
SwiftObject including its body. |
SwiftObject |
getWithoutBody(String objectName)
Gets the
SwiftObject metadata without its body. |
ObjectList |
list()
Lists up to 10,000 objects.
|
ObjectList |
list(ListContainerOptions options)
Lists up to 10,000 objects.
|
String |
put(String objectName,
Payload payload)
Creates or updates a
SwiftObject. |
String |
put(String objectName,
Payload payload,
PutOptions options)
Creates or updates a
SwiftObject. |
void |
updateHeaders(String objectName,
Map<String,String> metadata)
Creates or updates the metadata for a
SwiftObject without escaping the key. |
void |
updateMetadata(String objectName,
Map<String,String> metadata)
Creates or updates the metadata for a
SwiftObject. |
@Consumes(value="application/json") @Named(value="object:list") @GET @Nullable ObjectList list()
ObjectList of SwiftObject ordered by name or null.@Consumes(value="application/json") @Named(value="object:list") @GET @Nullable ObjectList list(ListContainerOptions options)
marker and endMarker parameters in the
ListContainerOptions class.options - the ListContainerOptions for controlling the returned list.ObjectList of SwiftObject ordered by name or null.@Named(value="object:put")
@PUT
@Path(value="/{objectName}")
String put(@PathParam(value="objectName")
String objectName,
Payload payload)
SwiftObject.objectName - corresponds to SwiftObject.getName().payload - corresponds to SwiftObject.getPayload().SwiftObject.getETag() of the object.@Named(value="object:put")
@PUT
@Path(value="/{objectName}")
String put(@PathParam(value="objectName")
String objectName,
Payload payload,
PutOptions options)
SwiftObject.objectName - corresponds to SwiftObject.getName().payload - corresponds to SwiftObject.getPayload().options - options to control creating the SwiftObject.SwiftObject.getETag() of the object.@Named(value="object:getWithoutBody")
@HEAD
@Path(value="/{objectName}")
@Nullable
SwiftObject getWithoutBody(@PathParam(value="objectName")
String objectName)
SwiftObject metadata without its body.objectName - corresponds to SwiftObject.getName().SwiftObject or null, if not found.@Named(value="object:get")
@GET
@Path(value="/{objectName}")
@Nullable
SwiftObject get(@PathParam(value="objectName")
String objectName)
SwiftObject including its body.objectName - corresponds to SwiftObject.getName().SwiftObject or null, if not found.@Named(value="object:get")
@GET
@Path(value="/{objectName}")
@Nullable
SwiftObject get(@PathParam(value="objectName")
String objectName,
GetOptions options)
SwiftObject including its body.objectName - corresponds to SwiftObject.getName().options - options to control the download.SwiftObject or null, if not found.@Named(value="object:updateMetadata")
@POST
@Path(value="/{objectName}")
@Produces(value="")
void updateMetadata(@PathParam(value="objectName")
String objectName,
Map<String,String> metadata)
SwiftObject.objectName - corresponds to SwiftObject.getName().metadata - the metadata to create or update.@Named(value="object:updateMetadata")
@POST
@Path(value="/{objectName}")
@Produces(value="")
void updateHeaders(@PathParam(value="objectName")
String objectName,
Map<String,String> metadata)
SwiftObject without escaping the key.
This will also update metadata such as content-disposition.objectName - corresponds to SwiftObject.getName().metadata - the metadata to create or update.@Named(value="object:deleteMetadata")
@POST
@Path(value="/{objectName}")
boolean deleteMetadata(@PathParam(value="objectName")
String objectName,
Map<String,String> metadata)
SwiftObject.objectName - corresponds to SwiftObject.getName().metadata - corresponds to SwiftObject.getMetadata().true if the metadata was successfully deleted,
false if not.@Named(value="object:delete")
@DELETE
@Path(value="/{objectName}")
void delete(@PathParam(value="objectName")
String objectName)
objectName - corresponds to SwiftObject.getName().@Deprecated @Named(value="object:copy") @PUT @Path(value="/{destinationObject}") void copy(@PathParam(value="destinationObject") String destinationObject, @PathParam(value="sourceContainer") String sourceContainer, @PathParam(value="sourceObject") String sourceObject)
destinationObject - the destination object name.sourceContainer - the source container name.sourceObject - the source object name.KeyNotFoundException - if the source or destination container do not exist.@Named(value="object:copy")
@PUT
@Path(value="/{destinationObject}")
void copy(@PathParam(value="destinationObject")
String destinationObject,
@PathParam(value="sourceContainer")
String sourceContainer,
@PathParam(value="sourceObject")
String sourceObject,
CopyOptions options)
destinationObject - the destination object name.sourceContainer - the source container name.sourceObject - the source object name.options - conditional copyKeyNotFoundException - if the source or destination container do not exist.@Deprecated @Named(value="object:copy") @PUT @Path(value="/{destinationObject}") void copy(@PathParam(value="destinationObject") String destinationObject, @PathParam(value="sourceContainer") String sourceContainer, @PathParam(value="sourceObject") String sourceObject, Map<String,String> userMetadata, Map<String,String> objectMetadata)
destinationObject - the destination object name.sourceContainer - the source container name.sourceObject - the source object name.userMetadata - Freeform metadata for the object, automatically prefixed/escapedobjectMetadata - Unprefixed/unescaped metadata, such as Content-DispositionKeyNotFoundException - if the source or destination container do not exist.@Named(value="object:copy")
@PUT
@Path(value="/{destinationObject}")
void copy(@PathParam(value="destinationObject")
String destinationObject,
@PathParam(value="sourceContainer")
String sourceContainer,
@PathParam(value="sourceObject")
String sourceObject,
Map<String,String> userMetadata,
Map<String,String> objectMetadata,
CopyOptions options)
destinationObject - the destination object name.sourceContainer - the source container name.sourceObject - the source object name.userMetadata - Freeform metadata for the object, automatically prefixed/escapedobjectMetadata - Unprefixed/unescaped metadata, such as Content-Dispositionoptions - conditional copyKeyNotFoundException - if the source or destination container do not exist.@Deprecated @Named(value="object:copy") @PUT @Path(value="/{destinationObject}") void copyAppendMetadata(@PathParam(value="destinationObject") String destinationObject, @PathParam(value="sourceContainer") String sourceContainer, @PathParam(value="sourceObject") String sourceObject, Map<String,String> userMetadata, Map<String,String> objectMetadata)
destinationObject - the destination object name.sourceContainer - the source container name.sourceObject - the source object name.userMetadata - Freeform metadata for the object, automatically prefixed/escapedobjectMetadata - Unprefixed/unescaped metadata, such as Content-DispositionKeyNotFoundException - if the source or destination container do not exist.@Named(value="object:copy")
@PUT
@Path(value="/{destinationObject}")
void copyAppendMetadata(@PathParam(value="destinationObject")
String destinationObject,
@PathParam(value="sourceContainer")
String sourceContainer,
@PathParam(value="sourceObject")
String sourceObject,
Map<String,String> userMetadata,
Map<String,String> objectMetadata,
CopyOptions options)
destinationObject - the destination object name.sourceContainer - the source container name.sourceObject - the source object name.userMetadata - Freeform metadata for the object, automatically prefixed/escapedobjectMetadata - Unprefixed/unescaped metadata, such as Content-Dispositionoptions - conditional copyKeyNotFoundException - if the source or destination container do not exist.Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.