Class AbstractAnonymizer<K>
java.lang.Object
org.apache.directory.api.ldap.model.ldif.anonymizer.AbstractAnonymizer<K>
- Type Parameters:
K- The type of object being anonymized
- All Implemented Interfaces:
Anonymizer<K>
- Direct Known Subclasses:
BinaryAnonymizer, CaseSensitiveStringAnonymizer, IntegerAnonymizer, StringAnonymizer
An abstract class implementing the default behavior of an Aninymizer instance
- Author:
- Apache Directory Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String, Anonymizer<K>> The map of AttributeType'sOID we want to anonymize.protected booleanA flag set totrueif the AttributeType is case sensitiveprotected SchemaManagerThe SchemaManager instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]computeNewValue(byte[] valBytes) Compute the next byte[] valueprotected StringcomputeNewValue(String valStr) Compute the next String valueGet the map of anonymized byte[] valuesGet the map of anonymized valuesvoidsetAnonymizers(Map<String, Anonymizer<K>> attributeAnonymizers) Set the list of existing anonymizersvoidsetLatestBytesMap(Map<Integer, byte[]> latestBytesMap) Set a new map of anynomized binary valuesvoidsetLatestStringMap(Map<Integer, String> latestStringMap) Set a new map of anynomized valuesvoidsetSchemaManager(SchemaManager schemaManager) Inject a SchemaManager instance in this AnonymizerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Anonymizer
anonymize
-
Field Details
-
schemaManager
The SchemaManager instance -
attributeAnonymizers
The map of AttributeType'sOID we want to anonymize. They are all associated with anonymizers -
caseSensitive
protected boolean caseSensitiveA flag set totrueif the AttributeType is case sensitive
-
-
Constructor Details
-
AbstractAnonymizer
protected AbstractAnonymizer()A protected constructor
-
-
Method Details
-
setSchemaManager
Inject a SchemaManager instance in this Anonymizer- Specified by:
setSchemaManagerin interfaceAnonymizer<K>- Parameters:
schemaManager- The SchemaManager instance
-
setAnonymizers
Set the list of existing anonymizers- Specified by:
setAnonymizersin interfaceAnonymizer<K>- Parameters:
attributeAnonymizers- The list of existing anonymizers
-
getLatestStringMap
Get the map of anonymized values- Specified by:
getLatestStringMapin interfaceAnonymizer<K>- Returns:
- The latest String anonymized value map
-
setLatestStringMap
Description copied from interface:AnonymizerSet a new map of anynomized values- Specified by:
setLatestStringMapin interfaceAnonymizer<K>- Parameters:
latestStringMap- The latest String anonymized value map
-
getLatestBytesMap
Get the map of anonymized byte[] values- Specified by:
getLatestBytesMapin interfaceAnonymizer<K>- Returns:
- The latest byte[] anonymized value map
-
setLatestBytesMap
Description copied from interface:AnonymizerSet a new map of anynomized binary values- Specified by:
setLatestBytesMapin interfaceAnonymizer<K>- Parameters:
latestBytesMap- The latest byte[] anonymized value map
-
computeNewValue
-
computeNewValue
protected byte[] computeNewValue(byte[] valBytes) Compute the next byte[] value- Parameters:
valBytes- The original value- Returns:
- The anonymized value
-