org.mentawai.filter
Class DIFilter
java.lang.Object
org.mentawai.core.InputWrapper
org.mentawai.filter.DIFilter
- All Implemented Interfaces:
- Map, Filter, Input
public class DIFilter
- extends InputWrapper
- implements Filter
A filter that will do AUTO-WIRING of dependencies in a totaly transparent way.
As of version 1.14 this filter was renamed to AutoWiringFilter, so this class
is currently deprecated and will be removed soon! Please rename all your DIFilter()
to AutoWiringFilter();
Ex:
filter(new DIFilter()); should be changed to filter(new AutoWiringFilter());
- Author:
- Sergio Oliveira Jr.
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
| Methods inherited from class org.mentawai.core.InputWrapper |
clear, containsKey, containsValue, entries, entrySet, get, getBoolean, getBoolean, getBooleanValue, getBooleanValue, getDate, getDate, getDate, getDouble, getDouble, getDoubleValue, getDoubleValue, getEnum, getEnums, getFloat, getFloat, getFloatValue, getFloatValue, getHeader, getHeaderKeys, getInt, getInt, getInts, getIntValue, getIntValue, getIntValues, getLong, getLong, getLongs, getLongValue, getLongValue, getObject, getObject, getProperty, getRoot, getString, getStrings, getStringValue, getStringValues, has, hasValue, inject, inject, isEmpty, keys, keySet, put, putAll, remove, removeInput, removeValue, setInput, size, values |
DIFilter
public DIFilter(boolean tryField)
DIFilter
public DIFilter()
toString
public String toString()
- Overrides:
toString in class Object
setTryField
public void setTryField(boolean tryField)
filter
public String filter(InvocationChain chain)
throws Exception
- Description copied from interface:
Filter
- Executes the filter.
- Specified by:
filter in interface Filter
- Parameters:
chain - The InvocationChain for the action this filter is being applied to.
- Returns:
- The result of the filter or the action the filter is being applied to.
- Throws:
Exception
setValue
public void setValue(String key,
Object value)
- Description copied from interface:
Input
- Sets a parameter value with the given name.
The parameter can be any object.
If the parameter already exists the old value is substituted by the new one.
- Specified by:
setValue in interface Input- Overrides:
setValue in class InputWrapper
- Parameters:
key - the name of the parametervalue - the parameter value (any object)
getValue
public Object getValue(String key)
- Description copied from interface:
Input
- Gets a parameter value (any object) with the given name.
- Specified by:
getValue in interface Input- Overrides:
getValue in class InputWrapper
- Parameters:
key - the name of the parameter
- Returns:
- the parameter value (any object) or null if it doesn't exist.
getValueOld
public Object getValueOld(String key)
destroy
public void destroy()
- Description copied from interface:
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 Filter
Copyright © 2012. All Rights Reserved.