|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.jasypt.hibernate4.encryptor.HibernatePBEEncryptorRegistry
public final class HibernatePBEEncryptorRegistry
Registry for all the PBE*Encryptor which are eligible for use from Hibernate.
This class is intended to be directly used in applications where an IoC container (like Spring Framework) is not present. If it is, it is better to use the HibernatePBE*Encryptor classes directly, instead.
This registry is a singleton which maintains a registry of PBE*Encryptor objects which can be used from Hibernate, by using its registeredName to reference them from mappings.
The steps would be:
getInstance()
).This is, first register the encryptor (example with a String encryptor):
StandardPBEStringEncryptor myEncryptor = new StandardPBEStringEncryptor(); ... HibernatePBEEncryptorRegistry registry = HibernatePBEEncryptorRegistry.getInstance(); registry.registerPBEStringEncryptor("myHibernateEncryptor", myEncryptor);
And then, reference it from a Hibernate mapping file:
<typedef name="encryptedString" class="org.jasypt.hibernate.type.EncryptedStringType"> <param name="encryptorRegisteredName">myHibernateEncryptor</param> </typedef>
Method Summary | |
---|---|
static HibernatePBEEncryptorRegistry |
getInstance()
Returns the singleton instance of the registry. |
org.jasypt.encryption.pbe.PBEBigDecimalEncryptor |
getPBEBigDecimalEncryptor(String registeredName)
Returns the PBEBigDecimalEncryptor registered with the specified name (if exists). |
org.jasypt.encryption.pbe.PBEBigIntegerEncryptor |
getPBEBigIntegerEncryptor(String registeredName)
Returns the PBEBigIntegerEncryptor registered with the specified name (if exists). |
org.jasypt.encryption.pbe.PBEByteEncryptor |
getPBEByteEncryptor(String registeredName)
Returns the PBEByteEncryptor registered with the specified name (if exists). |
org.jasypt.encryption.pbe.PBEStringEncryptor |
getPBEStringEncryptor(String registeredName)
Returns the PBEStringEncryptor registered with the specified name (if exists). |
void |
registerPBEBigDecimalEncryptor(String registeredName,
org.jasypt.encryption.pbe.PBEBigDecimalEncryptor encryptor)
Registers a PBEBigDecimalEncryptor object with the specified name. |
void |
registerPBEBigIntegerEncryptor(String registeredName,
org.jasypt.encryption.pbe.PBEBigIntegerEncryptor encryptor)
Registers a PBEBigIntegerEncryptor object with the specified name. |
void |
registerPBEByteEncryptor(String registeredName,
org.jasypt.encryption.pbe.PBEByteEncryptor encryptor)
Registers a PBEByteEncryptor object with the specified name. |
void |
registerPBEStringEncryptor(String registeredName,
org.jasypt.encryption.pbe.PBEStringEncryptor encryptor)
Registers a PBEStringEncryptor object with the specified name. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static HibernatePBEEncryptorRegistry getInstance()
public void registerPBEStringEncryptor(String registeredName, org.jasypt.encryption.pbe.PBEStringEncryptor encryptor)
registeredName
- the registered name.encryptor
- the encryptor to be registered.public org.jasypt.encryption.pbe.PBEStringEncryptor getPBEStringEncryptor(String registeredName)
registeredName
- the name with which the desired encryptor was
registered.
public void registerPBEBigIntegerEncryptor(String registeredName, org.jasypt.encryption.pbe.PBEBigIntegerEncryptor encryptor)
registeredName
- the registered name.encryptor
- the encryptor to be registered.public org.jasypt.encryption.pbe.PBEBigIntegerEncryptor getPBEBigIntegerEncryptor(String registeredName)
registeredName
- the name with which the desired encryptor was
registered.
public void registerPBEBigDecimalEncryptor(String registeredName, org.jasypt.encryption.pbe.PBEBigDecimalEncryptor encryptor)
registeredName
- the registered name.encryptor
- the encryptor to be registered.public org.jasypt.encryption.pbe.PBEBigDecimalEncryptor getPBEBigDecimalEncryptor(String registeredName)
registeredName
- the name with which the desired encryptor was
registered.
public void registerPBEByteEncryptor(String registeredName, org.jasypt.encryption.pbe.PBEByteEncryptor encryptor)
registeredName
- the registered name.encryptor
- the encryptor to be registered.public org.jasypt.encryption.pbe.PBEByteEncryptor getPBEByteEncryptor(String registeredName)
registeredName
- the name with which the desired encryptor was
registered.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |