|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.filter.ValidatorFilter
public class ValidatorFilter
A filter to validate the values of an action input. This filter has the same behaviour of a ValidationFilter except that it will get the validation information from the action, if it implements the Validatable interface.
| Constructor Summary | |
|---|---|
ValidatorFilter()
Creates a Validator filter. |
|
ValidatorFilter(String resultForError)
|
|
| Method Summary | |
|---|---|
void |
destroy()
Gives a chance to the filter to deallocalte any resources before it is destroyed. |
String |
filter(InvocationChain chain)
Executes the filter. |
static String |
getDir()
|
void |
setDir(String dir)
Sets the directory where to look for error messages. |
void |
setResultForError(String resultForError)
By default, the filter returns the BaseAction.ERROR when a validation failure happens. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ValidatorFilter()
public ValidatorFilter(String resultForError)
| Method Detail |
|---|
public static String getDir()
public void setResultForError(String resultForError)
resultForError - The result to return in case of a validation failure.public void setDir(String dir)
dir - The directory where to look for error messages.
public String filter(InvocationChain chain)
throws Exception
Filter
filter in interface Filterchain - The InvocationChain for the action this filter is being applied to.
Exceptionpublic void destroy()
Filter
destroy in interface Filter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||