Api versioning

Adds a filter that will transform old json request into the latest version so that we internally only have to use one version. The old version can be used by using the accept header of application/vnd.aerogear.v`version`+json for now I have one example of this for the sender.

It uses json diff patch merge to change the incoming json request and additionally can have a dynamic class invoked as well.

See: https://issues.jboss.org/browse/AGPUSH-966
perhaps I miss something, but why are we not limiting it for the SENDER ?

On Thu, Oct 9, 2014 at 1:17 PM, Erik Jan de Wit <notifications@github.com>
wrote:

> In
> jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/util/VersionFilter.java:
>
> > +import javax.servlet.ServletInputStream;
> > +import javax.servlet.ServletRequest;
> > +import javax.servlet.ServletResponse;
> > +import javax.servlet.annotation.WebFilter;
> > +import javax.servlet.http.HttpServletRequest;
> > +import javax.servlet.http.HttpServletRequestWrapper;
> > +import java.io.BufferedInputStream;
> > +import java.io.BufferedReader;
> > +import java.io.ByteArrayInputStream;
> > +import java.io.IOException;
> > +import java.io.InputStream;
> > +
> > +/**
> > + * This filter will change the older api versions to the current one using json diff transform.
> > + */
> > +@WebFilter(urlPatterns = "*")
>
> no, the filter intercepts all calls and based on the path finds patch file
> to convert the old json into the new version
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/aerogear/aerogear-unifiedpush-server/pull/394/files#r18638976>
> .
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf