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
COLL_REDACTION_PREFIX
static String
NODE_REDACTION_PREFIX
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(Map<String,String> redactions, String data)
Replace actual names found in a string with redacted 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
-
NODE_REDACTION_PREFIX
public static final String NODE_REDACTION_PREFIX
- See Also:
- Constant Field Values
-
COLL_REDACTION_PREFIX
public static final String COLL_REDACTION_PREFIX
- 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(Map<String,String> redactions, String data)
Replace actual names found in a string with redacted names.- Parameters:
redactions
- a map of original to redacted namesdata
- string to redact- Returns:
- redacted string where all actual names have been replaced.
-
-