adapforms.runtime.validation
Class ValidationRule

java.lang.Object
  extended by adapforms.runtime.validation.ValidationRule

public class ValidationRule
extends java.lang.Object

Holds a validation rule for a single element. A rule is a criteria that should be true, and a problem definition text and severity to use when this is not the case.

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

Constructor Summary
ValidationRule(BooleanExpression criteria, java.lang.String message, ValidationSeverity severity)
          Create a new rule.
 
Method Summary
 ValidationRule clone()
           
 BooleanExpression getCriteria()
          Get the criteria to use for validation.
 java.lang.String getMessage()
          Get the problem message to present to the user.
 ValidationSeverity getSeverity()
          Get the problem severity.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidationRule

public ValidationRule(BooleanExpression criteria,
                      java.lang.String message,
                      ValidationSeverity severity)
Create a new rule.

Method Detail

getMessage

public java.lang.String getMessage()
Get the problem message to present to the user. May be a localization key.


getSeverity

public ValidationSeverity getSeverity()
Get the problem severity.


getCriteria

public BooleanExpression getCriteria()
Get the criteria to use for validation.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public ValidationRule clone()
Overrides:
clone in class java.lang.Object