org.makumba
Interface ValidationRule

All Superinterfaces:
Comparable<ValidationRule>
All Known Implementing Classes:
BasicValidationRule, ComparisonValidationRule, NumberRangeValidationRule, RangeValidationRule, RegExpValidationRule, SingleFieldValidationRule, StringLengthValidationRule

public interface ValidationRule
extends Comparable<ValidationRule>

Defines the basics of a Makumba Validation rule.

Version:
$Id: ValidationRule.java 3694 2009-02-11 00:41:05Z rosso_nero $
Author:
Rudolf Mayer

Method Summary
 String getErrorMessage()
          Gets the error message that should be shown for this rule.
 FieldDefinition getFieldDefinition()
          Gets the FieldDefinition this rule applies to.
 String getRuleName()
          Gets the name of this rule.
 boolean validate(Object value)
          Perform the validation process.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

validate

boolean validate(Object value)
                 throws InvalidValueException
Perform the validation process.

Throws:
InvalidValueException - if the validation fails

getErrorMessage

String getErrorMessage()
Gets the error message that should be shown for this rule.


getRuleName

String getRuleName()
Gets the name of this rule.


getFieldDefinition

FieldDefinition getFieldDefinition()
Gets the FieldDefinition this rule applies to.