Commit Graph

208 Commits

Author SHA1 Message Date
Oliver Gierke
8d5424a6db #305 - Dependency upgrades.
Spring Framework 3.2.9 -> 3.2.13
Jackson 2.4.1 -> 2.4.3
JSONPath 0.9.1 -> 1.2.0
Slf4j 1.7.7 -> 1.7.10
Evo Inflector 1.2 -> 1.2.1

Adapted HalLinkDiscoverer to stricter checking of JSONPath expression.
2015-02-26 15:08:05 +01:00
Oliver Gierke
1953e6400b #304 - Added build profiles for Spring 4.x versions.
Also added config file for Travis CI build. Adapted test cases to mitigate API changes.
2015-02-26 14:56:19 +01:00
Oliver Gierke
bf9584f91e #281 - UriTemplate now has convenience method to add a single template variable. 2015-02-10 19:48:56 +01:00
Oliver Gierke
629028a7ef #236, #286 - Added test case to show how to add empty embedded collections. 2015-02-10 15:28:13 +01:00
Ori Schwartz
ea4c1064c1 #273 - Fixed assertion in UriTemplate. 2015-02-10 14:59:47 +01:00
Oliver Gierke
a90e2f32c3 #286 - EmbeddedWrappers now allows empty collections if a rel or type is provided.
EmbeddedWrappers.wrap(Object, String) now allows empty collections. Also a new emptyCollectionOfType(Class<?>) was introduced to allow the RelProvider kick in and dynamically resolve the lazily.

Added more details to the JavaDoc of EmbeddedWrapper to make clear that we either expect a static rel returned or a type to resolve the rel from. Make HalEmbeddedBuilder detect invalid implementations and reject them although that should never occur if users use EmbeddedWrappers factory.
2015-02-10 14:49:43 +01:00
Oliver Gierke
c41b28e00d #271 - UriTemplate now correctly expands non-optional path segments. 2015-02-10 14:17:33 +01:00
Oliver Gierke
313afe1cc7 #293 - HypermediaSupportBeanDefinitionRegistrar also augments RestTemplates.
We now also augment HttpMessageConverters for RestTemplate Spring beans.
2015-02-10 14:13:29 +01:00
Amr Mostafa
2945e9994f #272 - Fix reference to non-existing interface in readme.
Reference now mentions LinkDiscoverer instead of LinkProvider.
2015-02-10 14:04:11 +01:00
Jeff Stano
3ca6fa5504 #229 - Added support for curies in HalEmbeddedBuilder.
HalEmbeddedBuilder now takes an optional CurieProvider to create namespaced rels for embeddededs.

Original pull request: #233.
2014-12-02 09:20:49 +01:00
Oliver Gierke
994347c005 #257 - Added support for Forwarded and X-Forwarded-Proto headers.
ControllerLinkBuilder now favors the value of the Forwarded and X-Forwarded-Proto header to build the scheme for the link created.

For more information on the Forwarded header, see http://tools.ietf.org/html/rfc7239.

Related issue: #107.
2014-12-02 08:17:17 +01:00
Oliver Gierke
7d0a76a54b #259 - Added test case to show how to use EnableHypermediaSupport from XML. 2014-10-29 12:53:42 +01:00
Oliver Gierke
e84e9a3f5f #224 - Fixed type in readme.
Removed trailing whitespace as well.
2014-08-22 17:38:51 +02:00
Oliver Gierke
0bb2216502 #228 - TemplateVariable now correctly rejects invalid parameters. 2014-08-22 17:14:42 +02:00
Spring Buildmaster
eedd4f06df #216 - Prepare next development iteration. 2014-07-28 00:37:00 -07:00
Spring Buildmaster
c6b65e4717 #216 - Release version 0.16.0.RELEASE. 2014-07-28 00:36:58 -07:00
Oliver Gierke
a1315058cd #216 - Prepare version 0.16.0.RELEASE. 2014-07-28 09:19:01 +02:00
Oliver Gierke
5882fcf0d6 #219 - HAL setup now registers a more strict HttpMessageConverter.
Previously we registered a special HttpMessageConverter with a custom ObjectMapper to deploy the HAL customizations. That converter was added to Spring MVC registered HandlerAdapters and registered as the first converter.

In case Spring MVC handled a request with Accept header */* or no Accept header at all, this meant that this converter kicked in and served HAL even for objects that don't need the customizations.

We now restrict the applicability of that special HttpMessageConverter to subtypes of ResourceSupport so that it will only be chosen if the object to render is of such type.
2014-07-25 10:24:30 +02:00
fiddlerpianist
f4c43b26c4 #215 - Fixed Traverson constructor usage in readme. 2014-07-23 15:55:41 +02:00
Oliver Gierke
67aa51dbea #217 - Improve UriTempalte's handling of TemplateVariables.
TempalteVariables now concatenates all request parameter styles correctly. UriTemplate uses continued style of request parameters if the base URI already contains request parameters.
2014-07-23 15:53:55 +02:00
Spring Buildmaster
050eae06d3 #208 - Prepare next development iteration. 2014-07-10 04:26:05 -07:00
Spring Buildmaster
835df9ddd6 #208 - Release version 0.15.0.RELEASE. 2014-07-10 04:26:03 -07:00
Oliver Gierke
8f0dcecdb2 #208 - Prepare 0.15.0.RELEASE.
Build and test dependency updates. Fixed JSON in VndErrors reference file as the order of the properties has changed after Jackson upgrade.
2014-07-10 13:18:09 +02:00
Oliver Gierke
377f4adff8 #141 - Added model to build ALPS documents.
Added the necessary abstractions to build an ALPS [0] document.

[0] http://alps.io
2014-07-09 16:02:20 +02:00
Oliver Gierke
8fba900aee #212 - Traverson can now return the last link. 2014-07-08 20:59:35 +02:00
Dietrich Schulten
9ca7049348 #183 - Added documentation for how to use CurieProvider.
Original pull request: #200.
2014-07-08 20:47:05 +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
Spring Buildmaster
9993e9f51f #202 - Prepare next development iteration. 2014-07-08 14:33:56 +02:00
Spring Buildmaster
99bfb253ee #202 - Release version 0.14.0.RELEASE. 2014-06-30 00:25:04 -07:00
Oliver Gierke
8320bea75c #202 - Prepare 0.14.0.RELEASE. 2014-06-30 09:15:31 +02:00
Kory Markevich
921d1af9fb #206 - Set class loader for dummy method proxies.
The Enhancer used to create the proxy instances wasn't explicitly
setting the class loader to use, which meant by default the proxied
class's class loader was chosen. This is fine for controller classes, but
in some containers the return types for the controller may have a
class loader that doesn't have access to Spring, resulting in
ClassNotFoundExceptions. For example, returning a JAX-RS class JBoss.
Using the controller's class loader when proxying the return type solves
this. 

Related issues: #136.
2014-06-30 08:44:17 +02:00
Oliver Gierke
d4d788d9e0 #205 - Jackson2ModuleRegisteringBeanPostProcessor now looks up dependent beans lazily.
We now only lookup the beans, Jackson2ModuleRegisteringBeanPostProcessor needs to post-process other beans if the post-processing is really needed. This avoids premature initialization of those dependent beans.
2014-06-24 16:09:21 +02:00
Spring Buildmaster
ce5b66cd9a #181 - Prepare next development iteration. 2014-06-18 00:51:26 -07:00
Spring Buildmaster
fe2005b550 #181 - Release version 0.13.0.RELEASE. 2014-06-18 00:51:24 -07:00
Oliver Gierke
b60113852d #181 - Prepare 0.13.0.RELEASE.
Upgraded Evo Inflector version to 1.2. Updated changelog.
2014-06-18 09:47:35 +02:00
Oliver Gierke
0b4b3c1ad9 #199 - Refactorings in HalEmbeddedBuilder.
We now provide a dedicated EmbeddedWrappers API that HalEmbeddedBuilder uses to transparently handle the collection enforcement etc. It also allow manually hand in EmbeddedWrapper instances to enforce a certain behavior independent of the global settings in HalEmbeddedBuilder.

Simplified HalResourcesSerializer in Jackson2Hal module as we now don't have to deploy custom serializers for the embedded elements anymore.

Supersedes some of the API introduced for #195.
2014-06-12 10:46:30 +02:00
Oliver Gierke
40ceba3c47 #198 - TemplateVariables now drops duplicate TemplateVariable instances. 2014-06-11 10:21:21 +02:00
Oliver Gierke
20bfa86c5f #195 - HalEmbeddedBuilder now considers RelAware on objects added.
This change introduces a RelAware interface for objects to implement which want to enforce a particular rel to be used in the _embedded clause. This is useful if the objects being added are not categorized by type but rather by their role in the context of the main object.
2014-06-10 10:46:46 +02:00
Oliver Gierke
673f82d388 #192 - Added linkTo(Class<?>, Method, Object...) to MethodLinkBuilderFactory.
The newly introduced method is needed to make sure the correct mappings are looked up if the method given is actually not declared on the class the method shall eventually be invoked on.

This is basically allowing to try to build links, similar to the dummy invocation mechanism but effectively avoiding the overhead of creating such invocation manually (as it would usually require reflection to be used).
2014-06-05 16:19:10 +02:00
Oliver Gierke
daeae2e98a #192 - Added test case to show that mapping lookup works.
The test case added shows that the mapping lookup also works if the method invoked is referred to via a mapped sub type.
2014-06-05 12:34:23 +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
Spring Buildmaster
345c710ddc #174 - Prepare next development iteration. 2014-05-20 05:37:08 -07:00
Spring Buildmaster
7007081c53 #174 - Release version 0.12.0.RELEASE. 2014-05-20 05:37:05 -07:00
Oliver Gierke
f3024063c6 #174 - Upgrade dependencies in preparation of 0.12 release.
Upgraded to Spring 3.2.9.RELEASE and Slf4j to 1.7.7.
2014-05-20 14:32:07 +02:00
Oliver Gierke
3fd835cafd #174 - Updated changelog. 2014-05-20 10:59:29 +02:00
qizeqing
84104897af #177 - Fix typo in readme.md. 2014-05-20 10:53:38 +02:00
Oliver Gierke
48749e7a87 #178 - Fixed potential NullPointerException in ResourceSupport.
ResourceSupport now has a null guard in equals(…) to prevent NullPointerExceptions from happening.
2014-05-20 10:52:56 +02:00
Kamill Sokol
6473c10113 #96 - Fixed double-encoding issues in LinkBuilderSupport.
LinkBuilderSupport now prefers the URI string over the URI to avoid double encoding issues.

VndErrorsMarshallingTest.jackson2marshalling(…) shouldn't take line breaks into account due to platform differences (Win, OSX, Linux)

Original pull request: #179.
2014-05-20 10:49:05 +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