Query param route predicate - extension of QueryRoutePredicateFactory
I tried to generalize the QueryRoutePredicateFactory so that it could use a bean of type Predicate<String> instead of being limited to a regexp. Test classes are also implemented.
I'd prefer this in one class as having multiple query predicates is confusing.
@spencergibb you are suggesting to merge the two classes into one single predicate factory, that can manage both cases, right? I can do it, paying attention not to introduce regressions on the QueryRoutePredicateFactory.
@polifr yes, since this will only be available thru the java dsl, it should be ok. the regex can be retrofit to a Predicate.
@spencergibb I modified the QueryRoutePredicateFactory class to unify the regexp and predicate approach. Let me know if this is what you meant, so that I can proceed with adjustments on junit tests and cleaning of the previous proposal.
Yes, you can now remove QueryParamRoutePredicateFactory
Ok, I removed the QueryParamRoutePredicateFactory and QueryParamRoutePredicateFactoryTests and extend the current QueryRoutePredicateFactoryTests to cover the new options. I also fixed the checkstyle errors that made the build fail.
Hi @spencergibb , is there something that stills blocks this pull request? I can't see any change request that has to be done.
There was a format error in the header of the test class, I fixed it.
@polifr can you add a commit signature for the DCO and then I will merge
Perfect, thanks
Thank you, @spencergibb
Just two questions... First, about documentation update: this change has to be shown also in the request-predicates-factories.html page? If so, which is the process for update the page?
Next, do you think a similar approach is useful to be applied also on other RoutePredicateFactory implementation? In this case, I can open a new merge request and replicate it; let me know your opinion about this.