Interface Storage
-
- All Superinterfaces:
IntermediateStorage
public interface Storage extends IntermediateStorage
This interface handles the storage of StorageProviders KeyValue pairs. Setting a new key with the Storage also sets the type for this key. e.g. a key that has been set with setLong(key,value) can not be set with setString(key,value) again.- Since:
- 10.0.34
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.novomind.ecom.api.iagent.persistence.storage.IntermediateStorage
IntermediateStorage.ValueType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Storage
setBoolean(java.lang.String key, java.lang.Boolean value)
Sets the KeyValue pair for this Storage.Storage
setDate(java.lang.String key, java.util.Date value)
Sets the KeyValue pair for this Storage.Storage
setDouble(java.lang.String key, java.lang.Double value)
Sets the KeyValue pair for this Storage.Storage
setEncryptedString(java.lang.String key, java.lang.String value)
Sets the KeyValue pair for this Storage.Storage
setLong(java.lang.String key, java.lang.Long value)
Sets the KeyValue pair for this Storage.Storage
setString(java.lang.String key, java.lang.String value)
Sets the KeyValue pair for this Storage.void
store()
Stores the changes for the instance of this StorageProvider.-
Methods inherited from interface com.novomind.ecom.api.iagent.persistence.storage.IntermediateStorage
containsKey, get, getBoolean, getDate, getDouble, getEncryptedString, getKeySet, getLong, getString, getValueType, remove
-
-
-
-
Method Detail
-
store
void store() throws PersistencyException
Stores the changes for the instance of this StorageProvider.- Throws:
PersistencyException
- is thrown on errors while persisting. Such as the StorageProvider that the KeyValue pairs belong to, is not persisted.
NOTE: Not all StorageProvider needs to be persited to store the KeyValue pairs.- Since:
- 10.0.34
-
setString
Storage setString(java.lang.String key, java.lang.String value) throws WrongTypeException
Sets the KeyValue pair for this Storage. The value type is String.- Specified by:
setString
in interfaceIntermediateStorage
- Parameters:
key
- the keyvalue
- the String value- Returns:
- this Storage instance
- Throws:
WrongTypeException
- is thrown when the type String is wrong for this key- Since:
- 10.0.34
-
setLong
Storage setLong(java.lang.String key, java.lang.Long value) throws WrongTypeException
Sets the KeyValue pair for this Storage. The value type is Long.- Specified by:
setLong
in interfaceIntermediateStorage
- Parameters:
key
- the keyvalue
- the Long value- Returns:
- this Storage instance
- Throws:
WrongTypeException
- is thrown when the type Long is wrong for this key- Since:
- 10.0.34
-
setDouble
Storage setDouble(java.lang.String key, java.lang.Double value) throws WrongTypeException
Sets the KeyValue pair for this Storage. The value type is Double.- Specified by:
setDouble
in interfaceIntermediateStorage
- Parameters:
key
- the keyvalue
- the Double value- Returns:
- this Storage instance
- Throws:
WrongTypeException
- is thrown when the type Double is wrong for this key- Since:
- 10.0.34
-
setDate
Storage setDate(java.lang.String key, java.util.Date value) throws WrongTypeException
Sets the KeyValue pair for this Storage. The value type is Date.- Specified by:
setDate
in interfaceIntermediateStorage
- Parameters:
key
- the keyvalue
- the Date value- Returns:
- this Storage instance
- Throws:
WrongTypeException
- is thrown when the type Date is wrong for this key- Since:
- 10.0.34
-
setBoolean
Storage setBoolean(java.lang.String key, java.lang.Boolean value) throws WrongTypeException
Sets the KeyValue pair for this Storage. The value type is Boolean.- Specified by:
setBoolean
in interfaceIntermediateStorage
- Parameters:
key
- the keyvalue
- the Boolean value- Returns:
- this Storage instance
- Throws:
WrongTypeException
- is thrown when the type Boolean is wrong for this key- Since:
- 10.0.34
-
setEncryptedString
Storage setEncryptedString(java.lang.String key, java.lang.String value) throws WrongTypeException
Sets the KeyValue pair for this Storage. The value type is String. This string will be saved encrypted.- Specified by:
setEncryptedString
in interfaceIntermediateStorage
- Parameters:
key
- the keyvalue
- the String value- Returns:
- this Storage instance
- Throws:
WrongTypeException
- is thrown when the type String is wrong for this key or the type of the key is an unencrypted String- Since:
- 10.0.102
-
-