|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.cocoon.acting.ValidatorActionHelper
Helper class to pass a the result of a validation back along with the validated object itself.
Field Summary | |
protected java.lang.Object |
object
|
protected ValidatorActionResult |
result
|
Constructor Summary | |
ValidatorActionHelper(java.lang.Object validatedObject)
Create a ValidatorActionHelper object that contains just the object. |
|
ValidatorActionHelper(java.lang.Object validatedObject,
ValidatorActionResult validationResult)
Create a ValidatorActionHelper object that contains just the object. |
Method Summary | |
boolean |
doesNotMatch()
Tests if the validation result is NOMATCH , can
only occur when |
java.lang.Object |
getObject()
Returns the tested object. |
ValidatorActionResult |
getResult()
Returns the result. |
boolean |
isNotPresent()
Tests if the validation result is NOTPRESENT ,
e.g. when the value is null and is allowed to be null. |
boolean |
isNull()
Tests if the validation result is ISNULL ,
e.g. when the value is null but is not supposed to be null. |
boolean |
isOK()
Tests if the validation result is OK |
boolean |
isTooLarge()
Tests if the validation result is TOOLARGE ,
e.g. in case of a double or long the value is too large or in
case of a string it is too long. |
boolean |
isTooSmall()
Tests if the validation result is TOOSMALL ,
e.g. in case of a double or long the value is too small or in
case of a string it is too short. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ValidatorActionResult result
protected java.lang.Object object
Constructor Detail |
public ValidatorActionHelper(java.lang.Object validatedObject)
OK
as validation result.validatedObject
- object that has been validatedpublic ValidatorActionHelper(java.lang.Object validatedObject, ValidatorActionResult validationResult)
OK
as validation result.validatedObject
- object that has been validatedvalidationResult
- result of the validationMethod Detail |
public boolean isOK()
OK
public boolean isNotPresent()
NOTPRESENT
,
e.g. when the value is null and is allowed to be null.public boolean isNull()
ISNULL
,
e.g. when the value is null but is not supposed to be null.public boolean isTooLarge()
TOOLARGE
,
e.g. in case of a double or long the value is too large or in
case of a string it is too long.public boolean isTooSmall()
TOOSMALL
,
e.g. in case of a double or long the value is too small or in
case of a string it is too short.public boolean doesNotMatch()
NOMATCH
, can
only occur whenpublic java.lang.Object getObject()
public ValidatorActionResult getResult()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |