|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.uwyn.rife.site.ValidationError
public abstract class ValidationError
Instances of this class detail subjects that were found invalid during validation.
Each ValidationError is tied to a specific subject and
provides more information through an explicative textual identifier.
A collection of commonly used identifiers and implementations are provided as static member variables and static inner classes.
Validated| Nested Class Summary | |
|---|---|
static class |
ValidationError.INCOMPLETE
|
static class |
ValidationError.INVALID
|
static class |
ValidationError.MANDATORY
|
static class |
ValidationError.NOTNUMERIC
|
static class |
ValidationError.NOTSAMEAS
|
static class |
ValidationError.UNEXPECTED
|
static class |
ValidationError.UNICITY
|
static class |
ValidationError.WRONGFORMAT
|
static class |
ValidationError.WRONGLENGTH
|
| Field Summary | |
|---|---|
static String |
IDENTIFIER_INCOMPLETE
|
static String |
IDENTIFIER_INVALID
|
static String |
IDENTIFIER_MANDATORY
|
static String |
IDENTIFIER_NOTNUMERIC
|
static String |
IDENTIFIER_NOTSAME
|
static String |
IDENTIFIER_UNEXPECTED
|
static String |
IDENTIFIER_UNICITY
|
static String |
IDENTIFIER_WRONGFORMAT
|
static String |
IDENTIFIER_WRONGLENGTH
|
| Constructor Summary | |
|---|---|
ValidationError(String identifier,
String subject)
Creates a new ValidationError instance for the specified
identifier and subject. |
|
ValidationError(String identifier,
String subject,
boolean overridable)
Creates a new ValidationError instance for the specified
identifier and subject. |
|
| Method Summary | |
|---|---|
Object |
clone()
|
boolean |
equals(Object object)
|
ValidationError |
erroneousValue(Object erroneousValue)
Chainable setter to make validation error construction easier |
Object |
getErroneousValue()
Returns the erroneous value that caused the validation error, if it's present. |
String |
getIdentifier()
Returns the textual identifier that categorizes this validation error. |
String |
getSubject()
Returns the erroneous subject name of this validation error. |
int |
hashCode()
|
boolean |
isOverridable()
Returns wether this error is overridable for the same subject. |
void |
setErroneousValue(Object erroneousValue)
Stores the erroneous value that caused the validation error. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String IDENTIFIER_MANDATORY
public static final String IDENTIFIER_UNICITY
public static final String IDENTIFIER_WRONGLENGTH
public static final String IDENTIFIER_WRONGFORMAT
public static final String IDENTIFIER_NOTNUMERIC
public static final String IDENTIFIER_UNEXPECTED
public static final String IDENTIFIER_INCOMPLETE
public static final String IDENTIFIER_INVALID
public static final String IDENTIFIER_NOTSAME
| Constructor Detail |
|---|
public ValidationError(String identifier,
String subject)
ValidationError instance for the specified
identifier and subject.
The error will not be automatic overridable.
identifier - a non-null String with the
textual error identifiersubject - a non-null String with the
name of the erroneous subject
public ValidationError(String identifier,
String subject,
boolean overridable)
ValidationError instance for the specified
identifier and subject.
identifier - a non-null String with the
textual error identifiersubject - a non-null String with the
name of the erroneous subjectoverridable - true to make any other error for the same
subject override this error, false if this error should
always be shown| Method Detail |
|---|
public final String getIdentifier()
public final String getSubject()
public final boolean isOverridable()
public void setErroneousValue(Object erroneousValue)
public ValidationError erroneousValue(Object erroneousValue)
setErroneousValue(java.lang.Object)public Object getErroneousValue()
public Object clone()
clone in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object object)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||