public interface ObjectApi
Modifier and Type | Method and Description |
---|---|
boolean |
copy(String destinationObject,
String sourceContainer,
String sourceObject)
Copies an object from one container to another.
|
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 . |
SwiftObject |
head(String objectName)
Deprecated.
Please use
getWithoutBody(String) as this method will be removed in jclouds 1.8. |
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 . |
String |
replace(String objectName,
Payload payload,
Map<String,String> metadata)
Deprecated.
Please use
put(String, Payload) or put(String, Payload, PutOptions)
as this method will be removed in jclouds 1.8. |
boolean |
updateMetadata(String objectName,
Map<String,String> metadata)
Creates or updates the metadata for a
SwiftObject . |
@Named(value="object:list") @Nullable ObjectList list()
ObjectList
of SwiftObject
ordered by name or null
.@Named(value="object:list") @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") String put(String objectName, Payload payload)
SwiftObject
.objectName
- corresponds to SwiftObject.getName()
.payload
- corresponds to SwiftObject.getPayload()
.SwiftObject.getETag()
of the object.@Named(value="object:put") String put(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") @Nullable SwiftObject getWithoutBody(String objectName)
SwiftObject
metadata without its body
.objectName
- corresponds to SwiftObject.getName()
.SwiftObject
or null
, if not found.@Named(value="object:get") @Nullable SwiftObject get(String objectName)
SwiftObject
including its body
.objectName
- corresponds to SwiftObject.getName()
.SwiftObject
or null
, if not found.@Named(value="object:get") @Nullable SwiftObject get(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") boolean updateMetadata(String objectName, Map<String,String> metadata)
SwiftObject
.objectName
- corresponds to SwiftObject.getName()
.metadata
- the metadata to create or update.true
if the metadata was successfully created or updated,
false
if not.@Named(value="object:deleteMetadata") boolean deleteMetadata(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") void delete(String objectName)
objectName
- corresponds to SwiftObject.getName()
.@Named(value="object:copy") boolean copy(String destinationObject, String sourceContainer, String sourceObject)
destinationObject
- the destination object name.sourceContainer
- the source container name.sourceObject
- the source object name.true
if the object was successfully copied, false
if not.CopyObjectException
- if the source or destination container do not exist.@Deprecated @Named(value="object:head") @Nullable SwiftObject head(String objectName)
getWithoutBody(String)
as this method will be removed in jclouds 1.8.SwiftObject
metadata without its body
.objectName
- corresponds to SwiftObject.getName()
.SwiftObject
or null
, if not found.@Named(value="object:replace") String replace(String objectName, Payload payload, Map<String,String> metadata)
put(String, Payload)
or put(String, Payload, PutOptions)
as this method will be removed in jclouds 1.8.SwiftObject
.objectName
- corresponds to SwiftObject.getName()
.payload
- corresponds to SwiftObject.getPayload()
.metadata
- corresponds to SwiftObject.getMetadata()
.SwiftObject.getEtag()
of the object.Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.