Package org.apache.solr.util
Class RedactionUtils.RedactionContext
- java.lang.Object
-
- org.apache.solr.util.RedactionUtils.RedactionContext
-
- Enclosing class:
- RedactionUtils
public static final class RedactionUtils.RedactionContext extends Object
A helper class to build unique mappings from original to redacted names.
-
-
Constructor Summary
Constructors Constructor Description RedactionContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEquivalentName(String original, String equivalent, String redactionPrefix)
Add a name that needs to be mapped to the same redacted format as another one.void
addName(String name, String redactionPrefix)
Add a name to be redacted.Map<String,String>
getRedactions()
Get a map of original to redacted names.
-
-
-
Method Detail
-
addName
public void addName(String name, String redactionPrefix)
Add a name to be redacted.- Parameters:
name
- original nameredactionPrefix
- prefix for the redacted name
-
addEquivalentName
public void addEquivalentName(String original, String equivalent, String redactionPrefix)
Add a name that needs to be mapped to the same redacted format as another one.- Parameters:
original
- original name already mapped (will be added automatically if missing)equivalent
- another name that needs to be mapped to the same redacted nameredactionPrefix
- prefix for the redacted name
-
-