|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.idoox.security.pstore.PStore
Represents protected storage of security related
detabases, methods that allows to get singletons of
underlaying UserStore
and KeyStore
implementations.
Constructor Summary | |
protected |
PStore(java.lang.String password)
This constructor must be implemented by extenders. |
Method Summary | |
void |
destroy()
Releases allocated resources during Wasp destroy. |
static PStore |
getInstance(java.lang.String password)
returns default instance of protected storage takes parameters from properties. |
abstract KeyStore |
getKeyStore()
returns instance of the KeyStore class |
protected static KeyStore |
getKeyStore(java.lang.String password)
Gets KeyStore instance using security Config property "keystore.impl". |
protected static KeyStoreSource |
getKeyStoreSource()
Gets KeyStoreSource instance (can be called if the KeyStore/PStore instance needs KeyStoreSource). |
abstract UserStore |
getUserStore()
returns instance of the UserStore class |
protected static UserStore |
getUserStore(java.lang.String password)
Gets UserStore instance using security Config property "userstore.impl". |
protected static UserStoreSource |
getUserStoreSource()
Gets UserStoreSource instance (can be called if the UserStore/PStore instance needs UserStoreSource). |
protected static void |
registerAdditionalPropertySerializers(UserStore userStore)
Registers additional property serializers for given userstore. |
static void |
setAdditionalPropertySerializers(java.lang.String[] keys,
PropertySerializer[] serializers)
Sets additional property serializers that are registered to userstore part of protected store. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected PStore(java.lang.String password) throws BadPasswordException
password
- password to unlock the protected storage
BadPasswordException
- wrong passwordMethod Detail |
public static PStore getInstance(java.lang.String password) throws BadPasswordException
The instance of protected store is only one for whole Java VM. It must be first unlocked using correct password and it is than available to the rest of the Java VM even without password specification.
password
- password to unlock the protected storage
BadPasswordException
public abstract KeyStore getKeyStore()
public abstract UserStore getUserStore()
protected static KeyStoreSource getKeyStoreSource() throws java.lang.Exception
java.lang.Exception
- cannot construct/initialize key store sourceConfig
protected static UserStoreSource getUserStoreSource() throws java.lang.Exception
java.lang.Exception
- cannot construct/initialize user store sourceConfig
protected static UserStore getUserStore(java.lang.String password) throws java.lang.Exception
password
- password used to unlock user store
java.lang.Exception
- cannot construct/initialize user storeConfig
protected static KeyStore getKeyStore(java.lang.String password) throws java.lang.Exception
password
- password used to unlock key store
java.lang.Exception
- cannot construct/initialize key storeConfig
protected static void registerAdditionalPropertySerializers(UserStore userStore)
userStore
- property serializers are added to this userpublic static void setAdditionalPropertySerializers(java.lang.String[] keys, PropertySerializer[] serializers)
serializers
- serializers to register automatically. This method can be called only before first invocation of the getInstance
method.keys
- keys for which to register associated serializer
java.lang.SecurityException
- getInstance method has been already invokedpublic void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |