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

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Improving Hypermedia Support

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Fri, 4 Nov 2011 16:43:26 -0400

Markus,

> * @Linkable is much more conventient as it induces an automatism to the self URI, what does not necessarily mean that fromResourceMethod is obsolete -- why not give the user *both* possibilities? A complete different idea would be the way we currently implement it in our solutions: Providing a map from entity to "root" URI (what I would not prefer if there would be @Linkable).
>

 As I said, I'd prefer something that is not completely declarative at this point. What if we define Link.fromResource(Class<?> c) without a method name parameter, and mark a method with @Rel(SELF) where SELF is the constant "self" (to avoid introducing a new annotation). See section in wiki [1].

-- Santiago

[1] http://java.net/projects/jax-rs-spec/pages/HypermediaExample