Class StringAnonymizer
java.lang.Object
org.apache.directory.api.ldap.model.ldif.anonymizer.AbstractAnonymizer<String>
org.apache.directory.api.ldap.model.ldif.anonymizer.StringAnonymizer
- All Implemented Interfaces:
Anonymizer<String>
A default anonymizer for attributes that are HR. It covers DirectoryString, Ia5String, ...
- Author:
- Apache Directory Project
-
Field Summary
Fields inherited from class AbstractAnonymizer
attributeAnonymizers, caseSensitive, schemaManager -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of StringAnonymizer.StringAnonymizer(Map<Integer, String> latestStringMap) Creates a new instance of StringAnonymizer. -
Method Summary
Modifier and TypeMethodDescriptionAnonymize an attribute using pure random values (either chars of bytes, depending on the Attribute type)Get the map of anonymized valuesvoidsetLatestStringMap(Map<Integer, String> latestStringMap) Set a new map of anynomized valuesMethods inherited from class AbstractAnonymizer
computeNewValue, computeNewValue, getLatestBytesMap, setAnonymizers, setLatestBytesMap, setSchemaManager
-
Constructor Details
-
StringAnonymizer
public StringAnonymizer()Creates a new instance of StringAnonymizer. -
StringAnonymizer
-
-
Method Details
-
anonymize
Anonymize an attribute using pure random values (either chars of bytes, depending on the Attribute type)- Parameters:
valueMap- The existing map of value to the associated anonymized counterpartvalueSet- The existing set of anonymized counterpartattribute- The attribute to anonymize- Returns:
- The anonymized attribute
-
getLatestStringMap
Get the map of anonymized values- Specified by:
getLatestStringMapin interfaceAnonymizer<String>- Overrides:
getLatestStringMapin classAbstractAnonymizer<String>- Returns:
- The latest String anonymized value map
-
setLatestStringMap
Set a new map of anynomized values- Specified by:
setLatestStringMapin interfaceAnonymizer<String>- Overrides:
setLatestStringMapin classAbstractAnonymizer<String>- Parameters:
latestStringMap- The latest String anonymized value map
-