Class FilterProvider
- java.lang.Object
-
- com.fasterxml.jackson.databind.ser.FilterProvider
-
- Direct Known Subclasses:
SimpleFilterProvider
public abstract class FilterProvider extends java.lang.ObjectInterface for objects that providers instances ofPropertyFilterthat match given ids. A provider is configured to be used during serialization, to find filter to used based on id specified byJsonFilterannotation 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 BeanPropertyFilterfindFilter(java.lang.Object filterId)Deprecated.Since 2.3 deprecated becauseBeanPropertyFilteris deprecated;PropertyFilterfindPropertyFilter(java.lang.Object filterId, java.lang.Object valueToFilter)Lookup method used to findPropertyFilterthat has specified id.
-
-
-
Method Detail
-
findFilter
@Deprecated public abstract BeanPropertyFilter findFilter(java.lang.Object filterId)
Deprecated.Since 2.3 deprecated becauseBeanPropertyFilteris deprecated;Lookup method used to findBeanPropertyFilterthat 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 findPropertyFilterthat 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
findFiltermethod, 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
-
-