Enum ValidationMessageLevel

  • All Implemented Interfaces:
    Serializable, Comparable<ValidationMessageLevel>

    public enum ValidationMessageLevel
    extends Enum<ValidationMessageLevel>

    An enumeration class that defines possible levels for validation messages.

    Messages produced by Validator implementations do not necessarily indicate fatal errors. It is also possible to issue warnings to the user. This enumeration class defines levels for validation messages supported by this library.

    Only the level ERROR represents a real validation error. If an input component contains a ValidationMessage with the level ERROR, it is considered invalid, and the associated form cannot be closed using the OK button. Other levels are only informative and do not have any real consequences.

    Version:
    $Id: ValidationMessageLevel.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Enum Constant Detail

      • ERROR

        public static final ValidationMessageLevel ERROR
        The validation message level ERROR. This level indicates a real validation error. Messages with this level cause input elements to be considered invalid.
      • WARNING

        public static final ValidationMessageLevel WARNING
        The validation message level WARNING. This level can be used if user input violates a recommendation, but nevertheless can be accepted.
    • Method Detail

      • values

        public static ValidationMessageLevel[] 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 (ValidationMessageLevel c : ValidationMessageLevel.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ValidationMessageLevel 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