public abstract class AbstractObjectStoreEntity<I extends AbstractInformation> extends java.lang.Object implements ObjectStoreEntity
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
ALLOW_CACHING |
protected I |
info |
protected boolean |
staleHeaders |
| Constructor and Description |
|---|
AbstractObjectStoreEntity(boolean allowCaching) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkForInfo() |
protected void |
checkForInfo(boolean readHeader,
boolean allowErrorLog) |
protected void |
checkForInfoAndAllowHeaderSet() |
protected void |
checkForInfoDisallowErrorLog() |
protected abstract Metadata |
createMetadataEntry(java.lang.String name,
java.lang.String value) |
boolean |
exists() |
protected abstract void |
getInfo(boolean allowErrorLog) |
java.util.Map<java.lang.String,java.lang.Object> |
getMetadata()
Gets the metadata headers
|
java.lang.Object |
getMetadata(java.lang.String key)
Returns a single value of the designated key, or null if it does not exist.
|
java.lang.String |
getPath()
Returns the path to be appended to the host
|
abstract java.lang.String |
getPathForEntity() |
void |
invalidate() |
boolean |
isAllowCaching() |
boolean |
isInfoRetrieved()
Included for backwards portability reasons
|
boolean |
isStale(boolean readHeader) |
void |
reload() |
void |
removeAndDoNotSaveMetadata(java.lang.String key)
Removes a single metadata field, but does not place a call to the server to save.
|
void |
removeAndSaveMetadata(java.lang.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
|
protected abstract void |
saveSpecificMetadata() |
void |
setAndDoNotSaveMetadata(java.lang.String key,
java.lang.Object value)
Sets a single metadata field, but does not place a call to the server to save.
|
void |
setAndSaveMetadata(java.lang.String key,
java.lang.Object value)
Sets a single metadata field and immediately places a call to the server to save
|
protected void |
setInfoRetrieved() |
void |
setMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
Sets the metadata headers
|
protected static final boolean ALLOW_CACHING
protected I extends AbstractInformation info
protected boolean staleHeaders
public void setMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
ObjectStoreEntitysetMetadata in interface ObjectStoreEntitymetadata - contains all metadata name/value pairs that must be setpublic void setAndSaveMetadata(java.lang.String key,
java.lang.Object value)
ObjectStoreEntitysetAndSaveMetadata in interface ObjectStoreEntitykey - metadata field to addvalue - value of the metadata fieldpublic void setAndDoNotSaveMetadata(java.lang.String key,
java.lang.Object value)
ObjectStoreEntitysetAndDoNotSaveMetadata in interface ObjectStoreEntitykey - metadata field to addvalue - value of the metadata fieldpublic void removeAndSaveMetadata(java.lang.String key)
ObjectStoreEntityremoveAndSaveMetadata in interface ObjectStoreEntitykey - metadata field to removepublic void removeAndDoNotSaveMetadata(java.lang.String key)
ObjectStoreEntityremoveAndDoNotSaveMetadata in interface ObjectStoreEntitykey - metadata field to removeprotected abstract Metadata createMetadataEntry(java.lang.String name, java.lang.String value)
public void saveMetadata()
ObjectStoreEntitysaveMetadata in interface ObjectStoreEntityprotected abstract void saveSpecificMetadata()
public java.lang.Object getMetadata(java.lang.String key)
ObjectStoreEntitygetMetadata in interface ObjectStoreEntitykey - the key of the key/value pairpublic java.util.Map<java.lang.String,java.lang.Object> getMetadata()
ObjectStoreEntitygetMetadata in interface ObjectStoreEntityprotected void checkForInfoAndAllowHeaderSet()
protected void checkForInfo()
protected void checkForInfoDisallowErrorLog()
protected void checkForInfo(boolean readHeader,
boolean allowErrorLog)
protected void setInfoRetrieved()
public boolean exists()
public void invalidate()
public boolean isStale(boolean readHeader)
public boolean isAllowCaching()
public void reload()
public boolean isInfoRetrieved()
public java.lang.String getPath()
ObjectStoreEntitygetPath in interface ObjectStoreEntitypublic abstract java.lang.String getPathForEntity()
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingExceptionprotected abstract void getInfo(boolean allowErrorLog)
Copyright © 2012-2020 42 BV. All Rights Reserved.