Class EncryptionContext


  • public final class EncryptionContext
    extends Object
    This class serves to provide additional useful data to EncryptionMaterialsProviders so they can more intelligently select the proper EncryptionMaterials or DecryptionMaterials for use. Any of the methods are permitted to return null.

    For the simplest cases, all a developer needs to provide in the context are:

    • TableName
    • HashKeyName
    • RangeKeyName (if present)
    This class is immutable.
    Author:
    Greg Rubin
    • Method Detail

      • getTableName

        public String getTableName()
        Returns the name of the DynamoDB Table this record is associated with.
      • getAttributeValues

        public Map<String,​com.amazonaws.services.dynamodbv2.model.AttributeValue> getAttributeValues()
        Returns the DynamoDB record about to be encrypted/decrypted.
      • getModeledClass

        public Class<?> getModeledClass()
        When used for an object mapping layer (such as DynamoDBMapper) this represents the class being mapped to/from DynamoDB.
      • getDeveloperContext

        public Object getDeveloperContext()
        This object has no meaning (and will not be set or examined) by any core libraries. It exists to allow custom object mappers and data access layers to pass data to EncryptionMaterialsProviders through the DynamoDBEncryptor.
      • getHashKeyName

        public String getHashKeyName()
        Returns the name of the HashKey attribute for the record to be encrypted/decrypted.
      • getRangeKeyName

        public String getRangeKeyName()
        Returns the name of the RangeKey attribute for the record to be encrypted/decrypted.
      • getMaterialDescription

        public Map<String,​String> getMaterialDescription()