org.makumba
Interface ValidationRule

All Superinterfaces:
Comparable<ValidationRule>

public interface ValidationRule
extends Comparable<ValidationRule>

Defines the basics of a Makumba Validation rule.

Version:
$Id: ValidationRule.java 5136 2010-05-18 18:22:33Z rosso_nero $
Author:
Rudolf Mayer, Manuel Gay

Method Summary
 DataDefinition getDataDefinition()
          Gets the DataDefinition this rule applies to
 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.
 Collection<String> getValidationRuleArguments()
          Gets the arguments (field names) this rule applies to
 boolean validate(Object value, Transaction t)
          Perform the validation process.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

validate

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

Parameters:
t - TODO
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.


getValidationRuleArguments

Collection<String> getValidationRuleArguments()
Gets the arguments (field names) this rule applies to


getDataDefinition

DataDefinition getDataDefinition()
Gets the DataDefinition this rule applies to