Commit Graph

269 Commits

Author SHA1 Message Date
Oliver Gierke
e1afab94de #269 - Polishing.
Simplified slash removal and made sure slashes occuring multiple times are removed properly.

Original pull request: #423.
2016-01-12 09:51:45 +01:00
Kevin Conaway
720ff797de #269 - Make sure URL parts are joined by exactly one slash.
Original pull request: #423.
2016-01-12 09:49:29 +01:00
Oliver Gierke
792b5fcd22 #398 - Polishing.
Some JavaDoc, formatting, copyright year expansion and author tags. Test method ordering.

Original pull request: #422.
2016-01-07 18:58:32 +01:00
Kevin Conaway
7174015746 #398 - Remove unnecessary URI conversion in ControllerLinkBuilderFactory.
ControllerLinkBuilderFactory now forwards the source UriComponents to the ControllerLinkBuilder instead of turning it into a URI and a UriComponentsBuilder in turn.

Original pull request: #422.
2016-01-07 18:57:21 +01:00
Oliver Gierke
dd0f9e8905 #421 - DefaultCurieProvider now automatically prefixes URIs in case they're not absolute.
DefaultCurieProvider now automatically adds the application URI (servlet mapping) in case the UriTemplate configured does not contain an absolute URI in the first place.
2016-01-04 17:17:14 +01:00
Oliver Gierke
4e1e5ed934 #383 - Reinstantiated Jackson 2.4 compatibility.
Re-introduced the simple isEmpty(…) methods in custom Jackson serializers as the more complex ones were introduced in Jackson 2.5 only. Removed the @Override annotations so that we could even compile against 2.4 if needed.
2015-09-03 14:19:03 +02:00
Tom Bunting
dd4ec341b5 #337 - Fixed potential double-encoding in Traverson.
We now avoid calling URI.toString() to early to prevent the need to re-parse it and thus accidentally cause a double-encoding.

Original pull request: #382.
2015-09-03 12:39:04 +02:00
Oliver Gierke
a019edae82 #381 - Upgraded Spring 4.2 build profile to Spring 4.2.1.RELEASE. 2015-09-02 08:38:49 +02:00
Oliver Gierke
9d35670e77 #380 - Renamed *Tests classes to *Test to make sure the Maven build runs them. 2015-09-02 08:30:49 +02:00
Spring Buildmaster
b41402f195 #379 - Prepare next development iteration. 2015-09-01 00:10:02 -07:00
Spring Buildmaster
e538dd31be #379 - Release version 0.19.0.RELEASE. 2015-09-01 00:10:00 -07:00
Oliver Gierke
d4ac71a9fd #379 - Updated changelog. 2015-09-01 09:02:18 +02:00
Oliver Gierke
1ecedaa4b3 #379 - Added test case that shows AbstractJackson2HttpMessageConverter drop information on rendering on Spring 4.2 and Jackson 2.6.
Related tickets: spring-projects/spring-boot#3731, SPR-13318.
2015-09-01 08:54:16 +02:00
Andy Wilkinson
790e10be25 #376 - Compile against latest JAX-RS API.
This commit updates Spring HATEOAS' optional dependency on the JAX-RS API to use the latest version (which uses a different artifact ID). This change will make things a little easier for the Spring IO Platform which currently provides dependency management for Jersey 2.x (which uses JAX-RS 2.0), by allowing it to stop providing dependency management for the JAX-RS 1.0 API.
2015-08-31 11:58:02 +02:00
Oliver Gierke
71ec26fc8d #378 - HAL links get title attributes rendered resolved through a resource bundle.
HalLinkListSerializer now tries to obtain a link title by looking up key _links.$rel.title for both the namespaced (curied) and local link relation if the former doesn't resolve into a message.
2015-08-19 19:07:07 +02:00
Oliver Gierke
d77a4b65f5 #320 - Overhaul in curie rendering.
The curie rendering has been improved in the following ways:

- Resources now get their embeds inspected for namespaced keys and curies are added if at least one is found. This makes sure curies are also rendered if no namespaced link is registered.
- Nested resources skip curies entirely, assuming they have been added to the root correctly.

Had to change the order of _embedded and _links to make sure the embedded elements are processed first to tweak the links to indicate the need for curies.
2015-08-19 16:35:04 +02:00
Oliver Gierke
d8cc666703 #363 - Extended DefaultCurieProvider to be able to configure multiple curies.
DefaultCurieProvider now also takes a Map<String, UriTemplate> to expose multiple curies. The default curie to be used to expand unprefixed, non-IANA link relations has to be defined explicitly in case more than one curie is if given. If there's only one, that becomes the default, too.
2015-08-13 21:31:17 +02:00
Oliver Gierke
dcf692cbdb #375 - Fixed is-empty evaluation for TrueOnlyBooleanSerializer on Jackson 2.6.
Added missing override for isEmpty(…) that gets used by Jackson 2.6+ to prevent { templated : false } get rendered in HAL link representations.

Polished Javadoc on the way.
2015-08-11 21:17:20 +02:00
Oliver Gierke
e6e23b4330 #353 - After release cleanups.
Updated changelog.
2015-08-04 11:09:43 +02:00
Spring Buildmaster
01d2489504 #353 - Prepare next development iteration. 2015-08-04 02:04:13 -07:00
Spring Buildmaster
d0691ab51b #353 - Release version 0.18.0.RELEASE. 2015-08-04 02:04:10 -07:00
Przemek Nowak
2cec9982b5 #247 - Added HAL_JSON_VALUE in MediaTypes.
Original pull request: #329.
2015-08-04 10:56:19 +02:00
Angel Aguilera
c73dde68f4 #364 - Add missing parentheses in reference documentation.
Original pull request: #364.
2015-08-04 10:51:06 +02:00
Oliver Gierke
2222a40cb3 #353 - Dependency upgrades.
Spring Framework 4.0.9 -> 4.1.7
Minidev JSON 2.1.1 -> 2.2
JSONPath 0.9.1 -> 2.0.0
Spring Data Build Resources 1.6.0 -> 1.6.2
Lombok 1.14.4 -> 1.16.4
JUnit 4.11 -> 4.12
Mockito 1.9.5 -> 1.10.19
JodaTime 2.3 -> 2.8.1
XMLUnit 1.5 -> 1.6

Asciidoctor Maven Plugin 1.5.2 -> 1.5.2.1
AsciidoctorJ PDF 1.5.0-alpha.6 -> 1.5.0-alpha.8
Maven Assembly Plugin 2.5.4 -> 2.5.5

Updated available build profiles. Update Javadoc reference to link to used Spring Framework version.
2015-08-04 10:48:07 +02:00
Greg Turnquist
5429d00501 #355 - Clean up Traverson section in reference documentation.
Further explanations on Resources vs. Resource.

Original pull request: #356.
2015-08-04 10:35:44 +02:00
Oliver Gierke
e9d83c5c48 #369 - Traverson no defensively expands URIs handed to getAndFindLinkWithRel(…). 2015-08-04 10:35:44 +02:00
Oliver Gierke
07a5620d9f #368 - Assert Jackson 2.6.0 compatibility.
Switched from overrides of the deprecated (and removed in 2.6) isEmpty(T) to isEmpty(SerializerProvider, T). Switched from deprecated @JsonSerialize(include = …) to the dedicated @JsonInclude annotation.
2015-08-04 10:35:44 +02:00
Oliver Gierke
7c9d6bb655 #360 - Removed test call to method only available on Spring 4.2. 2015-08-04 10:35:44 +02:00
Oliver Gierke
8bdc57ba89 #360 - Improved test cases for TypeConstrainedHttpMessageConverter. 2015-08-04 10:35:44 +02:00
Oliver Gierke
ab613f85ac #360 - Improved TypeConstrainedHttpMessageConverter on generics matching.
We now locally resolve the generic type using Jackson's JavaType in canRead(Type, Class, MediaType) to avoid having to call the non-generic method as this caused us having to tweak it's implementation to avoid the super.canRead(Class, MediaType) check as this in turn forwards to the generic method (which then would've caused a stack overflow.
2015-08-04 10:35:43 +02:00
Oliver Gierke
28234e16a5 #360 - Tweaked TypeConstrainedMappingJackson2HttpMessageConverter to reject all types not matching the configured one.
We now also override canRead(Type, Class<?>, MediaType) to make sure we can opt out of being used for generic type matching.
2015-08-04 10:35:43 +02:00
Oliver Gierke
a356dc3b89 #353 - Updated dependencies.
Logback 1.1.2 -> 1.1.3
Jackson 2.4.3 -> 2.4.6
Minidev JSON 2.1.0 -> 2.1.1
Slf4j 1.7.10 -> 1.7.12
Spring 4.1.5 -> 4.1.6
Spring Data Build resources 1.5.2 -> 1.6.0

Maven Antrun Plugin 1.7 -> 1.8
Maven Assembly Plugin 2.4 -> 2.5.4
Wagon Maven Plugin 1.0-beta-5 -> 1.0
Maven Compiler Plugin 3.2 -> 3.3
Maven JAR Plugin 2.5 -> 2.6
Maven Javadoc Plugin 2.10.1 -> 2.10.3
Maven Deploy Plugin 2.8.1 -> 2.8.2
2015-08-04 10:35:40 +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
96166f9ede #347 - Added exclusions for Intellij files. 2015-05-21 14:56:58 +02:00
Oliver Gierke
bbb75885d5 #342 - Polishing.
Extracted exception message into a constant. Added author where necessary and extended copyright headers. Fixed import order. Moved unit test into ControllerLinkBuilderUnitTest. Tweaked it to use JUnit rule.

Original pull request: #344.
2015-05-21 14:56:55 +02:00
Greg Turnquist
b592ddda92 #342 - Augment error message when building link without a web request.
We now explicitly check whether we could look up request attributes and throw an exception with a message indicating the cause of the failure.

Original pull request: #344.
2015-05-21 14:47:39 +02:00
Oliver Gierke
4c2c6d5a4a #341 - Default ObjectMapper for HAL now ignores unknown properties.
We now explicitly disable the "fail on unknown properties" deserialization feature for the ObjectMapper instance used with our default HAL setup to be able to use it with a RestTemplate out of the box.
2015-05-17 17:26:33 +02:00
Oemer Yildiz
312fa3ead9 #331 - Fixed handling of @RequestParam with default value set.
ControllerLinkBuilderFactory now checks the default value of an @RequestParam annotated handler method parameter before triggering strict validation.

Original pull request: #332.
2015-04-13 16:41:34 +02:00
Oliver Gierke
22488e0c05 #322 - Upgrade to Spring Plugin 1.2.0. 2015-03-19 16:12:50 +01:00
Oliver Gierke
2bcfd92c3b #321 - Remove dependency to Objenesis.
We're now using the inlined version of Objenesis in Spring Framework to avoid the additional dependency.
2015-03-19 13:34:41 +01:00
Oliver Gierke
dc90d23da7 #314 - HalLinkDiscoverer now also works for URI rels.
Relation names can be fully qualified URIs. HalLinkDiscoverer now quotes the relation name handed into the constructor so that the expression parsing works as expected.
2015-03-09 23:30:24 +01:00
Spring Buildmaster
15e2eb1f75 #308 - Prepare next development iteration. 2015-03-05 01:34:30 -08:00
Spring Buildmaster
9985e7055b #308 - Release version 0.17.0.RELEASE. 2015-03-05 01:34:25 -08:00
Oliver Gierke
2d329603af #308 - Prepare 0.17.0.RELEASE.
Updated changelog, notice.txt.
2015-03-05 10:31:15 +01:00
Oliver Gierke
76ae2475ec #278 - Shortened README to point to the reference documentation. 2015-03-05 10:30:39 +01:00
Oliver Gierke
51847980d2 #312 - Test case to verify Link keeps the complete base URI. 2015-03-02 16:45:48 +01:00
Oliver Gierke
de59fa40b9 #313 - Assert compatibility with JSONPath 0.9 and 1.2.
We now reflectively invoke the JSONPath.compile(…) method as the method signature has changed but we need to stay compatible with 0.9 to allow the Spring Data Evans release train to upgrade to 0.17 without a major third-party dependency upgrade.

Copied the reflective method lookup from Spring's JsonPathExpectationsHelper.

Related ticket: #297, #305.
2015-03-02 16:05:12 +01:00
Oliver Gierke
c3dcdf1b9e #306 - Renamed type references types to allow more concise usage.
Renamed the Resource, Resources and PagedResources types in TypeReferences to *Type so that new TypeReferences.Resources<User>() {} now becomes new ResourcesType<User>() {}.

Prior to this change a static import of TypeReferences would've cause the actual Resource types to be fully qualified.
2015-03-02 12:48:21 +01:00
Oliver Gierke
0021d3818a #267 - Polishing. 2015-02-27 16:08:27 +01:00