Class BinaryAnonymizer
- java.lang.Object
-
- org.apache.directory.api.ldap.model.ldif.anonymizer.AbstractAnonymizer<byte[]>
-
- org.apache.directory.api.ldap.model.ldif.anonymizer.BinaryAnonymizer
-
- All Implemented Interfaces:
Anonymizer<byte[]>
public class BinaryAnonymizer extends AbstractAnonymizer<byte[]>
A default anonymizer for attributes that are not HR- Author:
- Apache Directory Project
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Integer,byte[]>latestBytesMapThe latest anonymized byte[] value map-
Fields inherited from class org.apache.directory.api.ldap.model.ldif.anonymizer.AbstractAnonymizer
attributeAnonymizers, caseSensitive, schemaManager
-
-
Constructor Summary
Constructors Constructor Description BinaryAnonymizer()Creates a new instance of BinaryAnonymizer.BinaryAnonymizer(Map<Integer,byte[]> latestBytesMap)Creates a new instance of BinaryAnonymizer.
-
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,byte[]>getLatestBytesMap()voidsetLatestBytesMap(Map<Integer,byte[]> latestBytesMap)-
Methods inherited from class org.apache.directory.api.ldap.model.ldif.anonymizer.AbstractAnonymizer
computeNewValue, computeNewValue, getLatestStringMap, setAnonymizers, setLatestStringMap, 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
-
getLatestBytesMap
public Map<Integer,byte[]> getLatestBytesMap()
- Specified by:
getLatestBytesMapin interfaceAnonymizer<byte[]>- Overrides:
getLatestBytesMapin classAbstractAnonymizer<byte[]>- Returns:
- The latest byte[] anonymized value map
-
setLatestBytesMap
public void setLatestBytesMap(Map<Integer,byte[]> latestBytesMap)
- Specified by:
setLatestBytesMapin interfaceAnonymizer<byte[]>- Overrides:
setLatestBytesMapin classAbstractAnonymizer<byte[]>- Parameters:
latestBytesMap- The latest byte[] anonymized value map
-
-