|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.validation.Validation<T>
public abstract class Validation<T>
An individual test run by a Validator
.
Instances of this class are not generally needed by clients who request
validation, but are instead used by specific implementations of validators.
Version Info:
$Revision: 868 $ |
$Date: 2007-09-12 13:15:10 -0600 (Wed, 12 Sep 2007) $ |
$Author: dharland $ |
Field Summary | |
---|---|
protected AbstractValidator<T> |
container
The validator of which this validation is a part. |
protected ValidationPurpose |
purpose
The reason for doing this validation. |
protected FailureSeverity |
severity
A measure of the consequences of failing this validation. |
Constructor Summary | |
---|---|
protected |
Validation(AbstractValidator<T> validationContainer,
ValidationPurpose reasonForValidation)
Helps create a new instance. |
Method Summary | |
---|---|
protected abstract String |
debugMessage()
Returns a technical message to be used if this validation fails. |
protected abstract String |
displayMessage()
Returns a user-friendly message to be used if this validation fails. |
protected String |
getName()
Returns the name of this test. |
protected abstract boolean |
passesTest()
Returns true if the target object passes this validation. |
protected boolean |
run(List<ValidationFailure> failures)
Runs this validation and places any failures in the given list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AbstractValidator<T> container
protected FailureSeverity severity
protected ValidationPurpose purpose
Constructor Detail |
---|
protected Validation(AbstractValidator<T> validationContainer, ValidationPurpose reasonForValidation)
validationContainer
- the validator that holds this validation.reasonForValidation
- the reason this validation is being performed.Method Detail |
---|
protected boolean run(List<ValidationFailure> failures)
failures
- the destination for any failures encountered while
running this validation.
protected String getName()
This default implementation returns the fully qualified class name of the validation class. Implementing subclasses may choose to override this default and use some other name.
protected abstract boolean passesTest()
protected abstract String displayMessage()
protected abstract String debugMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |