net.sf.borg.model.entity
Class EncryptableEntity<T>
java.lang.Object
net.sf.borg.model.entity.KeyedEntity<T>
net.sf.borg.model.entity.EncryptableEntity<T>
- Type Parameters:
T
- the entity class
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- Appointment, Memo
public abstract class EncryptableEntity<T>
- extends KeyedEntity<T>
Abstract base class for entities that can have encrypted fields. It is up to
the entity specific decrypt and encrypt methods to determine which fields are
to be encrypted
- See Also:
- Serialized Form
EncryptableEntity
public EncryptableEntity()
isEncrypted
public boolean isEncrypted()
- Returns:
- true if the entity is encrypted
setEncrypted
public void setEncrypted(boolean encrypted)
- set the encrypted flag
- Parameters:
encrypted
- the encrypted to set
decrypt
public abstract void decrypt(String password)
throws Exception
- decrypt the entity. This will use the password to get the borg encryption
key from the keystore and then will decrypt those fields in the entity that are encrypted.
the entity encrypted flag will be set to false.
- Parameters:
password
- the keystore password
- Throws:
Exception
encrypt
public abstract void encrypt(String password)
throws Exception
- encrypt the entity. This will use the password to get the borg encryption
key from the keystore and then will encrypt those fields in the entity that are encryptable.
the entity encrypted flag will be set to true.
- Parameters:
password
- the keystore password
- Throws:
Exception
Generated September 24 2010 by mbb using Apache Ant version 1.7.1 compiled on June 27 2008 and Java version 1.6.0_20 from Sun Microsystems Inc. on Linux i386 2.6.24-28-generic