org.makumba
Interface ValidationDefinition


public interface ValidationDefinition

Information about a makumba validation definition. Implementations of this interface can obtain the validation definition e.g. by parsing a validation definition file, or other means.

Version:
$Id: ValidationDefinition.java 5136 2010-05-18 18:22:33Z rosso_nero $
Author:
Rudolf Mayer

Method Summary
 void addRule(String fieldName, Collection<ValidationRule> rules)
          Add several rules for the given field.
 void addRule(String fieldName, ValidationRule rule)
          Add a new rule for the given field.
 DataDefinition getDataDefinition()
          Get the data definition associated with this validation definition.
 String getName()
          Name of this validation definition, normally the same
 ValidationRule getValidationRule(String ruledName)
          Get the validation rule with the given rule name.
 Collection<ValidationRule> getValidationRules(String fieldName)
          Get all validation rules for the given field name.
 boolean hasValidationRules()
           
 

Method Detail

getName

String getName()
Name of this validation definition, normally the same


getValidationRules

Collection<ValidationRule> getValidationRules(String fieldName)
Get all validation rules for the given field name.


getValidationRule

ValidationRule getValidationRule(String ruledName)
Get the validation rule with the given rule name.


addRule

void addRule(String fieldName,
             ValidationRule rule)
Add a new rule for the given field.


addRule

void addRule(String fieldName,
             Collection<ValidationRule> rules)
Add several rules for the given field.


getDataDefinition

DataDefinition getDataDefinition()
Get the data definition associated with this validation definition.


hasValidationRules

boolean hasValidationRules()