Class EncryptionContextOperators
java.lang.Object
com.amazonaws.services.dynamodbv2.datamodeling.encryption.utils.EncryptionContextOperators
Implementations of common operators for overriding the EncryptionContext
-
Method Summary
Modifier and TypeMethodDescriptionstatic UnaryOperator<EncryptionContext>
overrideEncryptionContextTableName
(String originalTableName, String newTableName) An operator for overriding EncryptionContext's table name for a specific DynamoDBEncryptor.static UnaryOperator<EncryptionContext>
overrideEncryptionContextTableNameUsingMap
(Map<String, String> tableNameOverrideMap) An operator for mapping multiple table names in the Encryption Context to a new table name.
-
Method Details
-
overrideEncryptionContextTableName
public static UnaryOperator<EncryptionContext> overrideEncryptionContextTableName(String originalTableName, String newTableName) An operator for overriding EncryptionContext's table name for a specific DynamoDBEncryptor. If any table names or the encryption context itself is null, then it returns the original EncryptionContext.- Parameters:
originalTableName
- the name of the table that should be overridden in the Encryption ContextnewTableName
- the table name that should be used in the Encryption Context- Returns:
- A UnaryOperator that produces a new EncryptionContext with the supplied table name
-
overrideEncryptionContextTableNameUsingMap
public static UnaryOperator<EncryptionContext> overrideEncryptionContextTableNameUsingMap(Map<String, String> tableNameOverrideMap) An operator for mapping multiple table names in the Encryption Context to a new table name. If the table name for a given EncryptionContext is missing, then it returns the original EncryptionContext. Similarly, it returns the original EncryptionContext if the value it is overridden to is null, or if the original table name is null.- Parameters:
tableNameOverrideMap
- a map specifying the names of tables that should be overridden, and the values to which they should be overridden. If the given table name corresponds to null, or isn't in the map, then the table name won't be overridden.- Returns:
- A UnaryOperator that produces a new EncryptionContext with the supplied table name
-