* Path, header and matrix params should be allowed to be convertable
primitive types (int, float, etc...)
* I asked for this before, but I'd like to be able to inject a
PathSegment as a @PathParam:
@GET @Path("{foo}/{bar}")
public String get(@PathParam("foo") PathSegment foo, @PathParam("bar")
PathSegment bar) {...}
* Question on MessageBodyWriter:
The headers MultivaluedMap passed in is <String, Object> why the
difference between MessageBodyReady which is <String, String>?
* The header MultivaluedMap parameter passed into
MessageBodyWriter.writeTo. Is this mutable? In other words, is the
MessageBodyWriter allowed to add output headers? I think it should be
allowed...
* I asssume Response.ResponseBuilder.created() sends a Location header
to the client?
* Two methods to Response.ResponseBuilder should be added:
temporaryHostRedirect(String path);
created(String path);
This path should be concatenated to the base URI of the REST engine.
For example, if JAX-RS is deployed from a WAR under
http://www.jboss.org/REST
Then:
created("/customers/3424234"); should send a location:
http://www.jboss.org/REST/customers/3424234
I believe redirects will be a common thing given it is a usage pattern
in books like Restful Web Services. We need an easy way to create these
URIs.
* How about replace @Path with @Uri "Uri" doesn't conflict with "URI".
* I'd like to add two types of wildcards to @Path mappings: '*' and
'**'. The would basically work like Ant expressions. '*' would only
consume one path segment, while '**' would consume multiple.
@Path("**/*.jsp") maps to any path ending in ".jsp"
@Path("*.jsp") only maps to one path segment of .jsp files.
@Path("**/foo/**/bar") matches with "x/y/z/foo/1/2/bar"
Also '**' could be used with a PathParam and PathSegment:
@Path("customers/{id}**/address")
@GET
public String getAddress(@PathParam("id") PathSegment[] id) {...}
The interesting side effect with having wildcard ability is that JAX-RS
could totally replace Servlets.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com