AtmosApi
instead@Deprecated
public interface EsuApi
Modifier and Type | Method and Description |
---|---|
ObjectId |
createObject(Acl acl,
MetadataList metadata,
byte[] data,
java.lang.String mimeType)
Deprecated.
Creates a new object in the cloud.
|
ObjectId |
createObject(Acl acl,
MetadataList metadata,
byte[] data,
java.lang.String mimeType,
Checksum checksum)
Deprecated.
Creates a new object in the cloud.
|
ObjectId |
createObjectFromSegment(Acl acl,
MetadataList metadata,
BufferSegment data,
java.lang.String mimeType)
Deprecated.
Creates a new object in the cloud using a BufferSegment.
|
ObjectId |
createObjectFromSegment(Acl acl,
MetadataList metadata,
BufferSegment data,
java.lang.String mimeType,
Checksum checksum)
Deprecated.
Creates a new object in the cloud using a BufferSegment.
|
ObjectId |
createObjectFromSegmentOnPath(ObjectPath path,
Acl acl,
MetadataList metadata,
BufferSegment data,
java.lang.String mimeType)
Deprecated.
Creates a new object in the cloud using a BufferSegment on the
given path.
|
ObjectId |
createObjectFromSegmentOnPath(ObjectPath path,
Acl acl,
MetadataList metadata,
BufferSegment data,
java.lang.String mimeType,
Checksum checksum)
Deprecated.
Creates a new object in the cloud using a BufferSegment on the
given path.
|
ObjectId |
createObjectFromStream(Acl acl,
MetadataList metadata,
java.io.InputStream data,
long length,
java.lang.String mimeType)
Deprecated.
Creates a new object in the cloud.
|
ObjectId |
createObjectFromStreamOnPath(ObjectPath path,
Acl acl,
MetadataList metadata,
java.io.InputStream data,
long length,
java.lang.String mimeType)
Deprecated.
Creates a new object in the cloud.
|
ObjectId |
createObjectOnPath(ObjectPath path,
Acl acl,
MetadataList metadata,
byte[] data,
java.lang.String mimeType)
Deprecated.
Creates a new object in the cloud on the specified path.
|
ObjectId |
createObjectOnPath(ObjectPath path,
Acl acl,
MetadataList metadata,
byte[] data,
java.lang.String mimeType,
Checksum checksum)
Deprecated.
Creates a new object in the cloud on the specified path.
|
ObjectId |
createObjectWithKey(java.lang.String keyPool,
java.lang.String key,
Acl acl,
MetadataList metadata,
byte[] data,
long length,
java.lang.String mimeType)
Deprecated.
Creates a new object in the cloud.
|
ObjectId |
createObjectWithKey(java.lang.String keyPool,
java.lang.String key,
Acl acl,
MetadataList metadata,
byte[] data,
long length,
java.lang.String mimeType,
Checksum checksum)
Deprecated.
Creates a new object in the cloud.
|
ObjectId |
createObjectWithKeyFromSegment(java.lang.String keyPool,
java.lang.String key,
Acl acl,
MetadataList metadata,
BufferSegment data,
java.lang.String mimeType)
Deprecated.
Creates a new object in the cloud using a BufferSegment.
|
ObjectId |
createObjectWithKeyFromSegment(java.lang.String keyPool,
java.lang.String key,
Acl acl,
MetadataList metadata,
BufferSegment data,
java.lang.String mimeType,
Checksum checksum)
Deprecated.
Creates a new object in the cloud using a BufferSegment.
|
ObjectId |
createObjectWithKeyFromStream(java.lang.String keyPool,
java.lang.String key,
Acl acl,
MetadataList metadata,
java.io.InputStream data,
long length,
java.lang.String mimeType)
Deprecated.
Creates a new object in the cloud.
|
void |
deleteObject(Identifier id)
Deprecated.
Deletes an object from the cloud.
|
void |
deleteObjectWithKey(java.lang.String keyPool,
java.lang.String key)
Deprecated.
Deletes an object from the cloud.
|
void |
deleteUserMetadata(Identifier id,
MetadataTags tags)
Deprecated.
Deletes metadata items from an object.
|
void |
deleteVersion(ObjectId id)
Deprecated.
Deletes a version of an object from the cloud.
|
Acl |
getAcl(Identifier id)
Deprecated.
Returns an object's ACL
|
ObjectMetadata |
getAllMetadata(Identifier id)
Deprecated.
Returns all of an object's metadata and its ACL in
one call.
|
ObjectMetadata |
getAllMetadata(java.lang.String keyPool,
java.lang.String key)
Deprecated.
Returns all of an object's metadata and its ACL in
one call.
|
MetadataTags |
getListableTags(MetadataTag tag)
Deprecated.
Returns a list of the tags that are listable the current user's tennant.
|
MetadataTags |
getListableTags(java.lang.String tag)
Deprecated.
Returns a list of the tags that are listable the current user's tennant.
|
ObjectInfo |
getObjectInfo(Identifier id)
Deprecated.
Get information about an object's state including
replicas, expiration, and retention.
|
ServiceInformation |
getServiceInformation()
Deprecated.
Gets the current Atmos server information.
|
java.net.URL |
getShareableUrl(Identifier id,
java.util.Date expiration)
Deprecated.
An Atmos user (UID) can construct a pre-authenticated URL to an
object, which may then be used by anyone to retrieve the
object (e.g., through a browser).
|
java.net.URL |
getShareableUrl(Identifier id,
java.util.Date expiration,
java.lang.String disposition)
Deprecated.
Creates a shareable URL that sets the Content-Disposition header when
streaming the content.
|
MetadataList |
getSystemMetadata(Identifier id,
MetadataTags tags)
Deprecated.
Fetches the system metadata for the object.
|
MetadataList |
getSystemMetadata(java.lang.String keyPool,
java.lang.String key,
MetadataTags tags)
Deprecated.
Fetches the system metadata for the object.
|
MetadataList |
getUserMetadata(Identifier id,
MetadataTags tags)
Deprecated.
Fetches the user metadata for the object.
|
void |
hardLink(ObjectPath source,
ObjectPath target)
Deprecated.
Unsupported.
|
boolean |
isUnicodeEnabled()
Deprecated.
|
java.util.List<DirectoryEntry> |
listDirectory(ObjectPath path)
Deprecated.
Use the version with ListOptions to control the result
count and handle large result sets.
|
java.util.List<DirectoryEntry> |
listDirectory(ObjectPath path,
ListOptions options)
Deprecated.
Lists the contents of a directory.
|
java.util.List<Identifier> |
listObjects(MetadataTag tag)
Deprecated.
Use the version with ListOptions to control the result
count and handle large result sets.
|
java.util.List<ObjectResult> |
listObjects(MetadataTag tag,
ListOptions options)
Deprecated.
Lists all objects with the given tag.
|
java.util.List<Identifier> |
listObjects(java.lang.String tag)
Deprecated.
Use the version with ListOptions to control the result
count and handle large result sets.
|
java.util.List<ObjectResult> |
listObjects(java.lang.String tag,
ListOptions options)
Deprecated.
Lists all objects with the given tag.
|
java.util.List<ObjectResult> |
listObjectsWithMetadata(MetadataTag tag)
Deprecated.
Use the version of listObjects with ListOptions to include
metadata.
|
java.util.List<ObjectResult> |
listObjectsWithMetadata(java.lang.String tag)
Deprecated.
Use the version of listObjects with ListOptions to include
metadata.
|
MetadataTags |
listUserMetadataTags(Identifier id)
Deprecated.
Returns the list of user metadata tags assigned to the object.
|
java.util.List<Identifier> |
listVersions(Identifier id)
Deprecated.
this may not return all results if there are more than 4096
versions. Use listVersions(ObjectId, ListOptions) instead to paginate
results.
|
java.util.List<Version> |
listVersions(ObjectId id,
ListOptions options)
Deprecated.
Lists the versions of an object.
|
java.util.List<ObjectId> |
queryObjects(java.lang.String xquery)
Deprecated.
Executes a query for objects matching the specified XQuery string.
|
byte[] |
readObject(Identifier id,
Extent extent,
byte[] buffer)
Deprecated.
Reads an object's content.
|
byte[] |
readObject(Identifier id,
Extent extent,
byte[] buffer,
Checksum checksum)
Deprecated.
Reads an object's content.
|
java.io.InputStream |
readObjectStream(Identifier id,
Extent extent)
Deprecated.
Reads an object's content and returns an InputStream to read the content.
|
java.io.InputStream |
readObjectStreamWithKey(java.lang.String keyPool,
java.lang.String key,
Extent extent)
Deprecated.
Reads an object's content and returns an InputStream to read the content.
|
byte[] |
readObjectWithKey(java.lang.String keyPool,
java.lang.String key,
Extent extent,
byte[] buffer)
Deprecated.
Reads an object's content.
|
byte[] |
readObjectWithKey(java.lang.String keyPool,
java.lang.String key,
Extent extent,
byte[] buffer,
Checksum checksum)
Deprecated.
Reads an object's content.
|
void |
rename(ObjectPath source,
ObjectPath destination,
boolean force)
Deprecated.
Renames a file or directory within the namespace.
|
void |
restoreVersion(ObjectId id,
ObjectId vId)
Deprecated.
Restores a version of an object to the base version (i.e.
|
void |
setAcl(Identifier id,
Acl acl)
Deprecated.
Sets (overwrites) the ACL on the object.
|
void |
setUnicodeEnabled(boolean unicodeEnabled)
Deprecated.
|
void |
setUserMetadata(Identifier id,
MetadataList metadata)
Deprecated.
Writes the metadata into the object.
|
void |
updateObject(Identifier id,
Acl acl,
MetadataList metadata,
Extent extent,
byte[] data,
java.lang.String mimeType)
Deprecated.
Updates an object in the cloud.
|
void |
updateObject(Identifier id,
Acl acl,
MetadataList metadata,
Extent extent,
byte[] data,
java.lang.String mimeType,
Checksum checksum)
Deprecated.
Updates an object in the cloud.
|
void |
updateObjectFromSegment(Identifier id,
Acl acl,
MetadataList metadata,
Extent extent,
BufferSegment data,
java.lang.String mimeType)
Deprecated.
Updates an object in the cloud using a portion of a buffer.
|
void |
updateObjectFromSegment(Identifier id,
Acl acl,
MetadataList metadata,
Extent extent,
BufferSegment data,
java.lang.String mimeType,
Checksum checksum)
Deprecated.
Updates an object in the cloud using a portion of a buffer.
|
void |
updateObjectFromStream(Identifier id,
Acl acl,
MetadataList metadata,
Extent extent,
java.io.InputStream data,
long length,
java.lang.String mimeType)
Deprecated.
Updates an object in the cloud.
|
void |
updateObjectWithKey(java.lang.String keyPool,
java.lang.String key,
Acl acl,
MetadataList metadata,
Extent extent,
byte[] data,
java.lang.String mimeType)
Deprecated.
Updates an object in the cloud.
|
void |
updateObjectWithKey(java.lang.String keyPool,
java.lang.String key,
Acl acl,
MetadataList metadata,
Extent extent,
byte[] data,
java.lang.String mimeType,
Checksum checksum)
Deprecated.
Updates an object in the cloud.
|
void |
updateObjectWithKeyFromSegment(java.lang.String keyPool,
java.lang.String key,
Acl acl,
MetadataList metadata,
Extent extent,
BufferSegment data,
java.lang.String mimeType)
Deprecated.
Updates an object in the cloud using a portion of a buffer.
|
void |
updateObjectWithKeyFromSegment(java.lang.String keyPool,
java.lang.String key,
Acl acl,
MetadataList metadata,
Extent extent,
BufferSegment data,
java.lang.String mimeType,
Checksum checksum)
Deprecated.
Updates an object in the cloud using a portion of a buffer.
|
void |
updateObjectWithKeyFromStream(java.lang.String keyPool,
java.lang.String key,
Acl acl,
MetadataList metadata,
Extent extent,
java.io.InputStream data,
long length,
java.lang.String mimeType)
Deprecated.
Updates an object in the cloud.
|
ObjectId |
versionObject(Identifier id)
Deprecated.
Creates a new immutable version of an object.
|
boolean isUnicodeEnabled()
void setUnicodeEnabled(boolean unicodeEnabled)
ObjectId createObject(Acl acl, MetadataList metadata, byte[] data, java.lang.String mimeType)
acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. May be null to create an object with no content.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.ObjectId createObject(Acl acl, MetadataList metadata, byte[] data, java.lang.String mimeType, Checksum checksum)
acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. May be null to create an object with no content.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.checksum
- if not null, use the Checksum object to compute
the checksum for the create object request. If appending
to the object with subsequent requests, use the same
checksum object for each request.EsuException
- if the request fails.ObjectId createObjectFromStream(Acl acl, MetadataList metadata, java.io.InputStream data, long length, java.lang.String mimeType)
acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. The stream will NOT be closed at the end of the request.length
- The length of the stream in bytes. If the stream
is longer than the length, only length bytes will be written. If
the stream is shorter than the length, an error will occur.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.ObjectId createObjectFromStreamOnPath(ObjectPath path, Acl acl, MetadataList metadata, java.io.InputStream data, long length, java.lang.String mimeType)
path
- The path to create the object on.acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. The stream will NOT be closed at the end of the request.length
- The length of the stream in bytes. If the stream
is longer than the length, only length bytes will be written. If
the stream is shorter than the length, an error will occur.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.ObjectId createObjectOnPath(ObjectPath path, Acl acl, MetadataList metadata, byte[] data, java.lang.String mimeType)
path
- The path to create the object on.acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. May be null to create an object with no content.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.ObjectId createObjectOnPath(ObjectPath path, Acl acl, MetadataList metadata, byte[] data, java.lang.String mimeType, Checksum checksum)
path
- The path to create the object on.acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. May be null to create an object with no content.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.checksum
- if not null, use the Checksum object to compute
the checksum for the create object request. If appending
to the object with subsequent requests, use the same
checksum object for each request.EsuException
- if the request fails.ObjectId createObjectFromSegment(Acl acl, MetadataList metadata, BufferSegment data, java.lang.String mimeType)
acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. May be null to create an object with no content.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.ObjectId createObjectFromSegment(Acl acl, MetadataList metadata, BufferSegment data, java.lang.String mimeType, Checksum checksum)
acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. May be null to create an object with no content.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.checksum
- if not null, use the Checksum object to compute
the checksum for the create object request. If appending
to the object with subsequent requests, use the same
checksum object for each request.EsuException
- if the request fails.ObjectId createObjectFromSegmentOnPath(ObjectPath path, Acl acl, MetadataList metadata, BufferSegment data, java.lang.String mimeType)
path
- the path to create the object on.acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. May be null to create an object with no content.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.ObjectId createObjectFromSegmentOnPath(ObjectPath path, Acl acl, MetadataList metadata, BufferSegment data, java.lang.String mimeType, Checksum checksum)
path
- the path to create the object on.acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. May be null to create an object with no content.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.checksum
- if not null, use the Checksum object to compute
the checksum for the create object request. If appending
to the object with subsequent requests, use the same
checksum object for each request.EsuException
- if the request fails.void updateObject(Identifier id, Acl acl, MetadataList metadata, Extent extent, byte[] data, java.lang.String mimeType)
id
- The ID of the object to updateacl
- Access control list for the new object. Optional, default
is NULL to leave the ACL unchanged.metadata
- Metadata list for the new object. Optional,
default is NULL for no changes to the metadata.data
- The new contents of the object. May be appended
to later. Optional, default is NULL (no content changes).extent
- portion of the object to update. May be null to indicate
the whole object is to be replaced. If not null, the extent size must
match the data size.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.void updateObject(Identifier id, Acl acl, MetadataList metadata, Extent extent, byte[] data, java.lang.String mimeType, Checksum checksum)
id
- The ID of the object to updateacl
- Access control list for the new object. Optional, default
is NULL to leave the ACL unchanged.metadata
- Metadata list for the new object. Optional,
default is NULL for no changes to the metadata.data
- The new contents of the object. May be appended
to later. Optional, default is NULL (no content changes).extent
- portion of the object to update. May be null to indicate
the whole object is to be replaced. If not null, the extent size must
match the data size.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.checksum
- if not null, use the Checksum object to compute
the checksum for the update object request. If appending
to the object with subsequent requests, use the same
checksum object for each request.EsuException
- if the request fails.void updateObjectFromStream(Identifier id, Acl acl, MetadataList metadata, Extent extent, java.io.InputStream data, long length, java.lang.String mimeType)
id
- The ID of the object to updateacl
- Access control list for the new object. Optional, default
is NULL to leave the ACL unchanged.metadata
- Metadata list for the new object. Optional,
default is NULL for no changes to the metadata.data
- The new contents of the object. May be appended
to later. Optional, default is NULL (no content changes).extent
- portion of the object to update. May be null to indicate
the whole object is to be replaced. If not null, the extent size must
match the data size.length
- The length of the stream in bytes. If the stream
is longer than the length, only length bytes will be written. If
the stream is shorter than the length, an error will occur.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.void updateObjectFromSegment(Identifier id, Acl acl, MetadataList metadata, Extent extent, BufferSegment data, java.lang.String mimeType)
id
- The ID of the object to updateacl
- Access control list for the new object. Optional, default
is NULL to leave the ACL unchanged.metadata
- Metadata list for the new object. Optional,
default is NULL for no changes to the metadata.data
- The new contents of the object. May be appended
to later. Optional, default is NULL (no content changes).extent
- portion of the object to update. May be null to indicate
the whole object is to be replaced. If not null, the extent size must
match the data size.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.void updateObjectFromSegment(Identifier id, Acl acl, MetadataList metadata, Extent extent, BufferSegment data, java.lang.String mimeType, Checksum checksum)
id
- The ID of the object to updateacl
- Access control list for the new object. Optional, default
is NULL to leave the ACL unchanged.metadata
- Metadata list for the new object. Optional,
default is NULL for no changes to the metadata.data
- The new contents of the object. May be appended
to later. Optional, default is NULL (no content changes).extent
- portion of the object to update. May be null to indicate
the whole object is to be replaced. If not null, the extent size must
match the data size.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.checksum
- if not null, use the Checksum object to compute
the checksum for the update object request. If appending
to the object with subsequent requests, use the same
checksum object for each request.EsuException
- if the request fails.void setUserMetadata(Identifier id, MetadataList metadata)
id
- the identifier of the object to updatemetadata
- metadata to write to the object.void setAcl(Identifier id, Acl acl)
id
- the identifier of the object to change the ACL on.acl
- the new ACL for the object.void deleteObject(Identifier id)
id
- the identifier of the object to delete.void deleteVersion(ObjectId id)
id
- the identifier of the object to delete.MetadataList getUserMetadata(Identifier id, MetadataTags tags)
id
- the identifier of the object whose user metadata
to fetch.tags
- A list of user metadata tags to fetch. Optional. If null,
all user metadata will be fetched.MetadataList getSystemMetadata(Identifier id, MetadataTags tags)
id
- the identifier of the object whose system metadata
to fetch.tags
- A list of system metadata tags to fetch. Optional.
Default value is null to fetch all system metadata.byte[] readObject(Identifier id, Extent extent, byte[] buffer)
id
- the identifier of the object whose content to read.extent
- the portion of the object data to read. Optional.
Default is null to read the entire object.buffer
- the buffer to use to read the extent. Must be large
enough to read the response or an error will be thrown. If null,
a buffer will be allocated to hold the response data. If you pass
a buffer that is larger than the extent, only extent.getSize() bytes
will be valid.byte[] readObject(Identifier id, Extent extent, byte[] buffer, Checksum checksum)
id
- the identifier of the object whose content to read.extent
- the portion of the object data to read. Optional.
Default is null to read the entire object.buffer
- the buffer to use to read the extent. Must be large
enough to read the response or an error will be thrown. If null,
a buffer will be allocated to hold the response data. If you pass
a buffer that is larger than the extent, only extent.getSize() bytes
will be valid.checksum
- if not null, the given checksum object will be used
to verify checksums during the read operation. Note that only erasure
coded objects will return checksums *and* if you're reading the object
in chunks, you'll have to read the data back sequentially to keep
the checksum consistent. If the read operation does not return
a checksum from the server, the checksum operation will be skipped.java.io.InputStream readObjectStream(Identifier id, Extent extent)
id
- the identifier of the object whose content to read.extent
- the portion of the object data to read. Optional.
Default is null to read the entire object.Acl getAcl(Identifier id)
id
- the identifier of the object whose ACL to readvoid deleteUserMetadata(Identifier id, MetadataTags tags)
id
- the identifier of the object whose metadata to
delete.tags
- the list of metadata tags to delete.java.util.List<Identifier> listVersions(Identifier id)
id
- the object whose versions to list.java.util.List<Version> listVersions(ObjectId id, ListOptions options)
id
- the object whose versions to list.ObjectId versionObject(Identifier id)
id
- the object to versionjava.util.List<Identifier> listObjects(MetadataTag tag)
tag
- the tag to search forEsuException
- if there is an error loading the object listjava.util.List<ObjectResult> listObjects(MetadataTag tag, ListOptions options)
tag
- the tag to search foroptions
- options for returning the listEsuException
- if there is an error loading the object listjava.util.List<Identifier> listObjects(java.lang.String tag)
tag
- the tag to search forEsuException
- if there is an error loading the object listjava.util.List<ObjectResult> listObjects(java.lang.String tag, ListOptions options)
tag
- the tag to search foroptions
- options for returning the listEsuException
- if there is an error loading the object listjava.util.List<ObjectResult> listObjectsWithMetadata(MetadataTag tag)
tag
- the tag to search forEsuException
- if there is an error loading the object listjava.util.List<ObjectResult> listObjectsWithMetadata(java.lang.String tag)
tag
- the tag to search forEsuException
- if there is an error loading the object listMetadataTags getListableTags(MetadataTag tag)
tag
- optional. If specified, the list will be limited to the tags
under the specified tag. If null, only top level tags will be returned.MetadataTags getListableTags(java.lang.String tag)
tag
- optional. If specified, the list will be limited to the tags
under the specified tag. If null, only top level tags will be returned.MetadataTags listUserMetadataTags(Identifier id)
id
- the object whose metadata tags to listjava.util.List<ObjectId> queryObjects(java.lang.String xquery)
xquery
- the XQuery string to execute against the cloud.java.util.List<DirectoryEntry> listDirectory(ObjectPath path)
path
- the path to list. Must be a directory.java.util.List<DirectoryEntry> listDirectory(ObjectPath path, ListOptions options)
path
- the path to list. Must be a directory.options
- options for returning the list.ObjectMetadata getAllMetadata(Identifier id)
id
- the object's identifier.java.net.URL getShareableUrl(Identifier id, java.util.Date expiration)
id
- the object to generate the URL forexpiration
- the expiration date of the URLvoid rename(ObjectPath source, ObjectPath destination, boolean force)
source
- The file or directory to renamedestination
- The new path for the file or directoryforce
- If true, the desination file or
directory will be overwritten. Directories must be empty to be
overwritten. Also note that overwrite operations on files are
not synchronous; a delay may be required before the object is
available at its destination.void restoreVersion(ObjectId id, ObjectId vId)
id
- Base object ID (target of the restore)vId
- Version object ID to restoreServiceInformation getServiceInformation()
ObjectInfo getObjectInfo(Identifier id)
id
- the object identifiervoid hardLink(ObjectPath source, ObjectPath target)
java.net.URL getShareableUrl(Identifier id, java.util.Date expiration, java.lang.String disposition)
id
- the ID to create the Shareable URL for.expiration
- The expration timestamp for the URLdisposition
- the value of the Content-Disposition header, e.g.
"attachment; filename=\"filename.txt\""ObjectId createObjectWithKey(java.lang.String keyPool, java.lang.String key, Acl acl, MetadataList metadata, byte[] data, long length, java.lang.String mimeType)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. May be null to create an object with no content.length
- The length of the stream in bytes. If the stream
is longer than the length, only length bytes will be written. If
the stream is shorter than the length, an error will occur.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.ObjectId createObjectWithKey(java.lang.String keyPool, java.lang.String key, Acl acl, MetadataList metadata, byte[] data, long length, java.lang.String mimeType, Checksum checksum)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. May be null to create an object with no content.length
- The length of the stream in bytes. If the stream
is longer than the length, only length bytes will be written. If
the stream is shorter than the length, an error will occur.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.checksum
- if not null, use the Checksum object to compute
the checksum for the create object request. If appending
to the object with subsequent requests, use the same
checksum object for each request.EsuException
- if the request fails.ObjectId createObjectWithKeyFromSegment(java.lang.String keyPool, java.lang.String key, Acl acl, MetadataList metadata, BufferSegment data, java.lang.String mimeType)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. May be null to create an object with no content.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.ObjectId createObjectWithKeyFromSegment(java.lang.String keyPool, java.lang.String key, Acl acl, MetadataList metadata, BufferSegment data, java.lang.String mimeType, Checksum checksum)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. May be null to create an object with no content.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.checksum
- if not null, use the Checksum object to compute
the checksum for the create object request. If appending
to the object with subsequent requests, use the same
checksum object for each request.EsuException
- if the request fails.ObjectId createObjectWithKeyFromStream(java.lang.String keyPool, java.lang.String key, Acl acl, MetadataList metadata, java.io.InputStream data, long length, java.lang.String mimeType)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.acl
- Access control list for the new object. May be null
to use a default ACLmetadata
- Metadata for the new object. May be null for
no metadata.data
- The initial contents of the object. May be appended
to later. The stream will NOT be closed at the end of the request.length
- The length of the stream in bytes. If the stream
is longer than the length, only length bytes will be written. If
the stream is shorter than the length, an error will occur.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.void deleteObjectWithKey(java.lang.String keyPool, java.lang.String key)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.ObjectMetadata getAllMetadata(java.lang.String keyPool, java.lang.String key)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.MetadataList getSystemMetadata(java.lang.String keyPool, java.lang.String key, MetadataTags tags)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.tags
- A list of system metadata tags to fetch. Optional.
Default value is null to fetch all system metadata.byte[] readObjectWithKey(java.lang.String keyPool, java.lang.String key, Extent extent, byte[] buffer)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.extent
- the portion of the object data to read. Optional.
Default is null to read the entire object.buffer
- the buffer to use to read the extent. Must be large
enough to read the response or an error will be thrown. If null,
a buffer will be allocated to hold the response data. If you pass
a buffer that is larger than the extent, only extent.getSize() bytes
will be valid.byte[] readObjectWithKey(java.lang.String keyPool, java.lang.String key, Extent extent, byte[] buffer, Checksum checksum)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.extent
- the portion of the object data to read. Optional.
Default is null to read the entire object.buffer
- the buffer to use to read the extent. Must be large
enough to read the response or an error will be thrown. If null,
a buffer will be allocated to hold the response data. If you pass
a buffer that is larger than the extent, only extent.getSize() bytes
will be valid.checksum
- if not null, the given checksum object will be used
to verify checksums during the read operation. Note that only erasure
coded objects will return checksums *and* if you're reading the object
in chunks, you'll have to read the data back sequentially to keep
the checksum consistent. If the read operation does not return
a checksum from the server, the checksum operation will be skipped.java.io.InputStream readObjectStreamWithKey(java.lang.String keyPool, java.lang.String key, Extent extent)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.extent
- the portion of the object data to read. Optional.
Default is null to read the entire object.void updateObjectWithKey(java.lang.String keyPool, java.lang.String key, Acl acl, MetadataList metadata, Extent extent, byte[] data, java.lang.String mimeType)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.acl
- Access control list for the new object. Optional, default
is NULL to leave the ACL unchanged.metadata
- Metadata list for the new object. Optional,
default is NULL for no changes to the metadata.data
- The new contents of the object. May be appended
to later. Optional, default is NULL (no content changes).extent
- portion of the object to update. May be null to indicate
the whole object is to be replaced. If not null, the extent size must
match the data size.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.void updateObjectWithKey(java.lang.String keyPool, java.lang.String key, Acl acl, MetadataList metadata, Extent extent, byte[] data, java.lang.String mimeType, Checksum checksum)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.acl
- Access control list for the new object. Optional, default
is NULL to leave the ACL unchanged.metadata
- Metadata list for the new object. Optional,
default is NULL for no changes to the metadata.data
- The new contents of the object. May be appended
to later. Optional, default is NULL (no content changes).extent
- portion of the object to update. May be null to indicate
the whole object is to be replaced. If not null, the extent size must
match the data size.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.checksum
- if not null, use the Checksum object to compute
the checksum for the update object request. If appending
to the object with subsequent requests, use the same
checksum object for each request.EsuException
- if the request fails.void updateObjectWithKeyFromStream(java.lang.String keyPool, java.lang.String key, Acl acl, MetadataList metadata, Extent extent, java.io.InputStream data, long length, java.lang.String mimeType)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.acl
- Access control list for the new object. Optional, default
is NULL to leave the ACL unchanged.metadata
- Metadata list for the new object. Optional,
default is NULL for no changes to the metadata.data
- The new contents of the object. May be appended
to later. Optional, default is NULL (no content changes).extent
- portion of the object to update. May be null to indicate
the whole object is to be replaced. If not null, the extent size must
match the data size.length
- The length of the stream in bytes. If the stream
is longer than the length, only length bytes will be written. If
the stream is shorter than the length, an error will occur.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.void updateObjectWithKeyFromSegment(java.lang.String keyPool, java.lang.String key, Acl acl, MetadataList metadata, Extent extent, BufferSegment data, java.lang.String mimeType)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.acl
- Access control list for the new object. Optional, default
is NULL to leave the ACL unchanged.metadata
- Metadata list for the new object. Optional,
default is NULL for no changes to the metadata.data
- The new contents of the object. May be appended
to later. Optional, default is NULL (no content changes).extent
- portion of the object to update. May be null to indicate
the whole object is to be replaced. If not null, the extent size must
match the data size.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.EsuException
- if the request fails.void updateObjectWithKeyFromSegment(java.lang.String keyPool, java.lang.String key, Acl acl, MetadataList metadata, Extent extent, BufferSegment data, java.lang.String mimeType, Checksum checksum)
keyPool
- A name which represents the keyspace for this key. A pool is analogous
to an S3 bucket and two objects with the same name can exist in different pools.key
- The key that uniquely identifies this object within its keyPool.acl
- Access control list for the new object. Optional, default
is NULL to leave the ACL unchanged.metadata
- Metadata list for the new object. Optional,
default is NULL for no changes to the metadata.data
- The new contents of the object. May be appended
to later. Optional, default is NULL (no content changes).extent
- portion of the object to update. May be null to indicate
the whole object is to be replaced. If not null, the extent size must
match the data size.mimeType
- the MIME type of the content. Optional,
may be null. If data is non-null and mimeType is null, the MIME
type will default to application/octet-stream.checksum
- if not null, use the Checksum object to compute
the checksum for the update object request. If appending
to the object with subsequent requests, use the same
checksum object for each request.EsuException
- if the request fails.