org.beanfabrics.validation
Interface ValidationRule

All Known Implementing Classes:
AbstractPM.PropertiesValidationRule, AbstractValuePM.MandatoryValidationRule, BigDecimalPM.BigDecimalValidationRule, DatePM.DateValidationRule, IntegerPM.IntegerValidationRule, ListPM.ListElementsValidationRule, MapPM.ListElementsValidationRule, OperationPM.DefaultValidationRule, TextPM.DefaultOptionsValidationRule, Validator

public interface ValidationRule

A ValidationRule is a rule that evaluates the current execution context in respect of a certain set of constraints. It is responsible for producing a ValidationState as the result whereas a null result means 'valid' and a not-null result means 'invalid'. Usually multiple rules are composed into a Validator which normally are used by Validatable objects for validating their state.

See Also:
online tutorial on the validation framework< /a>

Method Summary
 ValidationState validate()
          Produces a fresh ValidationState.
 

Method Detail

validate

ValidationState validate()
Produces a fresh ValidationState. A null return value indicates that this rule has been successfully validated. A not- null value indicates that this rule has found an invalid state.

Returns:
the fresh validation result of this rule.