Commit Graph

12 Commits

Author SHA1 Message Date
Oliver Gierke
e9d83c5c48 #369 - Traverson no defensively expands URIs handed to getAndFindLinkWithRel(…). 2015-08-04 10:35:44 +02:00
Oliver Gierke
3b30c7832e #346 - Polishing.
Turned hop into a real value object by making it immutable. Added unit tests for Hop. use verbose concept names instead of abbreviations (e.g. parameters instead of params). Additional assertions and the documentation of such in JavaDoc. @since tag in new Hop class.

Original pull request: #350
2015-05-23 18:50:32 +02:00
Greg Turnquist
2c1797d9b7 #346 - Enhance Traverson.follow() to customize individual hops.
Introduced a dedicated value object to abstract a Hop within a relation traversal. The Hop consists of a relation name and optional local template parameters that are applied to this particular hop when traversing it.

Changed the implementation of Traverson to work with Hops instead of plain rels and merges the global template parameters with the hop-local ones before expanding the templates found.

Original pull request: #350.
2015-05-23 18:47:24 +02:00
Oliver Gierke
1efb5a53bf #310 - Added missing package-info.java files. 2015-02-27 15:03:27 +01:00
Oliver Gierke
912337669a #258 - Traverson now exposes default configuration per media types.
Introduced Traverson.getDefaultMessageConverters(…) to be able to obtain the list of default HttpMessageConverters depending on the given media types. Added overloads for varargs as well as a List for consistency.
2015-02-26 21:25:31 +01:00
Oliver Gierke
78fb2c4bc1 #307 - Introduced TraversalBuilder.asTemplatedLink().
TraversalBuilder.asTemplatedLink() allows to obtain the final link of a hypermedia traversal in unexpanded form.
2015-02-26 19:58:12 +01:00
Oliver Gierke
8fba900aee #212 - Traverson can now return the last link. 2014-07-08 20:59:35 +02:00
Oliver Gierke
a363122be9 #185 - Traverson can now get LinkDiscoverers configured.
Moved to a setter based configuration for both the RestOperations and LinkDiscoverers to be used.

Related pull request: #189.
2014-07-08 20:40:21 +02:00
Dietrich Schulten
c1e940c5f3 #201 - Traverson can now take a customized RestTemplate.
Traverson now has an additional constructor taking a RestOperations instance which will be used instead of the default one. This allows more fine grained control over the HTTP request infrastructure used when performing link traversals.

Some internal polishing (moved from RestTemplate to RestOperations).

Original pull request: #203.
2014-07-08 14:40:27 +02:00
Dietrich Schulten
4f7e1cb561 #187, #188 - Fix header handling in Traverson.
Traverson correctly applies headers when using JsonPath to evaluate GET result: accepts the media types it is configured for and preserves additional headers.
2014-06-04 19:36:54 +02:00
Oliver Gierke
9790d94872 #180 - Overhaul of URI template expansion in Traverson.
We're now consistently using Spring HATEOAS' UriTemplate instead of the Spring MVC one to be able to expand extended template parameters correctly.

Also the ObjectMapper used by Traverson to unmarshal JSON responses does not fail for unknown properties anymore.
2014-05-20 10:33:42 +02:00
Oliver Gierke
0985979428 #131 - Add Traverson hypermedia client API.
Introduce Traverson as means to traverse hypermedia based APIs by providing a set of relation names to discover and follow to access the final representation. Traverson allows to specify a parameter map that will be used  to potentially expand the URIs discovered.

We currently support LinkDiscoverer based relation discovery, which means that relations in HAL representations can be found by simply stating their names. Alternatively JSON path expressions can be used (starting with a $).
2014-05-01 17:47:46 +02:00