|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.filter.FormatFilter
public abstract class FormatFilter
A filter to format the action output values. Use this filter if you want to format some of your output values before displaying them in the view.
| Constructor Summary | |
|---|---|
FormatFilter()
|
|
| Method Summary | |
|---|---|
FormatFilter |
add(String field,
Formatter formatter)
Adds a formatter for the given field. |
FormatFilter |
add(String field,
String formatterName)
Adds a formatter which was defined in the FormatterManager. |
void |
destroy()
Gives a chance to the filter to deallocalte any resources before it is destroyed. |
String |
filter(InvocationChain chain)
Executes the filter. |
abstract void |
initFormatters()
Override this abstract method to add formatters for the output fields you want to format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FormatFilter()
| Method Detail |
|---|
public abstract void initFormatters()
public FormatFilter add(String field,
Formatter formatter)
field - The field to format.formatter - The formatter to use.
public FormatFilter add(String field,
String formatterName)
field - formatterName - The name of the formatter defined in the FormatterManager.
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 | |||||||||