public class UESMetadata
extends java.lang.Object
UESStorageObject
- key-value pairs. The overall maximum size of metadata
for any single storage object is limited to 2 kilobytes.Modifier and Type | Field and Description |
---|---|
private long |
contentLength
Size of the associated object in bytes.
|
private java.lang.String |
contentType
Type of content stored in the associated object.
|
private java.util.Date |
creationTime
Time when the associated object was created.
|
private static int |
DEFAULT_METADATA_ENTRIES_COUNT
Default count of metadata entries.
|
private java.lang.String |
logicalName
Logical name of the associated object.
|
private UESOwner |
owner
Identification of user and service/application that put the associated object in the storage.
|
private java.util.Map<java.lang.String,java.lang.String> |
userMetadata
Custom user-metadata for the associated object.
|
Constructor and Description |
---|
UESMetadata()
Creates a new instance of UESMetadata.
|
Modifier and Type | Method and Description |
---|---|
void |
addUserMetadata(java.lang.String key,
Adds the key-value pair of custom user-metadata for the associated object.
|
long |
getContentLength()
Gets the size of the associated object in bytes.
|
java.lang.String |
getContentType()
Gets the type of content stored in the associated object.
|
java.util.Date |
getCreationTime()
Gets time when the associated object was created.
|
java.lang.String |
getLogicalName()
Gets the logical (human readable) name of the associated object.
|
UESOwner |
getOwner()
Gets identification of user and service/application that put the associated object in the storage.
|
java.util.Map<java.lang.String,java.lang.String> |
getUserMetadata()
Gets the custom user-metadata for the associated object.
|
private void |
checkNotNullValues(java.util.Map<java.lang.String,java.lang.String> userMetadata)
Test user metadata whether is some key or value null.
|
void |
setContentLength(long length)
Sets the size of the associated object in bytes.
|
void |
setContentType(java.lang.String contentType)
Sets the type of content stored in the associated object.
|
void |
setCreationTime(java.util.Date time)
For internal use only.
|
void |
setLogicalName(java.lang.String name)
Sets the logical (human readable) name of the associated object.
|
void |
setOwner(UESOwner owner)
For internal use only.
|
void |
setUserMetadata(java.util.Map<java.lang.String,java.lang.String> userMetadata)
Sets the custom user-metadata for the associated object.
|
java.lang.String |
toString() |
null
if it hasn't been set yet.name
- logical name.null
if it hasn't been set yet.length
- size in bytes.null
if it hasn't been set.contentType
- type of content stored in the associated object.owner
- Owner of the associated object.time
- Time when the associated object was created.key
- the key for the custom user metadata entry, must not be null
.value
- the value for the custom user-metadata entry.userMetadata
- the custom user-metadata for the associated object.userMetadata
- Tested user metadata.UESStorageServiceRTException
- When there is some key or value null.toString
in class java.lang.Object
Object.toString()