Commit Graph

839 Commits

Author SHA1 Message Date
Mark Paluch
65ad7cd3e1 DATAREST-1198 - Add Converter to convert String to javax.naming.ldap.LdapName.
We now provide and configure a converter for String to LdapName conversion so Spring Data LDAP can be used with Spring Data REST without further configuration.

Original pull request: #290.
2018-06-13 10:14:44 +02:00
Oliver Gierke
843540b746 DATAREST-1250 - Polishing.
Added unit test to verify new behavior and prevent regressions. Fixed author capitalization.
2018-06-05 10:11:37 +02:00
tigger
0cc1f22741 DATAREST-296 - ResourceMetadataHandlerMethodArgumentResolver now properly implements ….supports(…).
ResourceMetadataHandlerMethodArgumentResolver.supports(…) now properly checks for ResourceMetadata. It previously checked for RepositoryInformation which is probably a left-over from a previous state of the codebase and has been unnoticed so far as the class is only used as a direct dependency of other HandlerMethodArgumentResolvers.
2018-06-05 10:04:08 +02:00
Oliver Gierke
17c8c7ee2c DATAREST-1249 - Polishing. 2018-05-30 11:04:37 +02:00
Oliver Gierke
b61cb9ab28 DATAREST-1249 - DomainObjectMerger now properly binds to uninitialized target collections. 2018-05-30 10:40:34 +02:00
Oliver Gierke
a1454058d9 DATAREST-948 - Introduced ExposureConfiguration to allow customizing the exposure of HTTP methods of repositories.
ExposureConfiguration exposes methods to register AggregateResourceHttpMethodsFilter and AssociationResourceHttpMethodsFilter (both applied by type or globally) to customize the supported HTTP methods by collection, item and association resources. It also provides shortcuts for common use cases like disabling PUT for item resources etc.
2018-05-30 10:40:28 +02:00
Christoph Strobl
769a48d073 DATAREST-1230 - Prepare next development iteration. 2018-05-17 10:09:34 +02:00
Christoph Strobl
108d9106b8 DATAREST-1230 - Release version 3.1 M3 (Lovelace). 2018-05-17 09:51:42 +02:00
Mark Paluch
6a968d0f9c DATAREST-1196 - Prepare next development iteration. 2018-04-13 15:08:32 +02:00
Mark Paluch
c2327c4ff2 DATAREST-1196 - Release version 3.1 M2 (Lovelace). 2018-04-13 14:30:58 +02:00
Oliver Gierke
7eaf50d997 DATAREST-1222 - Switched to SimpleEvaluationContext for SpEL-based PATCH handling. 2018-03-28 09:56:50 +02:00
Oliver Gierke
75109533c9 DATAREST-1219 - Removed explicit declaration of Jackson library versions. 2018-03-27 19:53:57 +02:00
Oliver Gierke
80e25ce522 DATAREST-1215 - Added project.root configuration to make JavaDoc generation work again.
Related ticket: https://github.com/spring-projects/spring-data-build/issues/527.
2018-03-14 10:04:23 +01:00
Oliver Gierke
e79b73664a DATAREST-1212 - Deprecated RepositoryRestConfigurerAdapter.
We now recommend to implement RepositoryRestConfigurer directly as its declared methods are now default methods. We also introduced a static factory method to easily create a configurer to customize RepositoryRestConfiguration via a Lambda expression.

Moved test case setups that use that deprecated API to the new one.
2018-03-12 13:21:14 +01:00
Oliver Gierke
622cf07720 DATAREST-1193 - DelegatingHandlerMapping is now a MatchableHandlerMapping.
DelegatingHandlerMapping now implements MatchableHandlerMapping by selecting the a delegate based on the already implemented algorithm and then invoking the ….match(…) method in case the selected one is a MatchableHandlerMapping in turn.

Refactored the internals a bit to be able to reuse the selection algorithm from both ….getHandler(…) and ….match(…).
2018-02-19 18:04:25 +01:00
Christoph Strobl
1fcfe12168 DATAREST-1141 - Prepare next development iteration. 2018-02-06 10:11:15 +01:00
Christoph Strobl
cd594d5c46 DATAREST-1141 - Release version 3.1 M1 (Lovelace). 2018-02-06 09:47:10 +01:00
Oliver Gierke
a10aa934b7 DATAREST-1176 - Repository method exposure can now be controlled via RepositoryRestConfiguration.
The default exposure of repository methods is now controlled via RepositoryRestConfiguration.setExposeRepositoryMethodsByDefault(…). That allows us to remove the additional API from RepositoryDetectionStrategy as the mere detection is an orthogonal topic.

Also added RepositoryRestConfiguration.disableDefaultExposure() to set the RepositoryDetectionStategy to ANNOTATED and disables default method exposure in one go. That can be exposed via a Spring Boot configuration property downstream.
2018-01-18 18:41:07 +01:00
Simon Allegraud
d4a3ba1195 DATAREST-1181 - Prevent NullPointerException during JsonLateObjectEvaluator.evaluate(…).
Original pull request: #287.
2018-01-18 13:49:53 +01:00
Oliver Gierke
7edfc75472 DATAREST-1174 - Enable constructor properties to make sure WrappedPropertiesUnitTests continue to work.
Removed Lombok constructor and accessor generation to avoid having to deal with the changed default in Lombok 1.16.20 not generating @ConstructorProperties by default anymore.
2018-01-10 12:51:29 +01:00
Mark Paluch
5d9dbf1823 DATAREST-1170 - Update copyright years to 2018. 2018-01-09 08:44:14 +01:00
Oliver Gierke
d3c5e339db DATAREST-1160 - Adapt tests to new CORS defaults in Spring Framework.
Spring Framework 5.0.2 changes the default for the Allow-Credentials header to false. We now adapted our test case to that and also drop the expectation to see the request URL in the Allow-Origin header as that is only returned if Allow-Credentials is true, which it now isn't by default.
2017-11-27 09:57:30 +01:00
Oliver Gierke
d48499ad8d DATAREST-1152 - Overhaul of patch expression handling.
Significantly refactored the way that patch path expressions are handled and evaluated. The new design is centered around SpelPath that is aware of the original path as well as the derived SpEL expression. That SpelPath then requires clients to bind it to a type so that the original path can be validated (and rejected if invalid) and provide API to read, set, copy and move values backed by the original path. Both SpelPath and TypedSpelPath instances are cached to avoid repeated creation.

PatchOperation implementations now provide more fluent factory methods, in some cases via intermediate builders. Removed a lot of obsolete code that created JsonNodes from a list of PatchOperations as we don't actually use that functionality anywhere. Removed obsolete generics where possible.
2017-10-25 17:34:46 +02:00
Simmo Saan
74e12a55b7 DATAREST-1148 - Fix eager toString() call on domain object in ResourceStatus.
Originl pull request: #282.
2017-10-12 23:12:34 +02:00
Oliver Gierke
33c551014d DATAREST-1006 - Polishing.
Added unit test on MappingProperties directly.

Original pull request: #258.
2017-10-04 11:37:02 +02:00
Mathias Düsterhöft
4207be4243 DATAREST-1006 - MappedProperties now skips all ignored properties.
Original pull request: #258.
2017-10-04 11:36:54 +02:00
Mark Paluch
127640dd14 DATAREST-1129 - Prepare next development iteration. 2017-10-02 11:37:22 +02:00
Mark Paluch
ac2cbfcbc5 DATAREST-1129 - Release version 3.0 GA (Kay). 2017-10-02 11:10:23 +02:00
Oliver Gierke
973f932a39 DATAREST-1137 - All patch operations now verify path expressions.
We now make sure that all patch operations now get the path they're supposed to be applied to verified before execution.
2017-09-27 09:47:18 +02:00
Oliver Gierke
d56a1068ea DATAREST-1132 - Fixed @BasePathAwareController annotation lookup from CGLib proxies.
We now inspect the user class of the given bean type in BasePathAwareHandlerMapping.isHandler(…). We can't use AnnotationUtils as @RepositoryRestController is also annotated with @BasePathAwareController but must not be handled by this mapping.
2017-09-25 11:54:05 +02:00
Oliver Gierke
c0a3fb5678 DATAREST-1136 - DelegatingHandlerMapping now exposes its delegates. 2017-09-25 09:34:33 +02:00
Mark Paluch
a315e054ba DATAREST-1135 - Added explicit automatic module name for JDK 9. 2017-09-21 14:11:02 +02:00
Oliver Gierke
8e16a9553f DATAREST-1112 - Prepare next development iteration. 2017-09-11 17:40:19 +02:00
Oliver Gierke
c3dc9ebfaf DATAREST-1112 - Release version 3.0 RC3 (Kay). 2017-09-11 17:24:45 +02:00
Oliver Gierke
8f269e28fe DATAREST-1127 - Patch operations now always verify paths before operation application.
Previously the SpEL expresssion created from JSON Patch path expressions were executed without double checking whether these paths actually exist on the target object in the first place. This is now in place.
2017-09-08 12:20:44 +02:00
Oliver Gierke
530e7c773e DATAREST-1121 - Skip last modified detection for query methods that project.
For an execution of a projecting query method we now skip the last modified detection as it actually doesn't make sense if applied to non-aggregates.
2017-08-24 22:19:18 +02:00
Oliver Gierke
2a8eb44cc9 DATAREST-1111 - Prepare next development iteration. 2017-07-25 16:10:35 +02:00
Oliver Gierke
ccc5b228cd DATAREST-1111 - Release version 3.0 RC2 (Kay). 2017-07-25 15:34:24 +02:00
Oliver Gierke
59a9d4d7df DATAREST-1093 - Prepare next development iteration. 2017-07-25 10:00:06 +02:00
Oliver Gierke
e54f908218 DATAREST-1093 - Release version 3.0 RC1 (Kay). 2017-07-25 09:48:49 +02:00
Oliver Gierke
5836baaabf DATAREST-1105 - Polishing.
Simplified code a bit. Formatting. Adapted integration tests to make sure URI templates are always expanded.

Original pull request: #273.
2017-07-19 16:05:27 +02:00
Haroun Pacquee
0d7d84571f DATAREST-1105 - Association links now advertise projections.
Association links now explicitly indicate projections are available in case there are projection types registered for the association target type.

Original pull request: #273.
2017-07-13 17:24:43 +02:00
Oliver Gierke
c922ba38d2 DATAREST-1106 - Moved off deprecated methods to setup a ProjectionFactory in configuration.
Switched from ProxyProjectionFactory.setResourceLoader(…) to ….setBeanClassLoader(…). Some generics polishing and removal of obsolete warnings supression.
2017-07-11 11:00:33 +02:00
Oliver Gierke
2ad963074c DATAREST-1104 - Adapt to API changes in mapping subsystem. 2017-07-04 15:27:54 +02:00
Oliver Gierke
069869a69b DATAREST-540 - Renamed RepositoryRestConfiguration bean config to repositoryRestConfiguration. 2017-06-20 13:03:17 +02:00
Oliver Gierke
585072a1b7 DATAREST-1060 - Improve AssociationOmittingSerializerModifier to not break on Jackson 2.9.
According to this upstream ticket [0] we need to override BeanSerializerModifier.changeProperties(…) rather than ….updateBuilder(…). The commit just does that.

[0] https://github.com/FasterXML/jackson-databind/issues/1664

Related ticket: FasterXML/jackson-databind#1664
2017-06-19 17:39:23 +02:00
Mark Paluch
b62c950b4a DATAREST-1071 - Prepare next development iteration. 2017-06-14 17:14:07 +02:00
Mark Paluch
1c5d3b4c76 DATAREST-1071 - Release version 3.0 M4 (Kay). 2017-06-14 17:03:48 +02:00
Oliver Gierke
51812ccc97 DATAREST-1092 - Removed Spring 4.3 style handling of non-nullability in PatchOperations. 2017-06-14 15:32:40 +02:00
Oliver Gierke
37b0dc2dff DATAREST-1092 - Improve exception handling in PatchOperation for Spring 5 compatibility.
We now also catch SpelEvaluationException in the attempt to set a null value for an expression as Spring 5 now reports a failed attempt (e.g. if the target type is not nullable) using that type whereas Spring 4.3 threw a NullPointerException.
2017-06-14 11:26:37 +02:00