Skip to main content

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Re: Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

  • From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen@...>
  • To: jsr339-experts@...
  • Subject: [jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Re: Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?
  • Date: Tue, 27 Nov 2012 09:14:14 -0500


On Nov 26, 2012, at 6:30 PM, Jan Algermissen <jan.algermissen@...> wrote:

You cannot *override* the resolution rules in the URI spec for relative URI references.

I am honestly totally baffled about they way (you seem to) approach this issues. I looks as if you somehow assume to have control over the client to tamper with the resolution rules. If that is so, that would scare me.

 It's not even worth pursuing this discussion, I feel just as baffled at some of your responses; besides, the proposal has issues.

 The one thing we agree on is that we need to do something about these relative URIs, so let's move on that (hopefully without anyone getting scared :).



(don't know of any at the moment). Hence, my other proposal below ... 

The only other alternative that I can think of is to generate all the server URIs relative to the request URI.

How would that work?

 One way could be to pass the request URI to the Link.Builder and ensure the links are relativized as part of the build process. 

 Let's recap the options discussed so far:

 (i) Use @BaseUri on Application subclass. 

     + straightforward semantics
     + easy to implement
     - requires re-compilation to change base URI
     - may be only reason to define an Application subclass

 As stated before, I think this solution would be better if we had a DD. But, perhaps this is something we can go with now and improve if when/if we introduce a DD?

 (ii) Compute relative URIs based on request URIs

     + no need to specify base URI
     - harder to implement
     - links in responses need a context (base URI) for resolution

-- Santiago



[jsr339-experts] Re: [jax-rs-spec users] Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

(continued)

[jsr339-experts] Re: [jax-rs-spec users] Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Santiago Pericas-Geertsen 11/16/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Jan Algermissen 11/20/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Santiago Pericas-Geertsen 11/26/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Jan Algermissen 11/26/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Santiago Pericas-Geertsen 11/26/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Jan Algermissen 11/26/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Santiago Pericas-Geertsen 11/26/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Jan Algermissen 11/26/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Santiago Pericas-Geertsen 11/26/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Jan Algermissen 11/26/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Re: Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Santiago Pericas-Geertsen 11/27/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Re: Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Jan Algermissen 11/27/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Re: Re: Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Santiago Pericas-Geertsen 11/27/2012

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Re: Re: Re: Re: Are Links build with fromReosurce or fromResourceMethod are useful at all?

Jan Algermissen 11/27/2012
 
 
Close
loading
Please Confirm
Close