Commit Graph

402 Commits

Author SHA1 Message Date
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
Oliver Gierke
d5e719825f #288 - Polishing.
Moved RenderSingleLinks enum into HalConfiguration. Simplified HalConfiguration setup by moving the default into the class. The lookup of a user-provided HalConfiguration is now handled on the bean name level to avoid premature initialization of a potentially defined bean. Formatting.

Original pull request: #295
Related issues: #291
2017-10-13 14:47:09 +02:00
Greg Turnquist
5eee30127d #288 - Introduced HalConfiguration to allow customizations of rendering options.
We now expose HalConfiguration to be defined as Spring bean in user configuration to control certain aspects of the HAL rendering. Initially we allow to control whether links shall always be rendered as collection. If no user-provided bean is available, we register a default instance.

Original pull request: #295
Related issues: #291
2017-10-13 14:30:16 +02:00
Kulcsár Roland
ab54e56f01 #638 - Fix typos in Javadoc. 2017-10-13 12:27:32 +02:00
Greg Turnquist
5faf9858bb #617 - AnnotatedParametersParameterAccessor now considers @AliasFor declarations.
We're now using SynthesizingMethodParameter to correctly support annotation attributes that use @AliasFor.

Original pull request: #621.
2017-10-13 11:43:08 +02:00
Oliver Gierke
4ad8c3b9aa #639 - Polishing.
Formatting and nullability in JavaDoc.
2017-10-05 15:28:21 +02:00
Oliver Gierke
ed7e430628 #639 - Added support for Optional controller method parameters in ControllerLinkBuilder.
We now properly consider Optional controller method parameters and correctly map its values to URIs created and optionality of the parameter derived.
2017-10-05 15:28:21 +02:00
Greg Turnquist
3006c47616 #635 - Upgrade to Spring 5 GA
On spring5 build profiles, use Spring 5 GA, and the subsequent snapshot release.
2017-09-28 11:53:59 -05:00
Greg Turnquist
ef825433e8 #627 - Upgrade to Spring 5 RC4 2017-09-18 09:48:47 -05:00
Oliver Gierke
9c7fa95541 #623 - Upgraded Spring 5 build profile to Jackson 2.9.1. 2017-09-08 17:28:15 +02:00
Oliver Gierke
8623106bb7 #597 - Polishing.
Formatting. Simplified resource loading in tests. Added missing line feed to ALPS sample file.
2017-09-07 13:49:14 +02:00
Greg Turnquist
b0820011e8 #597 - Add ALPS media type and LinkDiscoverer.
Migrate general ALPS material from Spring Data REST into Spring HATEOAS.
2017-09-07 13:48:37 +02:00