jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: [jax-rs-spec users] Re: Link.fromResource(Class<?> resource, String rel)

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Thu, 18 Oct 2012 10:12:17 -0400

On Oct 18, 2012, at 9:57 AM, Santiago Pericas-Geertsen wrote:

> Jan,
>
> You often have a different rel value for each resource method in a resource class (for example one with @GET and another with @PUT). The use of
>
> Link.Builder.fromResourceMethod(Class<?> resource, String method, String rel)
>
> does imply

 Sorry, "does not imply".

-- Santiago

> that the method must have an @Path annotation on it, so the @Path of the resource class will be used. Does this answer your questions?
>
> -- Santiago
>
> On Oct 17, 2012, at 2:13 PM, Jan Algermissen wrote:
>
>> Hi,
>>
>> what about adding
>>
>>
>> fromResource(Class<?> resource, String rel)
>>
>> to Link?
>>
>> It is IMHO not uncommon to have resource classes without sub resource methods.
>>
>> As it stands, there seems to be no way to use Link.fromXX to 'point' to such resource classes?
>>
>> Is that intentional? By accident? or am I missing something?
>>
>> Jan
>