public abstract class BaseStorageItem
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
METADATA_HEADER_CONTENT_DISPOSITION |
static java.lang.String |
METADATA_HEADER_CONTENT_ENCODING |
static java.lang.String |
METADATA_HEADER_CONTENT_LANGUAGE |
static java.lang.String |
METADATA_HEADER_CONTENT_LENGTH |
static java.lang.String |
METADATA_HEADER_CONTENT_MD5 |
static java.lang.String |
METADATA_HEADER_CONTENT_TYPE |
static java.lang.String |
METADATA_HEADER_CREATION_DATE |
static java.lang.String |
METADATA_HEADER_DATE |
static java.lang.String |
METADATA_HEADER_ETAG |
static java.lang.String |
METADATA_HEADER_LAST_MODIFIED_DATE |
Modifier | Constructor and Description |
---|---|
protected |
BaseStorageItem() |
protected |
BaseStorageItem(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addAllMetadata(java.util.Map<java.lang.String,java.lang.Object> metadataToAdd)
Adds all the items in the provided map to this object's metadata.
|
void |
addMetadata(java.lang.String name,
java.util.Date value)
Adds a Date metadata item to the object.
|
protected void |
addMetadata(java.lang.String name,
java.lang.Object value)
Add a metadata entry with the given name.
|
void |
addMetadata(java.lang.String name,
StorageOwner value)
Adds an owner metadata item to the object.
|
void |
addMetadata(java.lang.String name,
java.lang.String value)
Adds a String metadata item to the object.
|
boolean |
containsMetadata(java.lang.String name)
Return true if a metdata data item with the given name (case-insensitive)
is present.
|
java.util.Map<java.lang.String,java.lang.Object> |
getCompleteMetadataMap() |
java.lang.Object |
getHttpMetadata(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.Object> |
getHttpMetadataMap() |
java.lang.Object |
getMetadata(java.lang.String name) |
protected java.lang.Object |
getMetadataCaseInsensitiveFromMap(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> map) |
java.util.Map<java.lang.String,java.lang.Object> |
getMetadataMap() |
java.lang.String |
getName() |
StorageOwner |
getOwner() |
java.lang.Object |
getServiceMetadata(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.Object> |
getServiceMetadataMap() |
java.lang.Object |
getUserMetadata(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.Object> |
getUserMetadataMap() |
protected boolean |
isMatchingMetadataName(java.lang.String name1,
java.lang.String name2) |
protected java.util.Map<java.lang.String,java.lang.Object> |
lookupMetadataSubsetMap(java.lang.String keyname) |
void |
removeMetadata(java.lang.String name)
Removes a metadata item from the object.
|
void |
replaceAllMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
Removes all the metadata items associated with this object, then adds all the items
in the provided map.
|
void |
setName(java.lang.String name)
Set the name of the bucket.
|
void |
setOwner(StorageOwner owner)
Set this object's owner object based on information returned from the service.
|
public static final java.lang.String METADATA_HEADER_CREATION_DATE
public static final java.lang.String METADATA_HEADER_LAST_MODIFIED_DATE
public static final java.lang.String METADATA_HEADER_DATE
public static final java.lang.String METADATA_HEADER_CONTENT_MD5
public static final java.lang.String METADATA_HEADER_CONTENT_LENGTH
public static final java.lang.String METADATA_HEADER_CONTENT_TYPE
public static final java.lang.String METADATA_HEADER_CONTENT_ENCODING
public static final java.lang.String METADATA_HEADER_CONTENT_DISPOSITION
public static final java.lang.String METADATA_HEADER_CONTENT_LANGUAGE
public static final java.lang.String METADATA_HEADER_ETAG
protected BaseStorageItem(java.lang.String name)
protected BaseStorageItem()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name for the bucketpublic java.util.Map<java.lang.String,java.lang.Object> getMetadataMap()
protected java.util.Map<java.lang.String,java.lang.Object> lookupMetadataSubsetMap(java.lang.String keyname)
public java.util.Map<java.lang.String,java.lang.Object> getUserMetadataMap()
getMetadata(String)
.public java.util.Map<java.lang.String,java.lang.Object> getServiceMetadataMap()
getMetadata(String)
.public java.util.Map<java.lang.String,java.lang.Object> getHttpMetadataMap()
getMetadata(String)
.public java.util.Map<java.lang.String,java.lang.Object> getCompleteMetadataMap()
getMetadata(String)
.protected boolean isMatchingMetadataName(java.lang.String name1, java.lang.String name2)
name1
- name2
- protected java.lang.Object getMetadataCaseInsensitiveFromMap(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> map)
name
- the metadata item name, case-insensitive.public java.lang.Object getMetadata(java.lang.String name)
name
- the metadata item name, case-insensitive.public boolean containsMetadata(java.lang.String name)
name
- the metadata item name, case-insensitive.public java.lang.Object getServiceMetadata(java.lang.String name)
name
- the metadata item name, case-insensitive.public java.lang.Object getUserMetadata(java.lang.String name)
name
- the metadata item name, case-insensitive.public java.lang.Object getHttpMetadata(java.lang.String name)
name
- the metadata item name, case-insensitive.protected void addMetadata(java.lang.String name, java.lang.Object value)
getMetadataMap()
, but case is
otherwise ignored.
In other words, if you set two metadata items with the names "ETag" and "Etag"
only one value will be stored, whichever was set most recently.name
- the metadata item name, case-insensitive.value
- the metadata item value.public void addMetadata(java.lang.String name, java.lang.String value)
name
- the metadata item name, case-insensitive.value
- the metadata item's date value.public void addMetadata(java.lang.String name, java.util.Date value)
name
- the metadata item name, case-insensitive.value
- the metadata item's date value.public void addMetadata(java.lang.String name, StorageOwner value)
name
- the metadata item name, case-insensitive.value
- the metadata item's owner value.public void addAllMetadata(java.util.Map<java.lang.String,java.lang.Object> metadataToAdd)
metadataToAdd
- metadata items to add, names are case-insensitive.public void removeMetadata(java.lang.String name)
name
- the name of the metadata item to remove, case-insensitive.public void replaceAllMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
metadata
- metadata items to add.public StorageOwner getOwner()
public void setOwner(StorageOwner owner)
owner
-