|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Validator
An object capable of validating an item of data.
Implementations of this interface should never throw ValidationExceptions directly because the object being validated
may have be using the validation event mechansim. Instead they should call ValidationManager.fireValidationEvent(ValidationEvent)
which will in turn fire an event or throw an exception as required.
Also, care should be taken to always return false when a validation event has occurred and always return true if not, otherwise validation will fail with no error reported or vice-versa.
Method Summary | |
---|---|
boolean |
validate(Object object,
DataComponent component,
ComplexDataObject context,
ValidationManager manager)
Validate the given object. |
Method Detail |
---|
boolean validate(Object object, DataComponent component, ComplexDataObject context, ValidationManager manager) throws ValidationException
object
- The object to be validated - commonly a String, Integer, Double, Date etc.component
- The Element
or Attribute
inside context
which defines object
.context
- The parent of object
- could be null
.manager
- The validation manager which is performing this validation.
ValidationException
- If the object is not valid and the validation maanger is operating in exception mode.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |