java.lang.Object
org.mentawai.filter.OutputFilter
- All Implemented Interfaces:
- org.mentawai.core.Filter
- public class OutputFilter
- extends java.lang.Object
- implements org.mentawai.core.Filter
A filter that takes all the properties of the action and place them in the output,
so that you don't have to call output.setValue() manually.
Note that this filter uses the method action.getClass().getDeclaredMethods() in order to find the getters, in other words,
it will only find getters of the base class and not from its superclasses. This is ok because
action inheritance is not very common.
For ModelDriven actions, the method action.getModel().getClass().getMethods() is used instead, pretty much like in the OVFilter.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OutputFilter
public OutputFilter()
- Creates a OutputFilter.
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