/** * Helper method used to locate filter that is needed, based on filter id * this serializer was constructed with. * * @since 1.7 */ protected BeanPropertyFilter findFilter(SerializerProvider provider) throws JsonMappingException { final Object filterId = _propertyFilterId; FilterProvider filters = provider.getFilterProvider(); // Not ok to miss the provider, if a filter is declared to be needed. if (filters == null) { throw new JsonMappingException("Can not resolve BeanPropertyFilter with id '"+filterId+"'; no FilterProvider configured"); } BeanPropertyFilter filter = filters.findFilter(filterId); // But whether unknown ids are ok just depends on filter provider; if we get null that's fine return filter; }
public BeanPropertyFilter findFilter(Object paramObject) { BeanPropertyFilter localBeanPropertyFilter = (BeanPropertyFilter)this._filtersById.get(paramObject); if (localBeanPropertyFilter == null) localBeanPropertyFilter = this._defaultFilter; return localBeanPropertyFilter; }
protected BeanPropertyFilter findFilter(SerializerProvider paramSerializerProvider) { Object localObject = this._propertyFilterId; FilterProvider localFilterProvider = paramSerializerProvider.getFilterProvider(); if (localFilterProvider == null) throw new JsonMappingException("Can not resolve BeanPropertyFilter with id '" + localObject + "'; no FilterProvider configured"); return localFilterProvider.findFilter(localObject); }
public SimpleFilterProvider(Map<String, BeanPropertyFilter> paramMap) { }
public SimpleFilterProvider addFilter(String paramString, BeanPropertyFilter paramBeanPropertyFilter) { this._filtersById.put(paramString, paramBeanPropertyFilter); return this; }
public BeanPropertyFilter removeFilter(String paramString) { return (BeanPropertyFilter)this._filtersById.remove(paramString); }
public SimpleFilterProvider setDefaultFilter(BeanPropertyFilter paramBeanPropertyFilter) { this._defaultFilter = paramBeanPropertyFilter; return this; }