java.lang.Object
org.mentawai.filter.OVFilter
- All Implemented Interfaces:
- org.mentawai.core.Filter
- public class OVFilter
- extends java.lang.Object
- implements org.mentawai.core.Filter
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.
|
Constructor Summary |
OVFilter(java.lang.String key)
Creates a OVFilter that will be applied to the bean in the action output with the given key. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
key
private java.lang.String key
OVFilter
public OVFilter(java.lang.String key)
- Creates a OVFilter that will be applied to the bean in the action output with the given key.
adjustName
private java.lang.String adjustName(java.lang.String name)
filter
public java.lang.String filter(org.mentawai.core.InvocationChain chain)
throws java.lang.Exception
- Description copied from interface:
org.mentawai.core.Filter
- Executes the filter.
- Specified by:
filter in interface org.mentawai.core.Filter
destroy
public void destroy()
- Description copied from interface:
org.mentawai.core.Filter
- Gives a chance to the filter to deallocalte any resources before it is destroyed.
This is called when the web application is stopped, in other words,
this has nothing to do with garbage collection.
- Specified by:
destroy in interface org.mentawai.core.Filter