Class RedactionUtils


  • public class RedactionUtils
    extends Object
    • Constructor Detail

      • RedactionUtils

        public RedactionUtils()
    • 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 names
        data - string to redact
        Returns:
        redacted string where all actual names have been replaced.