dev@jsr311.java.net

Re: JSR311: PathSegment [was: some comments]

From: Bill Burke <bburke_at_redhat.com>
Date: Wed, 19 Mar 2008 08:03:29 -0400

I'll give you an example:

Request: GET /;stuff=a/;stuff=b


@Path("/{foo}/{bar}")
@GET
public String get(@PathParam("foo") PathSegment foo, @PathParam("bar")
PathSegment bar) {

    String fooM = foo.getMatrixParam("stuff");
    String barM = foo.getMatrixParam("stuff");

}


This could show up for example, if you're exposing a DB resources with a
composite key.

Stephan Koops wrote:
> Hi Bill,
>
> what do you mean with "something"? Is this "something" ignored, or is it
> an earlyier (nearer at the host) path segment name?
> http://host.org/something/currentlyProcessed/willLaterProcessed as
> example for the second? Normally the value of @PathParam has another
> meaning (a name of a variable and not a fix name of a path segment), so
> developers could get confusing, because of this meaning change.
>
> Stephan
>
> Bill Burke schrieb:
>> Yes, please don't remove this and update the spec.
>>
>> I want:
>>
>> @PathParam("something") PathSegment segment
>>
>> So that i can get matrix params for a specific path segment easily.
>>
>> Stephan Koops wrote:
>>> Hello Marc,
>>>
>>> there is an inconsistency between javadoc and the spec: @PathParam is
>>> (javadoc) allowed also on a PathSegment. This is missing in the spec
>>> (sect "Parameters" = 3.2.2 in current state of SVN).
>>> In this case the value of @PathParam makes no sense IMO, or do I miss
>>> something? Than it could be useful to allow @PathParam without any
>>> value. Another possibility is to use @Context instead of @PathParam
>>> on a PathSegment parameter.
>>>
>>> Stephan
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
>>> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com