Skip to main content

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Why do we need new UriInfo Methods?

  • From: Marek Potociar <marek.potociar@...>
  • To: jsr339-experts@...
  • Subject: [jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Why do we need new UriInfo Methods?
  • Date: Wed, 30 Jan 2013 15:24:38 +0100


On Jan 30, 2013, at 3:09 PM, Bill Burke <bburke@...> wrote:

> Its not much of an extra step, and then you are not constrained to use the 
> methods only on the server.  A client may also want to construct resolved 
> and relative URIs.
> 
> UriBuilder.fromUri(uriInfo.getBaseURI()).relativize(uri);

That's the extra step... :)

> 
> You may also be relativizing/resolving often from a uri template:
> 
> UriBuilder.fromResource(resourceClass).path(resourceClass, 
> "getCustomers").resolve(uri, "12345");

That is a valid point. I'll let Santiago to respond though as I was only 
marginally involved in those discussions and may be missing some context.

Marek

> 
> 
> 
> On 1/30/2013 8:39 AM, Marek Potociar wrote:
>> IIRC, it's was a matter of the extra step required. UriInfo has enough 
>> information to be able to relativize any URI wrt. request URI. Which is 
>> what you essentially always want to do when sending back relative links.
>
>> Marek
>
>> On Jan 30, 2013, at 1:40 PM, Bill Burke <bburke@...> wrote:
>
>>> Why aren't the relativize and resolve methods in UriBuilder?
>>> 
>>> On 1/30/2013 5:41 AM, Marek Potociar wrote:
>>>> Taking back my comment - I'm sorry, I misread the original request. I 
>>>> thought we're talking about resolveTemplate() methods.
>>>> 
>>>> Marek
>>>> 
>>>> On Jan 30, 2013, at 11:23 AM, Marek Potociar <marek.potociar@...> wrote:
>>>> 
>>>>> We need those to align with WebTarget and to support some of its 
>>>>> methods. We also discussed this IIRC.
>>>>> 
>>>>> I'm strongly against removing the methods.
>>>>> 
>>>>> Marek
>>>>> 
>>>>> On Jan 28, 2013, at 11:49 PM, Bill Burke <bburke@...> wrote:
>>>>> 
>>>>>> relatives and resolve.  I don't seem to recall us discussing this.
>>>>>> 
>>>>>> -1 for these new methods.  We don't need to pollute the API with 
>>>>>> esoteric use cases.
>>>>>> 
>>>>>> --
>>>>>> Bill Burke
>>>>>> JBoss, a division of Red Hat
>>>>>> http://bill.burkecentral.com
>>>>> 
>>>> 
>>> 
>>> --
>>> Bill Burke
>>> JBoss, a division of Red Hat
>>> http://bill.burkecentral.com
>
> 
> -- 
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com



[jsr339-experts] Why do we need new UriInfo Methods?

Bill Burke 01/28/2013

[jsr339-experts] Re: Why do we need new UriInfo Methods?

Bill Burke 01/28/2013

[jsr339-experts] Re: [jax-rs-spec users] Re: Why do we need new UriInfo Methods?

Santiago Pericas-Geertsen 01/29/2013

[jsr339-experts] Re: [jax-rs-spec users] Why do we need new UriInfo Methods?

Santiago Pericas-Geertsen 01/29/2013

[jsr339-experts] Re: [jax-rs-spec users] Why do we need new UriInfo Methods?

Bill Burke 01/29/2013

[jsr339-experts] Re: [jax-rs-spec users] Why do we need new UriInfo Methods?

Marek Potociar 01/30/2013

[jsr339-experts] Re: [jax-rs-spec users] Re: Why do we need new UriInfo Methods?

Marek Potociar 01/30/2013

[jsr339-experts] Re: [jax-rs-spec users] Re: Why do we need new UriInfo Methods?

Bill Burke 01/30/2013

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Why do we need new UriInfo Methods?

Marek Potociar 01/30/2013

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Why do we need new UriInfo Methods?

Bill Burke 01/30/2013

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Why do we need new UriInfo Methods?

Marek Potociar 01/30/2013

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Re: Why do we need new UriInfo Methods?

Santiago Pericas-Geertsen 01/31/2013

[jsr339-experts] Re: [jax-rs-spec users] Re: Re: Why do we need new UriInfo Methods?

Santiago Pericas-Geertsen 01/31/2013
 
 
Close
loading
Please Confirm
Close