com.jp.protection.pub
Interface SecretStorage

All Known Implementing Classes:
FileSecretStorage, JarFileSecretStorage, PreferencesSecretStorage

public interface SecretStorage

Provides methods used by the LicenseHost to load and store miscellaneous properties in a secret and safe manner

See Also:
FileSecretStorage

Nested Class Summary
static interface SecretStorage.Provider
          Allows creation of secret storage instances of certain type
 
Method Summary
 java.lang.String getProperty(java.lang.String key)
          Gets property value by its key
 java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
          Gets property value by its key
 void load()
          Loads the storage from some persistent state
 void save()
          Saves the storage to some persistent state
 java.lang.Object setProperty(java.lang.String key, java.lang.String value)
          Specifies property value for the given key
 

Method Detail

getProperty

java.lang.String getProperty(java.lang.String key)
Gets property value by its key

Parameters:
key - identifies value to return
Returns:
property value

getProperty

java.lang.String getProperty(java.lang.String key,
                             java.lang.String defaultValue)
Gets property value by its key

Parameters:
key - identifies value to be return
defaultValue - a value should be returned if there is no value for the given key
Returns:
property value

setProperty

java.lang.Object setProperty(java.lang.String key,
                             java.lang.String value)
Specifies property value for the given key

Parameters:
key - identifies value to specify
value - value to be associated with the key
Returns:
previous property value

load

void load()
Loads the storage from some persistent state


save

void save()
Saves the storage to some persistent state