|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.srplib.validation.DefaultValidationError
public class DefaultValidationError
A simple implementation of ValidationError holding error message and a reference to not validated component.
| Constructor Summary | |
|---|---|
DefaultValidationError(String message)
Creates validation error with error message. |
|
DefaultValidationError(String message,
Object context)
Creates validation error with error message and invalid field. |
|
| Method Summary | |
|---|---|
Object |
getContext()
Returns validation context. |
String |
getError()
Returns validation error message. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultValidationError(String message)
message - String validation error message
public DefaultValidationError(String message,
Object context)
message - String validation error messagecontext - Object an error context (field, form, etc.)| Method Detail |
|---|
public Object getContext()
This may be a field, a form, a panel etc. In other words context is reference to object is being validated.
getContext in interface ValidationErrornull if error isn't associated with particular context.public String getError()
getError in interface ValidationErrorpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||