FilterProvider implementation that just stores
direct id-to-filter mapping. It also allows specifying a
"default" filter to return if no registered instance matches
given filter id.
Note that version 2.3 was a partial rewrite, now that
PropertyFilter is set to replace BeanPropertyFilter.
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | _cfgFailOnUnknownId
Flag that indicates whether request for an unknown filter id should result an exception (default) or not. |
| protected PropertyFilter | _defaultFilter
This is the filter we return in case no mapping was found for
given id; default is |
| protected final Map | _filtersById
Mappings from ids to filters. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static final Map | |
| private static final PropertyFilter | _convert(BeanPropertyFilter f)
References Deprecated
BeanPropertyFilter is deprecated or references (maybe indirectly) at least one deprecated element.
|
| public SimpleFilterProvider | |
| public SimpleFilterProvider | Returns: This provider instance, for call-chainingThe id to associate the filter with. id, PropertyFilter The filter to add; filter)Adds an instance of |
| public SimpleFilterProvider | Returns: This provider instance, for call-chainingThe id to associate the filter with. id, SimpleBeanPropertyFilter The filter to add; filter)
References Deprecated
SimpleBeanPropertyFilter is deprecated or references (maybe indirectly) at least one deprecated element.
Overloaded variant just to resolve "ties" when using |
| public BeanPropertyFilter | findFilter(Object filterId)
Implements abstract com.
Deprecated
Lookup method used to find |
| public PropertyFilter | findPropertyFilter(Object
Id of the filter to fetch filterId, Object Object being filtered (usually POJO, but may be a valueToFilter)java.,
or in future a container), if available; not available when generating
schemas.Overrides com. Lookup method used to find |
| public PropertyFilter | |
| public PropertyFilter | |
| public SimpleFilterProvider | setDefaultFilter(BeanPropertyFilter
Filter to return when no filter is found for given id f)
Deprecated
Since 2.3 should use
PropertyFilter instead of BeanPropertyFilter
Method for defining filter to return for "unknown" filters; cases where there is no mapping from given id to an explicit filter. |
| public SimpleFilterProvider | Returns: This provider instance, for call-chainingDefault filter to set f)Method for defining "default filter" to use, if any ( |
| public SimpleFilterProvider | setDefaultFilter(SimpleBeanPropertyFilter f)
References Deprecated
SimpleBeanPropertyFilter is deprecated or references (maybe indirectly) at least one deprecated element.
Overloaded variant just to resolve "ties" when using |
| public SimpleFilterProvider | |
| public boolean |
| _cfgFailOnUnknownId | back to summary |
|---|---|
| protected boolean _cfgFailOnUnknownId Flag that indicates whether request for an unknown filter id should result an exception (default) or not. Note that this is only relevant if no default filter has been configured. | |
| _defaultFilter | back to summary |
|---|---|
| protected PropertyFilter _defaultFilter This is the filter we return in case no mapping was found for
given id; default is | |
| _filtersById | back to summary |
|---|---|
| protected final Map<String, PropertyFilter> _filtersById Mappings from ids to filters. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| SimpleFilterProvider | back to summary |
|---|---|
| public SimpleFilterProvider() | |
| SimpleFilterProvider | back to summary |
|---|---|
public SimpleFilterProvider(Map<String, ?> mapping)
| |
| _convert | back to summary |
|---|---|
private static final Map
| |
| _convert | back to summary |
|---|---|
| private static final PropertyFilter _convert(BeanPropertyFilter f)
References Deprecated
See corresponding docs for further information.
| |
| addFilter | back to summary |
|---|---|
| public SimpleFilterProvider addFilter(String id, BeanPropertyFilter filter)
Deprecated since 2.3
| |
| addFilter | back to summary |
|---|---|
| public SimpleFilterProvider addFilter(String id, PropertyFilter filter) Adds an instance of Warning Binding
| |
| addFilter | back to summary |
|---|---|
| public SimpleFilterProvider addFilter(String id, SimpleBeanPropertyFilter filter)
References Deprecated
See corresponding docs for further information. Overloaded variant just to resolve "ties" when using
Adds an instance of Warning Binding
| |
| findFilter | back to summary |
|---|---|
| public BeanPropertyFilter findFilter(Object filterId) Implements abstract com. Doc from com. Deprecated
Lookup method used to find
| |
| findPropertyFilter | back to summary |
|---|---|
| public PropertyFilter findPropertyFilter(Object filterId, Object valueToFilter) Overrides com. Doc from com. Lookup method used to find
This method is the replacement for
Note that the default implementation is designed to support short-term
backwards compatibility, and will call the deprecated
| |
| getDefaultFilter | back to summary |
|---|---|
| public PropertyFilter getDefaultFilter() | |
| removeFilter | back to summary |
|---|---|
| public PropertyFilter removeFilter(String id) | |
| setDefaultFilter | back to summary |
|---|---|
| public SimpleFilterProvider setDefaultFilter(BeanPropertyFilter f)
Deprecated Since 2.3 should use Method for defining filter to return for "unknown" filters; cases where there is no mapping from given id to an explicit filter.
| |
| setDefaultFilter | back to summary |
|---|---|
| public SimpleFilterProvider setDefaultFilter(PropertyFilter f) Method for defining "default filter" to use, if any (
| |
| setDefaultFilter | back to summary |
|---|---|
| public SimpleFilterProvider setDefaultFilter(SimpleBeanPropertyFilter f)
References Deprecated
See corresponding docs for further information. Overloaded variant just to resolve "ties" when using | |
| setFailOnUnknownId | back to summary |
|---|---|
| public SimpleFilterProvider setFailOnUnknownId(boolean state) | |
| willFailOnUnknownId | back to summary |
|---|---|
| public boolean willFailOnUnknownId() | |