Package org.apache.solr.util
Class RedactionUtils
- java.lang.Object
-
- org.apache.solr.util.RedactionUtils
-
public class RedactionUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
SOLR_REDACTION_SYSTEM_PATTERN_PROP
-
Constructor Summary
Constructors Constructor Description RedactionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getRedactString()
static boolean
isSystemPropertySensitive(String name)
Returns if the given system property should be redacted.static String
redactNames(Collection<String> names, String redactionPrefix, String data)
Replace actual names found in a string with meaningless randomized names.static void
setRedactSystemProperty(boolean redactSystemProperty)
-
-
-
Field Detail
-
SOLR_REDACTION_SYSTEM_PATTERN_PROP
public static final String SOLR_REDACTION_SYSTEM_PATTERN_PROP
- See Also:
- Constant Field Values
-
-
Method Detail
-
isSystemPropertySensitive
public static boolean isSystemPropertySensitive(String name)
Returns if the given system property should be redacted.- Parameters:
name
- The system property that is being checked.- Returns:
- true if property should be redacted.
-
getRedactString
public static String getRedactString()
- Returns:
- redaction string to be used instead of the value.
-
setRedactSystemProperty
public static void setRedactSystemProperty(boolean redactSystemProperty)
-
redactNames
public static String redactNames(Collection<String> names, String redactionPrefix, String data)
Replace actual names found in a string with meaningless randomized names.- Parameters:
names
- actual namesredactionPrefix
- prefix to use for redacted namesdata
- string to redact- Returns:
- redacted string where all actual names have been replaced.
-
-