Commit Graph

150 Commits

Author SHA1 Message Date
Spring Buildmaster
03de68b3e5 #127 - Prepare next development iteration. 2014-03-31 02:12:58 -07:00
Spring Buildmaster
0c1a59d160 #127 - Release version 0.10.0.RELEASE. 2014-03-31 02:12:57 -07:00
Oliver Gierke
ba67233391 #127 - Prepare 0.10.0.RELEASE.
Upgraded to latest Objenesis and Slf4j. Updated changelog.
2014-03-31 10:48:48 +02:00
Oliver Gierke
8436e9ed4e #165 - Removed support for Jackson 1.x. 2014-03-21 17:45:58 +01:00
Oliver Gierke
d11bec0bc3 #162 - Fixed readme to mention @Relation, not @RelationType. 2014-03-20 15:46:33 +01:00
Oliver Gierke
20befe9a58 #134 - Fixed initialization of HttpMessageConverters for HAL.
The Jackson(2)ModuleRegisteringBeanPostProcessor now uses postProcess*Before*Initialization to make sure, afterPropertiesSet() has not been called on the target components which might have propagated the original HttpMessageConverters into other internal components.

With this fix, adding the HttpMessageConverter for HAL is added before the call and thus will be propagated to downstream components.
2014-03-19 14:16:34 +01:00
Oliver Gierke
f954a11e47 #160 - Fixed UriTemplate.expand(…) method declaration.
UriTemplate.expand(Map) not takes a Map<String, ? extends Object> to make sure Link.expand(Map) binds to the correct method. Previously it was bound to the method overload taking an Object vararg which caused an invalid expansion.
2014-03-11 19:18:19 +01:00
Oliver Gierke
ec41d78828 #158 - HalEmbeddedBuilder now uses AopUtils.getTargetClass().
To correctly resolve the rel for a proxied class we need to build up relation types for, HalEmbeddedBuilder now uses Spring's AopUtils.getTargetClass(), which will use the object's getTargetClass() method in case it implements TargetClassAware.
2014-02-27 07:50:26 +01:00
Oliver Gierke
4ad5dd7136 #154 - Introduce XMLUnit to make sure we can build on Java 6 and 7.
Using XMLUnit's Diff to guard against minor changes in the default rendering of XML between Java 6 and 7.
2014-02-27 07:47:31 +01:00
Oliver Gierke
f9f7b5bc68 #?? - ObjectUtils now uses proxy target class for Advised proxies. 2014-02-26 18:23:01 +01:00
Spring Buildmaster
ecb258f113 #126 - Prepare next development iteration. 2014-01-29 03:13:53 -08:00
Spring Buildmaster
f9fd5a2cf3 #126 - Release version 0.9.0.RELEASE. 2014-01-29 03:13:51 -08:00
Oliver Gierke
e67fef6f93 #140, #126 - Prepare 0.9 release.
Finalize changelog. Upgraded to Spring 3.2.7. Switched to release repository.
2014-01-29 11:24:40 +01:00
Oliver Gierke
850c5b6b02 #147 - Added toString() methods to VndErrors and VndError.
Removed duplicate test class.
2014-01-27 17:50:14 +01:00
Oliver Gierke
bb0a578701 #135 - HAL embedded resources are now rendered as collection by default.
To get consistent representations rendered for single-item collections and multi-item collections, we now use an enforceEmbeddedCollections flag in the Jackson 2 HAL module. Adapted HalEmbeddedBuilder to respect that setting and exposed it via the HandlerInstantiator for user level customization.

Changed RelProvider.getSingleResourceRel(…) to getItemResourceRel(…).
2014-01-24 14:52:57 +01:00
Oliver Gierke
9caa352470 #137 - Improved TemplateVariables to combine variables.
Request parameters variables {?…} and continued ones {&…} are now combined by TemplateVariables. Improved detection of the base URI and adapted the rendering logic accordingly. UriTemplates can now be augmented with additional TemplateVariables.

Added equals(…) and hashCode() methods for TempalteVariables.
2014-01-23 15:12:25 +01:00
Oliver Gierke
c790a5d834 #137 - Changed Link.isTempalte() to isTemplated(). 2014-01-23 11:46:08 +01:00
Oliver Gierke
64fd8543b6 #137 - Fixed variable expansion in UriTemplate.
We now eagerly return from UriTemplate.expand(…) if the template doesn't actually contain any variables.
2014-01-22 17:01:38 +01:00
Oliver Gierke
3c62de720f #137 - Improved Link and UriTemplate API.
Added constructor to Link to take a UriTemplate. Added constructor to UriTemplate to take a base URI and TemplateVariables.
2014-01-21 14:27:23 +01:00
Oliver Gierke
719a4b3af3 #142, #137 - CurieProvider can now return multiple curies.
Changed `getCurieInformation(…)` to receive a `Links` instance with the previously added links and is forced to return a collection of curies so that multiple ones can be resolved transparently.

Made Curie value class protected to be able to reuse it from extensions of DefaultCurieProvider. Switched to the custom HATEOAS UriTemplate instance instead of the standard Spring MVC one.

Polished JavaDoc of DefaultCurieProvider. Removed some of the deprecation warnings that were introduced by the upgrade to Jackson 2.3. Polished (read: reactivated) some test cases and slightly changed the internals of UriTemplate works. Added TemplateVariables.asList().
2014-01-21 14:25:43 +01:00
Oliver Gierke
4d9373abcb #126 - Prepare 0.9 release.
Updated change log so far. Upgraded to latest dependency versions. Polished porject information in pom.xml. Added Spring dependencies that we directly depend on. Adapted test cases to changes in Jackson 2 output format. Updated ChangelogCreator to latest milestone and repository URI.
2014-01-21 13:12:53 +01:00
Oliver Gierke
b0cfaf7a62 #137 - Extracted TemplateVariable into separate class.
TempalteVariable is now a standalone class. Introduced TempalteVariables wrapper to allow easy collecting of TempalteVariable instances and rendering them in the shortest possible way.
2014-01-21 13:12:47 +01:00
Oliver Gierke
394fa4a009 #140 - Upgraded to Spring 3.2.6. 2014-01-19 18:39:45 +01:00
Oliver Gierke
6e9caf2556 #137 - Merged Link and LinkTemplate.
Link now exposes additional methods like isTemplate(), getTemplateVariables() and expand(…).
2014-01-19 18:38:53 +01:00
Oliver Gierke
bc97010cad #138 - Extended MethodParameters to be able to return parameters by type.
MethodParameters now has a getParametersOfType(…) method to access parameters by type. Also, it now checks for the presence of Spring 4 and automatically uses the improved ParameterNameDiscoverer which will be able to discover interface method parameter names on Java 8.
2014-01-16 13:39:48 +01:00
Oliver Gierke
83743d80a2 #137 - Initial support for link templates.
Added LinkTemplate domain type that can deal with URI templates as defined in http://tools.ietf.org/html/rfc6570. We currently support /, ?, & and # variables up to level 3 of the spec (multiple parameter definitions). The templates can be expanded to a Link instance.

Added the necessary HAL mixins to render the instances as specified.
2014-01-15 17:04:57 +01:00
Oliver Gierke
653f28727c #122 - Fixed parameter binding for optional request parameters.
If the method arguments handed into a dummy controller method invocation are required but null we now throw an exception as we cannot build a URI that hits the very same method in the very same way. Based on that, we now inspect @RequestParam annotated parameters for null values, allow them but don't bind a parameter for them anymore.
2014-01-02 12:15:47 +01:00
Oliver Gierke
9b172631f9 #121 - Fixed Bundlor template to create correct OSGi manifest. 2014-01-01 19:43:47 +01:00
Oliver Gierke
6673f1987f #133 - Made JsonPathLinkDiscoverer more robust.
JsonPathLinkDiscoverer now handles InvalidPathExceptions that might occur if the representation doesn't contain the link container element.
2013-12-29 20:26:39 +01:00
Oliver Gierke
bc68707e73 #125 - Prevent curies from being rendered if no link is curied. 2013-12-29 16:20:03 +01:00
Oliver Gierke
3b41fc9149 #132 - Added guard to Resource to shield it from being used with Collection content.
Fixed ticket links in Jackson2HalIntegrationTests.
2013-12-29 16:02:28 +01:00
Oliver Gierke
88da0672ab #125 - Polished curies in HAL and HAL rendering in general.
Both _links and _embedded are now only rendered if there's actual content to be rendered. The curies link is now always rendered as array as specified.
2013-12-28 21:02:27 +01:00
Oliver Gierke
dfa30398b6 #130 - Removed @Inherited annotation from @EnableHypermediaSupport. 2013-12-20 18:59:27 +01:00
Oliver Gierke
7ed46deb7b #129 - ResourceSupport does not return an unmodifiable link collection anymore.
Needed to not fail during JAXB deserialization.
2013-12-19 14:12:37 +01:00
Oliver Gierke
5c737d4b53 #110 - Fixed the collection of values in HalEmbeddedBuilder.
HalEmbeddedBuilder now favors the collection rel to lookup already registered embeddeds.
2013-12-19 13:02:37 +01:00
Oliver Gierke
137e7c390f #128 - Severe refactoring regarding LinkDiscoverers.
The LinkDiscoverer interface is now a Plugin<MediaType> to allow selecting a discoverer per media type. We also provide a LinkDiscoverers wrapper around a PluginRegistry for easier injection.

Dropped DefaultLinkDiscoverer as the above mentioned changed prohibits the usage of a discoverer without a media type. Clients that previously used DefaultLinkDiscoverer should switch to JsonPathLinkDiscoverer with a custom JsonPath expression and media type.

@EnableHypermediaSupport now supports multiple HypermediaType values set to be able to set up support for multiple hypermedia formats. Admittedly, the only currently supported type is HAL but we prepare for the addition of other (e.g. Collection/JSON or the like). We changed the infrastructure setup taken care of by @EnableHypermediaSupport to not enrich all ObjectMapper instances with our HAL modules but explicitly register an ObjectMapper with the application context and then registering a custom MappingJackson(2)HttpMessageConverter with the HandlerAdapter instances present in the ApplicationContext. We skip the registration if an already registered MJ2HMC has an ObjectMapper already supporting the Spring HATEOAS mixins.

Removed some compiler warnings.
2013-12-19 13:01:35 +01:00
Oliver Gierke
9eacd07203 #126, #123 - Added support for HAL curies.
Introduced CurieProvider interface as well as a DefaultCurieProvider that can be registered as Spring Bean to enable Links being rendered in a curie namespace and an additional curie link exposing the metadata of how to lookup the rel definition.

Deprecated Jackson 1 integration. Added helper class to find out whether a relation type is defined by the IANA.
2013-12-17 11:23:30 +01:00
Oliver Gierke
fac6bbb2cc #124 - Fixed mapping annotations in ResourceSupport types.
Added @XmlAnyElement to Resource and moved annotations to accessors to avoid name clashes when overriding them using Jackson mixins.
2013-12-16 15:12:47 +01:00
Ito Zapata
27069b82d6 #112 - Added support for X-Forwarded-Ssl header during link construction. 2013-12-10 14:42:44 +01:00
Spring Buildmaster
9ec6f34a6f #105 - Prepare next development iteration. 2013-09-08 16:46:15 -07:00
Spring Buildmaster
5b8578884a #105 - Release version 0.8.0.RELEASE. 2013-09-08 16:46:13 -07:00
Oliver Gierke
d00a56fc42 #105 - Prepare 0.8.0 release.
Updated changelog and ChangelogCreator.
2013-09-08 16:42:00 -07:00
Oliver Gierke
8628da7bba #106 - Upgraded to Jackson 2.2.0. 2013-09-08 16:41:08 -07:00
Oliver Gierke
64d2554325 #89 - Tweaked assertions in PageMetadata.
PageMetadata doesn't reject empty pages anymore if they're used with 1-indexed Pageables. Also tweaked the assertions to only reject negative values for now.
2013-08-26 18:08:46 +02:00
Oliver Gierke
9ee4552bfe #101 - Enable annotation based parameter name discovery on MethodParameters.
MethodParameters can now get an AnnotationAttribute configured that will be inspected for parameter name lookup. If it's not set or no annotated parameter is found we fall back to the standard behavior of MethodParameter and use a LocalVariableTableParameterNameDiscoverer.
2013-07-24 13:35:46 +02:00
Spring Buildmaster
9e37bdfc29 #74 - Prepare next development iteration. 2013-07-16 09:16:38 -07:00
Spring Buildmaster
14de0ac36c #74 - Release version 0.7.0.RELEASE. 2013-07-16 09:16:35 -07:00
Oliver Gierke
f149c2cc36 #74 - Prepare changelog for 0.7 release. 2013-07-16 18:13:46 +02:00
ericbottard
9c4d6029cf #98, #97 - Fixed XML element name for PagedResources to allow deserialization.
We need to have a different XML element name for PagedResources as it can be used as root element and JAXB cannot tell the difference between Resource and PagedResource otherwise.
2013-07-16 18:06:20 +02:00
Eric Bottard
cb6dd51e04 #99 - HalLinkListSerializer now generate stable link lists.
We're now using a LinkedHashMap when creating link lists.
2013-07-16 17:21:58 +02:00