Class IntegerAnonymizer
- java.lang.Object
-
- org.apache.directory.api.ldap.model.ldif.anonymizer.AbstractAnonymizer<String>
-
- org.apache.directory.api.ldap.model.ldif.anonymizer.IntegerAnonymizer
-
- All Implemented Interfaces:
Anonymizer<String>
- Direct Known Subclasses:
TelephoneNumberAnonymizer
public class IntegerAnonymizer extends AbstractAnonymizer<String>
A default anonymizer for attributes that is an Integer. the initial value is randomized- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description IntegerAnonymizer()
Creates a new instance of IntegerAnonymizer.IntegerAnonymizer(Map<Integer,String> latestIntegerMap)
Creates a new instance of IntegerAnonymizer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)Map<Integer,String>
getLatestIntegerMap()
void
setLatestIntegerMap(Map<Integer,String> latestIntegerMap)
Set the Map containing anonymized integers-
Methods inherited from class org.apache.directory.api.ldap.model.ldif.anonymizer.AbstractAnonymizer
getLatestBytesMap, getLatestStringMap, setAnonymizers, setLatestBytesMap, setLatestStringMap, setSchemaManager
-
-
-
-
Constructor Detail
-
IntegerAnonymizer
public IntegerAnonymizer()
Creates a new instance of IntegerAnonymizer.
-
IntegerAnonymizer
public IntegerAnonymizer(Map<Integer,String> latestIntegerMap)
Creates a new instance of IntegerAnonymizer.- Parameters:
latestIntegerMap
- The map containing the latest integer value for each length
-
-
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
-
getLatestIntegerMap
public Map<Integer,String> getLatestIntegerMap()
- Returns:
- The Map containing the latest anonymized value for each integer
-
setLatestIntegerMap
public void setLatestIntegerMap(Map<Integer,String> latestIntegerMap)
Set the Map containing anonymized integers- Parameters:
latestIntegerMap
- The Map containing the latest anonymized value for each integer
-
-