Class FilterProvider
- java.lang.Object
-
- com.fasterxml.jackson.databind.ser.FilterProvider
-
- Direct Known Subclasses:
SimpleFilterProvider
public abstract class FilterProvider extends java.lang.Object
Interface for objects that providers instances ofPropertyFilter
that match given ids. A provider is configured to be used during serialization, to find filter to used based on id specified byJsonFilter
annotation on bean class.
-
-
Constructor Summary
Constructors Constructor Description FilterProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract BeanPropertyFilter
findFilter(java.lang.Object filterId)
Deprecated.Since 2.3 deprecated becauseBeanPropertyFilter
is deprecated;PropertyFilter
findPropertyFilter(java.lang.Object filterId, java.lang.Object valueToFilter)
Lookup method used to findPropertyFilter
that has specified id.
-
-
-
Method Detail
-
findFilter
@Deprecated public abstract BeanPropertyFilter findFilter(java.lang.Object filterId)
Deprecated.Since 2.3 deprecated becauseBeanPropertyFilter
is deprecated;Lookup method used to findBeanPropertyFilter
that has specified id. Note that id is typically aString
, but is not necessarily limited to that; that is, while standard components use String, custom implementation can choose other kinds of keys.- Returns:
- Filter registered with specified id, if one defined; null if none found.
-
findPropertyFilter
public PropertyFilter findPropertyFilter(java.lang.Object filterId, java.lang.Object valueToFilter)
Lookup method used to findPropertyFilter
that has specified id. Note that id is typically aString
, but is not necessarily limited to that; that is, while standard components use String, custom implementation can choose other kinds of keys.This method is the replacement for
findFilter(java.lang.Object)
starting with 2.3.Note that the default implementation is designed to support short-term backwards compatibility, and will call the deprecated
findFilter
method, then wrap filter if one found asPropertyFilter
. It should be overridden by up-to-date implementations- Parameters:
filterId
- Id of the filter to fetchvalueToFilter
- Object being filtered (usually POJO, but may be aMap
, or in future a container), if available; not available when generating schemas.- Returns:
- Filter to use, if any.
- Since:
- 2.3
-
-