Thanks for the info. I will look into the implementation. Hemika Kodikara Software Engineer WSO2 Inc. lean . enterprise . middleware http://wso2.com
Mobile : +94777688882 On Mon, Feb 29, 2016 at 3:52 PM, Afkham Azeez <[email protected]> wrote: > No it is not supported, but we would welcome a PR if you can implement it > :) Looks like a good feature to have. > > On Mon, Feb 29, 2016 at 3:48 PM, Hemika Kodikara <[email protected]> wrote: > >> Hi All, >> >> I am implementing a ParamConverter using @Provider jax-rs annotations to >> convert @Path params into an enum value rather than having a string. Doing >> so I will not need to convert the string param into an enum each time for >> each method. Examples of usage : [1][2][3] >> >> public Response getDestinations(@PathParam("protocol") *String* >> protocol) { >> // Convert the String to Enum and then use. >> } >> >> The above method can be converted to the following by implementing the >> ParamConverter : >> >> public Response getDestinations(@PathParam("protocol") *ProtocolType* >> protocol) {} >> >> ProtocolType being an Enum. To implement the above requirement its >> necessary to use the @Provider annotation to mark the ParamConverter class. >> Is it supported ? Any advice on this ? >> >> [1] - https://github.com/mgajdos/jersey-param-converters >> [2] - http://ronaldxq.blogspot.com/2013/10/jax-rs-joda-datetime.html >> [3] - >> https://github.com/javaee-samples/javaee7-samples/tree/master/jaxrs/paramconverter >> >> Regards, >> Hemika >> >> Hemika Kodikara >> Software Engineer >> WSO2 Inc. >> lean . enterprise . middleware >> http://wso2.com >> >> Mobile : +94777688882 >> > > > > -- > *Afkham Azeez* > Director of Architecture; WSO2, Inc.; http://wso2.com > Member; Apache Software Foundation; http://www.apache.org/ > * <http://www.apache.org/>* > *email: **[email protected]* <[email protected]> > * cell: +94 77 3320919 <%2B94%2077%203320919>blog: * > *http://blog.afkham.org* <http://blog.afkham.org> > *twitter: **http://twitter.com/afkham_azeez* > <http://twitter.com/afkham_azeez> > *linked-in: **http://lk.linkedin.com/in/afkhamazeez > <http://lk.linkedin.com/in/afkhamazeez>* > > *Lean . Enterprise . Middleware* >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
