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

[jsr339-experts] Better Link Support

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Thu, 13 Dec 2012 09:18:43 -0500

Dear Experts,

 I have pushed a refactoring of the Link class to better support link relativization and link resolution for your review [1]. Here is a summary of the changes:

 (1) Two new operations in Link.Builder: buildRelativize() and buildResolved(). Note that relativization and resolution take place after a link is fully built (i.e., after all params have been replaced); hence the reason for combining these operations.

 (2) Given the added complexity introduced by (1), we are going to let implementations handle this. Thus, Link is an abstract class and Link.Builder an interface. I doubt anyone will object to this.

 (3) There are new methods in UriInfo to relativize and resolve URIs and the methods in (1) take an instance of UriInfo. See Javadocs for more information on these operations.

 (4) New method in RuntimeDelegate that returns an instance of Link.Builder.

 (5) Samples have been updated.

-- Santiago

[1] http://java.net/projects/jax-rs-spec/sources/git/revision/b0d506cf6ce57b8c9d42899d7a4a0cffdbfd2165