Enum LogConfidentialityLevel

    • Method Detail

      • values

        public static LogConfidentialityLevel[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LogConfidentialityLevel c : LogConfidentialityLevel.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LogConfidentialityLevel valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • maskWithTolerance

        public String maskWithTolerance​(String info,
                                        LogConfidentialityLevel infoToleranceLevel)
        Mask the argument if the tolerance level is lower or equal to the receiver (which would typically represent the actual configuration). so for instance passwords and auth tokens would have a LOW tolerance, whereas lease ids and usernames would have a MEDIUM tolerance. As a result usernames would be shown and passwords would be hidden if the system was configured with a MEDIUM level.