|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Validator
A validator of objects. The job of this validator is to look at target objects and see if they are suitable for using for a particular purpose.
Clients do not typically fetch a validator and use it to validate
their target objects. Instead they call the
validate
method of ValidationManager
.
Version Info:
$Revision: 868 $ |
$Date: 2007-09-12 13:15:10 -0600 (Wed, 12 Sep 2007) $ |
$Author: dharland $ |
Method Summary | |
---|---|
String |
getName()
Returns the name of this validator. |
ValidationPurpose |
getPurpose()
Returns the purpose for which this validator was most recently run. |
Object |
getTarget()
Returns the object most recently subject to validation by this validator. |
void |
setManager(ValidationManager newManager)
Sets the manager for which this validator is performing its duties. |
void |
stopTestingAfterFirstFailure(boolean stop)
Tells this validator whether it should run all validations or stop after the first validation that fails. |
List<ValidationFailure> |
validate(Object target,
ValidationPurpose purpose)
Validates target for use for the given purpose . |
Method Detail |
---|
List<ValidationFailure> validate(Object target, ValidationPurpose purpose)
target
for use for the given purpose
.
target
- the object to be validated.purpose
- the reason for the validation.
void setManager(ValidationManager newManager)
newManager
.
The main use made by this validator of its manager is to request validators for the component objects held by the target object of this validator.
newManager
- the manager for which this validator is performing
its duties.void stopTestingAfterFirstFailure(boolean stop)
stop
- if true this validator will stop running its
validations after the first one fails.String getName()
Object getTarget()
ValidationPurpose getPurpose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |