adapforms.runtime.validation
Enum ValidationSeverity

java.lang.Object
  extended by java.lang.Enum<ValidationSeverity>
      extended by adapforms.runtime.validation.ValidationSeverity
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ValidationSeverity>

public enum ValidationSeverity
extends java.lang.Enum<ValidationSeverity>

The severity or type of a ValidationProblem. This specifies how the framework will treat the error (for instance see FormInstance.getStatusComplete() and how the error is displayed to the user.

Author:
Henrik Gammelmark, geemark@cs.au.dk

Enum Constant Summary
Error
          An error that in most circumstances must not be ignored.
Required
          Special type of warning that lets the user know he forgot to fill out a required field.
Warning
          Warning: Notify the user that something may be wrong, but it is not an error.
 
Method Summary
static ValidationSeverity valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ValidationSeverity[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Warning

public static final ValidationSeverity Warning
Warning: Notify the user that something may be wrong, but it is not an error. An example could be if the user entered a birthday, resulting in her age being 123 years. Probably an error, but does not need to be.


Required

public static final ValidationSeverity Required
Special type of warning that lets the user know he forgot to fill out a required field.


Error

public static final ValidationSeverity Error
An error that in most circumstances must not be ignored. For instance, if the user entered an email address that is not valid, or entered a text value in an integer field.

Method Detail

values

public static ValidationSeverity[] 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 (ValidationSeverity c : ValidationSeverity.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ValidationSeverity valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null