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​(Collection<String> names,
                                         String redactionPrefix,
                                         String data)
        Replace actual names found in a string with meaningless randomized names.
        Parameters:
        names - actual names
        redactionPrefix - prefix to use for redacted names
        data - string to redact
        Returns:
        redacted string where all actual names have been replaced.