|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.validation.ValidationFailure
public class ValidationFailure
Information about the failure of an attempt to validate an object.
Version Info:
$Revision: 370 $ |
$Date: 2007-02-20 15:35:20 -0700 (Tue, 20 Feb 2007) $ |
$Author: dharland $ |
Constructor Summary | |
---|---|
ValidationFailure()
Creates a new instance. |
|
ValidationFailure(String displayMessage,
String debugMessage,
FailureSeverity severity,
Object validationTarget,
String nameOfValidator)
Deprecated. |
|
ValidationFailure(String displayMessage,
String debugMessage,
FailureSeverity severity,
Object validationTarget,
String nameOfValidator,
String nameOfTest)
Creates a new instance with the given properties. |
Method Summary | |
---|---|
String |
getDebugMessage()
Returns the technical message of this failure. |
String |
getDisplayMessage()
Returns a message suitable for display to a user. |
String |
getNameOfTest()
Returns the name of the test that triggered this failure. |
String |
getNameOfValidator()
Returns the name of the validator that triggered this failure. |
FailureSeverity |
getSeverity()
Returns the severity of this failure. |
Object |
getValidationTarget()
Returns the object that failed this validation. |
boolean |
isDisplayable()
Returns true if this message is suitable for display to a user. |
void |
setDebugMessage(String newMessage)
Sets a technical message for this failure. |
void |
setDisplayMessage(String newMessage)
Sets a message suitable for display to a user. |
void |
setNameOfTest(String newName)
Sets the name of the test that triggered this failure. |
void |
setNameOfValidator(String newName)
Sets the name of the validator that triggered this failure. |
void |
setSeverity(FailureSeverity newSeverity)
Sets the severity of this failure. |
void |
setValidationTarget(Object newTarget)
Sets the object that failed this validation. |
static ValidationFailure |
wrongObjectType(String validatorName,
Object target,
String expectedType)
Creates a new failure instance for validators that receive unexpected target types. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValidationFailure()
public ValidationFailure(String displayMessage, String debugMessage, FailureSeverity severity, Object validationTarget, String nameOfValidator, String nameOfTest)
@Deprecated public ValidationFailure(String displayMessage, String debugMessage, FailureSeverity severity, Object validationTarget, String nameOfValidator)
Method Detail |
---|
public void setDebugMessage(String newMessage)
newMessage
- a technical message for this failure.public String getDebugMessage()
public void setDisplayMessage(String newMessage)
newMessage
- a displayable message for this failure.public String getDisplayMessage()
public boolean isDisplayable()
public void setNameOfValidator(String newName)
newName
- the name of the validator that triggered this failure.public String getNameOfValidator()
public String getNameOfTest()
public void setNameOfTest(String newName)
newName
- the name of the test that triggered this failure.public void setSeverity(FailureSeverity newSeverity)
newSeverity
- the severity of this failure.public FailureSeverity getSeverity()
public void setValidationTarget(Object newTarget)
newTarget
- the object that failed this validation.public Object getValidationTarget()
public static ValidationFailure wrongObjectType(String validatorName, Object target, String expectedType)
validatorName
- the name of the validator for which this failure is
being made.target
- the object being validated.expectedType
- the type of object the validator expected.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |