|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.filter.OVFilter
public class OVFilter
A filter that takes all the properties of a bean and place them in the action output.
Use this filter, for example, if you want to show all properties of an User bean,
but you don't want to manually place them in the action output, in other words,
you place the User bean in the output and use the OVFilter to accomplish the same result.
Note that this filter uses the method Class.getMethods() in order to find the getters, in other words,
getters from the class and its superclasses will be called for properties.
| Field Summary | |
|---|---|
static char |
PREFIX_SEPARATOR
|
| Constructor Summary | |
|---|---|
OVFilter(String key)
Creates a OVFilter that will be applied to the bean in the action output with the given key. |
|
OVFilter(String key,
boolean overwrite)
Creates a OVFilter that will be applied to the bean in the action output with the given key. |
|
OVFilter(String key,
String prefix)
Creates a OVFilter that will be applied to the bean in the action output with the given key. |
|
OVFilter(String key,
String prefix,
boolean overwrite)
Creates a OVFilter that will be applied to the bean in the action output with the given key. |
|
| 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. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static char PREFIX_SEPARATOR
| Constructor Detail |
|---|
public OVFilter(String key)
key - The key with which the object (bean) is placed in the action output.
public OVFilter(String key,
String prefix)
key - The key with which the object (bean) is placed in the action output.prefix - The prefix will be appended to the attribute name on the action output.
public OVFilter(String key,
boolean overwrite)
key - The key with which the object (bean) is placed in the action output.overwrite - Overwrite the value in the output if it is already there? (default is true)
public OVFilter(String key,
String prefix,
boolean overwrite)
key - The key with which the object (bean) is placed in the action output.prefix - The prefix will be appended to the attribute name on the action output.overwrite - Overwrite the value in the output if it is already there? (default is true)| Method Detail |
|---|
public String toString()
toString in class Object
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 | |||||||||