Cumulus4j API
(1.1.0)

org.cumulus4j.store.crypto
Class CryptoContext

java.lang.Object
  extended by org.cumulus4j.store.crypto.CryptoContext

public class CryptoContext
extends Object

Context for encryption and decryption.

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de

Constructor Summary
CryptoContext(EncryptionCoordinateSetManager encryptionCoordinateSetManager, KeyStoreRefManager keyStoreRefManager, ExecutionContext executionContext, PersistenceManagerConnection persistenceManagerConnection)
          Create a new context.
 
Method Summary
 CryptoSession getCryptoSession()
           
 EncryptionCoordinateSetManager getEncryptionCoordinateSetManager()
          Get the EncryptionCoordinateSetManager to be used in this context; never null.
 ExecutionContext getExecutionContext()
          Get the ExecutionContext to be used in this context; never null.
 int getKeyStoreRefID()
           
 KeyStoreRefManager getKeyStoreRefManager()
           
 PersistenceManagerConnection getPersistenceManagerConnection()
          Get the PersistenceManagerConnection to be used in this context; never null.
 PersistenceManager getPersistenceManagerForData()
          Convenience method synonymous to PersistenceManagerConnection.getDataPM().
 PersistenceManager getPersistenceManagerForIndex()
          Convenience method synonymous to PersistenceManagerConnection.getIndexPM().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CryptoContext

public CryptoContext(EncryptionCoordinateSetManager encryptionCoordinateSetManager,
                     KeyStoreRefManager keyStoreRefManager,
                     ExecutionContext executionContext,
                     PersistenceManagerConnection persistenceManagerConnection)
Create a new context.

Parameters:
encryptionCoordinateSetManager - the EncryptionCoordinateSetManager to be used in this context; must not be null.
keyStoreRefManager - the KeyStoreRefManager to be used in this context; must not be null.
executionContext - the ExecutionContext to be used in this context; must not be null.
persistenceManagerConnection - the PersistenceManagerConnection to be used in this context; must not be null.
Method Detail

getKeyStoreRefManager

public KeyStoreRefManager getKeyStoreRefManager()

getEncryptionCoordinateSetManager

public EncryptionCoordinateSetManager getEncryptionCoordinateSetManager()
Get the EncryptionCoordinateSetManager to be used in this context; never null.

Returns:
the EncryptionCoordinateSetManager to be used in this context; never null.

getExecutionContext

public ExecutionContext getExecutionContext()
Get the ExecutionContext to be used in this context; never null.

Returns:
the ExecutionContext to be used in this context; never null.

getPersistenceManagerConnection

public PersistenceManagerConnection getPersistenceManagerConnection()
Get the PersistenceManagerConnection to be used in this context; never null.

Returns:
the PersistenceManagerConnection to be used in this context; never null.

getPersistenceManagerForData

public PersistenceManager getPersistenceManagerForData()
Convenience method synonymous to PersistenceManagerConnection.getDataPM().

Returns:
the PM used for the actual data.

getPersistenceManagerForIndex

public PersistenceManager getPersistenceManagerForIndex()
Convenience method synonymous to PersistenceManagerConnection.getIndexPM().

Returns:
the PM used for index data. If there is no separate index-datastore, this is the same as getPersistenceManagerForData().

getCryptoSession

public CryptoSession getCryptoSession()

getKeyStoreRefID

public int getKeyStoreRefID()

Cumulus4j API
(1.1.0)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.