Class AbstractKeyInSessionCryptFactory<T extends IClusterable>
- java.lang.Object
-
- org.apache.wicket.core.util.crypt.AbstractKeyInSessionCryptFactory<T>
-
- Type Parameters:
T
- the type for the secret key.
- All Implemented Interfaces:
ICryptFactory
- Direct Known Subclasses:
KeyInSessionSunJceCryptFactory
public abstract class AbstractKeyInSessionCryptFactory<T extends IClusterable> extends Object implements ICryptFactory
Base class to implement crypt factories that store crypt into user session. Note that the use of this crypt factory will result in an immediate creation of a http session.- Author:
- andrea del bene
-
-
Constructor Summary
Constructors Constructor Description AbstractKeyInSessionCryptFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ICrypt
createCrypt(T key)
protected abstract T
generateKey(Session session)
Generates the secret key for a new crypt.ICrypt
newCrypt()
Creates a new crypt for the current user session.
-
-
-
Constructor Detail
-
AbstractKeyInSessionCryptFactory
public AbstractKeyInSessionCryptFactory()
-
-
Method Detail
-
newCrypt
public ICrypt newCrypt()
Creates a new crypt for the current user session. If no user session is available, a new one is created.- Specified by:
newCrypt
in interfaceICryptFactory
- Returns:
-
generateKey
protected abstract T generateKey(Session session)
Generates the secret key for a new crypt.- Parameters:
session
- the current user session where crypt will be stored- Returns:
- the secret key for a new crypt
-
createCrypt
protected abstract ICrypt createCrypt(T key)
- Returns:
- the
ICrypt
to use
-
-