org.javaswift.joss.model
Interface ObjectStoreEntity

All Known Subinterfaces:
Account, Container, StoredObject, Website
All Known Implementing Classes:
AbstractAccount, AbstractContainer, AbstractObjectStoreEntity, AbstractStoredObject, AbstractWebsite, AccountImpl, AccountMock, ContainerImpl, ContainerMock, StoredObjectImpl, StoredObjectMock, WebsiteImpl, WebsiteMock

public interface ObjectStoreEntity

Top-level entity for all entities in the ObjectStore. The sharing characteristic of the entities is custom metadata.


Method Summary
 Map<String,Object> getMetadata()
          Gets the metadata headers
 Object getMetadata(String key)
          Returns a single value of the designated key, or null if it does not exist.
 String getPath()
          Returns the path to be appended to the host
 void removeAndDoNotSaveMetadata(String key)
          Removes a single metadata field, but does not place a call to the server to save.
 void removeAndSaveMetadata(String key)
          Removes a single metadata field and immediately places a call to the server to save
 void saveMetadata()
          Places a call to the server to save all metadata, previously set with setMetadata excluding the save option
 void setAndDoNotSaveMetadata(String key, Object value)
          Sets a single metadata field, but does not place a call to the server to save.
 void setAndSaveMetadata(String key, Object value)
          Sets a single metadata field and immediately places a call to the server to save
 void setMetadata(Map<String,Object> metadata)
          Sets the metadata headers
 

Method Detail

setMetadata

void setMetadata(Map<String,Object> metadata)
Sets the metadata headers

Parameters:
metadata - contains all metadata name/value pairs that must be set

setAndSaveMetadata

void setAndSaveMetadata(String key,
                        Object value)
Sets a single metadata field and immediately places a call to the server to save

Parameters:
key - metadata field to add
value - value of the metadata field

setAndDoNotSaveMetadata

void setAndDoNotSaveMetadata(String key,
                             Object value)
Sets a single metadata field, but does not place a call to the server to save. This must be explicitly called with saveMetadata.

Parameters:
key - metadata field to add
value - value of the metadata field

removeAndSaveMetadata

void removeAndSaveMetadata(String key)
Removes a single metadata field and immediately places a call to the server to save

Parameters:
key - metadata field to remove

removeAndDoNotSaveMetadata

void removeAndDoNotSaveMetadata(String key)
Removes a single metadata field, but does not place a call to the server to save. This must be explicitly called with saveMetadata.

Parameters:
key - metadata field to remove

getMetadata

Object getMetadata(String key)
Returns a single value of the designated key, or null if it does not exist.

Parameters:
key - the key of the key/value pair
Returns:
the value belonging to the key

saveMetadata

void saveMetadata()
Places a call to the server to save all metadata, previously set with setMetadata excluding the save option


getMetadata

Map<String,Object> getMetadata()
Gets the metadata headers

Returns:
the metadata on the entity

getPath

String getPath()
Returns the path to be appended to the host

Returns:
the path to append to the host


Copyright © 2012-2014 42 BV. All Rights Reserved.