use of com.fasterxml.jackson.databind.ser.BeanPropertyFilter in project uPortal by Jasig.
the class AnalyticsIncorporationComponent method initMapper.
/**
* Configure the ObjectMapper to filter out all fields on the events except those that are
* actually needed for the analytics reporting
*/
private void initMapper() {
final BeanPropertyFilter filterOutAllExcept = SimpleBeanPropertyFilter.filterOutAllExcept("fname", "executionTimeNano");
this.mapper.addMixInAnnotations(PortalEvent.class, PortletRenderExecutionEventFilterMixIn.class);
final SimpleFilterProvider filterProvider = new SimpleFilterProvider();
filterProvider.addFilter(PortletRenderExecutionEventFilterMixIn.FILTER_NAME, filterOutAllExcept);
this.portletEventWriter = this.mapper.writer(filterProvider);
}
Aggregations