public URIBuilder appendFilter ( URIBuilder builder , Collection < Filter < ? > > filters ) { if ( filters . size ( ) > 0 ) { ObjectNode filterNode = new ObjectMapper ( ) . createObjectNode ( ) ; for ( Filter < ? > filter : filters ) { filterNode . setAll ( filter . toJson ( ) ) ; } ObjectNode drilldownNode = new ObjectMapper ( ) . createObjectNode ( ) ; drilldownNode . put ( "drilldown" , filterNode ) ; builder . addParameter ( "filter" , drilldownNode . toString ( ) ) ; } return builder ; }
Appends a filter parameter from the given filters to the URI builder . Won t do anything if the filter collection is empty .