Commit Graph

413 Commits

Author SHA1 Message Date
Johnny Lim
ca0263fc5a #751 - Align Hop header assertions with HttpHeaders and javadocs.
Spring Framework accepts `null` for header values in HttpHeaders. This is already reflected in the javadocs.
2018-12-07 11:41:10 -06:00
Greg Turnquist
d5649c0de1 #667 - Fix Link to ignore setting "templated" properties.
Deserializing a Link with a templated URI will cause Jackson to break due to there being no "templated" property. This adds a private, no-op `setTemplated` method to allow deserialization to occur yet not alter the Link..
2018-12-06 12:54:28 -06:00
Jens Schauder
367f560745 #695 - Polishing.
* Removed Jaxb annotations from packaga-info.java.
* Simplified Test code by removing unused code a debug output.
* Formatting.
* Updated copyright headers.
2018-12-06 12:25:22 -06:00
Greg Turnquist
dca65e15f8 #695 - Remove Jaxb annotations.
By removing all Jaxb annotations, requesting data from a hypermedia-enabled endpoint inside a browser (which defaults to accept:application/xhtml+xml,*/*), Spring HATEOAS will yield HAL.
2018-12-06 12:00:44 -06:00
Oliver Drotbohm
eff893fcf8 #758 - Polishing.
Original pull request: #717.
2018-12-06 14:21:10 +01:00
Greg Turnquist
bb4a4a615c #758 - Centralize all Forward header handling.
Spring 5.1 is centralizing all Forward header handling. This moves critical bits into one location, making it easy to completely remove once we rebaseline against this version.

Also adds a test profile to ensure Spring 5.1 doesn't break anything.

Original pull request: #717.
2018-12-06 14:20:54 +01:00
Oliver Drotbohm
267ff45043 #754 - Upgrade to Jackson 2.9.7. 2018-12-06 13:22:20 +01:00
Greg Turnquist
9f7eaeecd9 #752 - Upgraded to latest Spring 5.0 version. 2018-11-26 15:29:49 -06:00
Greg Turnquist
df618efd12 #743 - Polishing. 2018-10-25 11:54:25 -05:00
Manish Misra
b60799d7fa #743 - Allow custom headers on each hop. 2018-10-25 11:39:15 -05:00
Oliver Gierke
8cfbfc1b89 #719 - Simplified configuration setup.
We now avoid to register ObjectMapper instances as Spring beans and rather use one already existing in the ApplicationContext and copying the setup before registering the individual HttpMessageConverters for the individual media types.

Replaced a lot of the programmatic component setup via BeanDefinitions with their corresponding JavaConfig alternatives.

Removed obsolete media type specific HttpMessageConverters and configuration classes registering them.
2018-06-22 11:30:16 +02:00
Kulcsár Roland
900b2e5572 #714 - Use system-dependent line separator. 2018-05-29 11:11:11 -05:00
Greg Turnquist
ef3e3c48fe #711 - Polishing. 2018-05-15 15:08:35 -05:00
Greg Turnquist
8f15301220 #711 - Upgrade to Spring Framework 5.0.6.RELEASE. 2018-05-15 15:06:34 -05:00
Oliver Gierke
61972998ac #482 - Polishing. 2018-04-18 16:55:19 +02:00
Greg Turnquist
d6e02857f1 #482 - Add support for Collection+JSON mediatype.
Introduce support for media type application/vnd.collection+json. Collection+JSON doesn't allow metadata at the top, so paging data can't be covered, however, everything else fits.

Also moved a little bit more into Affordance and SpringMvcAffordance to avoid using Spring MVC annotations directly in a given mediatype's AffordanceModel.

Refactored bits of HAL-FORMS to reuse the new PropertyUtils, ensuring Jackson ignore annotations are taken into consideration. Also added MockMVC tests to show HAL-FORMS and Collection+JSON working together, against the same controller.
2018-04-18 16:44:15 +02:00
Greg Turnquist
3af698d928 #700 - Remove JAX-RS support. 2018-04-18 16:34:35 +02:00
Greg Turnquist
22bd76db49 #665 - Fix ALPS format.
According to the ALPS spec, it's "descriptor" not "descriptors", despite it depicting an array of potentially multiple values. Also fixed the ordering to match as closely as possible all the samples shown in the spec.

Original pull request: #666.
2018-04-18 16:28:49 +02:00
Ron Alleva
b71e1286cf #701 - Polishing. 2018-02-20 12:31:13 -06:00
Greg Turnquist
3bbfef3fef #699 - Polishing. 2018-02-19 13:44:09 -06:00
Jeffrey Walraven
ba1dae383c #699 - Render additional RFC5988 attributions in HAL. 2018-02-19 13:39:51 -06:00
Johnny Lim
1e32bb5d2d #672 - Add maven wrapper.
Updates the Travis script and the build_all.bash script to also use the maven wrapper.
2018-01-03 14:10:06 -06:00
Sylvain
bd44eb890c #682 - Polishing. 2018-01-03 13:52:45 -06:00
Christian Bühler
21719bb041 #686 - Support whitespace in Links header (RFC 5988).
RFC 5988 (https://tools.ietf.org/html/rfc5988#section-5.5) has clear examples of whitespace in link headers. This commit introduces support (and tests) to support these spec cases.
2018-01-03 13:50:25 -06:00
Johnny Lim
13db7c7fb2 #685 - Polishing.
Remove merge conflict messages.
2017-12-31 13:17:54 -06:00
Oliver Gierke
32ff7cc576 #340 - Polishing.
More Java 8 related cleanups (diamond operator etc.).
2017-11-29 12:59:59 +01:00
Greg Turnquist
fed5f6c313 #340 - Patch ALPS serialization property order.
Side effect of upgrading Jackson appears to be arbitrary change in order of property serialization. This commit forces the order to match the spec and fixes the related test cases.
2017-11-29 12:59:59 +01:00
Greg Turnquist
b81b1a4e45 #340 - Polishing.
Used IDE to migrate several Java 6 constructors to Java 8.
2017-11-29 12:59:58 +01:00
Oliver Gierke
092ceb987f #340 - Polishing.
Moved AffordanceModelFactory into core package as it's SPI. Switched to Spring Factories lookup of implementation classes so that we avoid a package dependency between the MVC package and the media type specific packages. Removed reference to MediaType from AffordanceModelFactory to AffordanceModel so that a factory can even provide models for different MediaTypes (i.e. different flavors of the same one, e.g. HAL Forms for JSON and XML). Also removed addAffordanceModel(…) from Affordance to not force the implementations into mutability. Made most of the affordance building API types package protected. HalFormsAffordanceModel now uses MethodParameters abstraction to simplify model parsing code.

Tweaked HAL forms model to work with factory methods for required properties and wither methods to add optional properties. Tweaked and inlined mixin types in Jackson module for HAL forms.

Slight API polishing on Link to make sure Affordance collecting methods are not named with….

Tweaked Lombok setup to use all caps for logger constants. Removed deprecation warnings in Jackson2HalModule.
2017-11-29 12:59:58 +01:00
Greg Turnquist
70448a8540 #340 - Add new Affordances API + HAL-FORMS mediatype.
* Introduces new Affordances API to build links related to each other to serve other mediatypes
* Introduces HAL-FORMS, which uses affordances to automatically generate HTML form data based on Spring MVC annotations.

Original pull-request: #340, #447, #581
Related issues: #503, #334, #71
2017-11-29 12:59:58 +01:00
Oliver Gierke
79ebf9b5a4 #671 - Polishing.
Introduced Link.hasRel(…) and use that to filter link lookups in ResourceSupport.
2017-11-29 12:00:02 +01:00
Johnny Lim
d40bda2337 #671 - Remove list creation in ResourceSupport.getLink().
Since `ResourceSupport` has direct access to the list of links, no need to build up an intermedia `List` and then filter on it. Simply filter on the internal list of links. Also did some minor polishing.
2017-11-15 10:34:04 -06:00
Oliver Gierke
ad801e9003 #662 - Upgraded to Spring Framework 5.0.2. 2017-10-30 14:10:18 +01:00
Maciej Walkowiak
6d952b1abf #655 - Replace Java8Utils by utilizing Spring 5's Optional support.
Since the baseline for the next version is Java 8 there is no need to check if Optionals are on the classpath.

Original pull request: #657.
2017-10-30 13:13:12 +01:00
Kulcsár Roland
cf3ab53b5a #658 - Remove unused Enhancer variable in DummyInvocationUtils. 2017-10-30 12:40:36 +01:00
Oliver Gierke
b217b6a4ab #653 - Polishing.
Consistently add // at manually separated stream steps.
2017-10-16 17:59:33 +02:00
Oliver Gierke
d9c53b5eeb #653 - Polishing.
Expose nullability in Identifiable, ResourceSupport and Links via Optional.
2017-10-16 17:58:55 +02:00
Kulcsár Roland
4c7227e274 #653 - Use Java 8 Stream API. 2017-10-16 17:40:37 +02:00
Oliver Gierke
7a5b7b1c9f #652 - Moved off Jackson 2.9 deprecations. 2017-10-15 09:25:24 +02:00
Oliver Gierke
e412bbb7f0 #649 - Polishing.
Related ticket: #642.
2017-10-15 09:16:09 +02:00
Kulcsár Roland
7570b003d1 #649 - Use Java 8 Map enhancements.
Related ticket: #642.
2017-10-15 09:15:45 +02:00
Oliver Gierke
160afea34d #648 - Added build setup to add Java 9 automatic module name. 2017-10-14 01:00:12 +02:00
Oliver Gierke
35033fee0e #647 - Switch to AssertJ and upgrade to Mockito 2. 2017-10-14 00:59:54 +02:00
Oliver Gierke
b862919868 #646 - Upgraded to Lombok 1.16.18. 2017-10-14 00:59:54 +02:00
Oliver Gierke
09f7a5d5eb #641 - General dependency upgrade. 2017-10-14 00:59:51 +02:00
Oliver Gierke
aaddb8fc55 #645 - Upgraded to Spring Plugin 2.0. 2017-10-14 00:59:18 +02:00
Oliver Gierke
ba63e0527f #643 - Upgrade to Spring Framework 5 as development baseline.
Upgraded to required Jackson 2.9 baseline, too.
2017-10-14 00:59:18 +02:00
Oliver Gierke
79618e9e10 #642 - Upgrade compiler level to Java 8. 2017-10-14 00:59:18 +02:00
Oliver Gierke
17981e77e5 #644 - Removed Bundlor Maven plugin. 2017-10-13 17:54:49 +02:00
Oliver Gierke
4d7c618ca7 #641 - Prepare 1.0 development. 2017-10-13 17:52:54 +02:00