Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Constructor Summary
`EncryptableEntity()`

Method Summary
`abstract void` | `decrypt(String password)` decrypt the entity.
`abstract void` | `encrypt(String password)` encrypt the entity.
`boolean` | `isEncrypted()`
`void` | `setEncrypted(boolean encrypted)` set the encrypted flag

Methods inherited from class net.sf.borg.model.entity.KeyedEntity
`clone, copy, getKey, setKey`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EncryptableEntity

    public EncryptableEntity()

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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