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>
public class StringAnonymizer extends AbstractAnonymizer<String>
A default anonymizer for attributes that are HR. It covers DirectoryString, Ia5String, ...- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from class org.apache.directory.api.ldap.model.ldif.anonymizer.AbstractAnonymizer
attributeAnonymizers, caseSensitive, schemaManager
-
-
Constructor Summary
Constructors Constructor Description StringAnonymizer()Creates a new instance of StringAnonymizer.StringAnonymizer(Map<Integer,String> latestStringMap)Creates a new instance of StringAnonymizer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attributeanonymize(Map<Value,Value> valueMap, Set<Value> valueSet, Attribute attribute)Anonymize an attribute using pure random values (either chars of bytes, depending on the Attribute type)Map<Integer,String>getLatestStringMap()voidsetLatestStringMap(Map<Integer,String> latestStringMap)-
Methods inherited from class org.apache.directory.api.ldap.model.ldif.anonymizer.AbstractAnonymizer
computeNewValue, computeNewValue, getLatestBytesMap, setAnonymizers, setLatestBytesMap, setSchemaManager
-
-
-
-
Method Detail
-
anonymize
public Attribute anonymize(Map<Value,Value> valueMap, Set<Value> valueSet, Attribute attribute)
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
public Map<Integer,String> getLatestStringMap()
- Specified by:
getLatestStringMapin interfaceAnonymizer<String>- Overrides:
getLatestStringMapin classAbstractAnonymizer<String>- Returns:
- The latest String anonymized value map
-
setLatestStringMap
public void setLatestStringMap(Map<Integer,String> latestStringMap)
- Specified by:
setLatestStringMapin interfaceAnonymizer<String>- Overrides:
setLatestStringMapin classAbstractAnonymizer<String>- Parameters:
latestStringMap- The latest String anonymized value map
-
-