Commit Graph

243 Commits

Author SHA1 Message Date
Oliver Drotbohm
dc10166679 DATAREST-1304 - EntityLookupConfiguration is now used in PUT for creation.
Previously the backend identifier derived from the URI was set as identifier on the object to be created in a PUT request. However, in case a custom entity lookup is used, this is not the identifier but an arbitrary property pointed to through user defined code, mostly a method reference.

We now use the newly introduced MethodInvocationRecorder API in Spring Data Commons to be able to obtain the property that is supposed to be used and set that to the value calculated. This requires the entity type for which the custom lookup is configured to be non-final as the invocation recording is build on top of proxies.

Related tickets: DATACMNS-1449.
2019-03-06 14:34:58 +01:00
Oliver Drotbohm
e6c816faad DATAREST-1348 - Upgrade to Spring Plugin 2.0 M1. 2019-03-04 17:02:27 +01:00
Oliver Drotbohm
d714d10675 DATAREST-1341 - Upgrade to latest API changes in Spring HATEOAS. 2019-03-04 11:42:58 +01:00
Oliver Drotbohm
47a759e3c3 DATAREST-1341 - Upgrade to latest API changes in Spring HATEOAS. 2019-03-01 00:26:06 +01:00
Oliver Drotbohm
1bf08180db DATAREST-1341 - Adapt to package refactorings in Spring HATEOAS. 2019-02-27 20:31:59 +01:00
Oliver Drotbohm
900baeb926 DATAREST-1341 - Add Spring MVC as core dependency temporarily.
Previiously, Spring HATEOAS pulled in the Spring WebMVC and apparently CorsRegistry, referenced from RepositoryRestConfiguration (unexpectedly) lives in that module. We now explicitly declare Spring WebMVC as dependency of Spring Data REST Core for the time being until [0] is resolved.

Related tickets: [0] spring-projects/spring-framework#22458
2019-02-22 18:33:12 +01:00
Oliver Drotbohm
554d6cb27b DATAREST-1341 - Further API adaption for Spring HATEOAS 1.0. 2019-02-15 11:10:59 +01:00
Oliver Drotbohm
93b8e68bbf DATAREST-1341 - Move off of Java8PluginRegistry in favor of Spring Plugin's update one. 2019-02-07 20:55:42 +01:00
Greg Turnquist
af6f55a92c DATAREST-1341 - Upgrade to Spring HATEOAS 1.0. 2019-02-07 20:55:42 +01:00
Mark Paluch
68bfd55982 DATAREST-1330 - Update copyright years to 2019. 2019-01-08 11:47:37 +01:00
Oliver Drotbohm
3ea48a6223 DATAREST-1320 - Polishing. 2018-12-21 15:04:52 +01:00
Oliver Drotbohm
39b897e6d1 DATAREST-1320 - Fixed lookup of cached values in PersistentEntitiesResourceMappings.
We now properly only answer PersistentEntitiesResourceMappings.hasMappingsFor(…) with true if we find a non-null value in the cache. Previously, even a failed attempt to create some ResourceMapping would've caused ….hasMappingsFor(…) to indicate it PersistentEntitiesResourceMappings contains a mapping.

This lead to downstream NullPointerExceptions as ….getMetadataFor(…) was accessed without a null guard after ….hasMappingFor(…) returned true.
2018-12-21 15:04:44 +01:00
Oliver Drotbohm
8c0348f41b DATAREST-1324 - Polishing.
Removed trailing whitespace from Javadoc comments.
2018-12-21 14:32:26 +01:00
Oliver Drotbohm
7900ca8657 DATAREST-1324 - Fixed return type of ConfigurableHttpMethods.enable(…).
We now also return ConfigurableHttpMethods from its ….enable(…) method to make sure it can be chained properly.
2018-12-21 14:32:02 +01:00
Oliver Drotbohm
13370f8e2f DATAREST-1322 - Fix proxy detection for Hibernate 5+ compatibility.
Switched to Spring Data Commons' ProxyUtils for a proxy detection mechanism that supports Hibernate 5 proxies.
2018-12-20 17:16:49 +01:00
Christoph Strobl
5e9cb5014b DATAREST-1316 - Prepare next development iteration. 2018-12-11 11:07:51 +01:00
Christoph Strobl
0c026dc3d3 DATAREST-1316 - Release version 3.2 M1 (Moore). 2018-12-11 10:53:53 +01:00
Mark Paluch
b0c0a70ff0 DATAREST-1277 - Prepare next development iteration. 2018-09-21 07:45:27 -04:00
Mark Paluch
e96904414b DATAREST-1277 - Release version 3.1 GA (Lovelace). 2018-09-21 07:08:39 -04:00
Oliver Gierke
d243be79da DATAREST-1267 - Prepare next development iteration. 2018-08-20 10:56:52 +02:00
Oliver Gierke
b2da264bea DATAREST-1267 - Release version 3.1 RC2 (Lovelace). 2018-08-20 10:40:11 +02:00
Mark Paluch
fd5cb8342a DATAREST-1245 - Prepare next development iteration. 2018-07-26 12:32:25 +02:00
Mark Paluch
a9aeb856fd DATAREST-1245 - Release version 3.1 RC1 (Lovelace). 2018-07-26 12:06:35 +02:00
Oliver Gierke
781e1affe2 DATAREST-1261 - Fixed invalid fallback to default delegate in UnwrappingRepositoryInvoker.invokeFindById(…).
Previously we fell back to the default by-id lookup even if a custom entity lookup was defined but returned an empty result.
2018-07-12 22:36:56 +02:00
Oliver Gierke
429706a77e DATAREST-1260 - Tweaked DomainObjectReader to support immutable entities.
DomainObjectReader now aborts the recursive merges in case it encounters an entity that's described as @Immutable (just introduced in Spring Data Commons).

Fixed some generics and removed DomainObjectMerger as it's unused.

Related ticket: DATACMNS-1322.
2018-07-12 10:30:54 +02:00
Oliver Gierke
7323b950b6 DATAREST-1198 - Polishing.
Fixed @since tag in new converter implementation as we're going to backport the fix to Kay. Simplified converter setup in RepositoryRestMvcConfiguration to expose less API until someone actually requests access.

Original pull request: #290.
2018-06-13 10:14:44 +02:00
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
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
e6bcad0e70 DATAREST-1219 - Removed explicit declaration of Jackson library versions. 2018-03-27 19:45:24 +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
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
9c9d125d78 DATAREST-1177 - DefaultExposureAwareCrudMethods now caches results. 2018-01-24 11:06:25 +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
Oliver Gierke
6b61d2b026 DATAREST-1176 - Polishing.
Moved the flag to decide whether to expose repository methods by default to the RepositoryDetectionStrategy interface, so that it can be directly accessed and the test on the particular enum value is not needed anymore and thus also not duplicated into different parts of the codebase.

Added more tests to actually verify behavior on CrudMethodsSupportedHttpMethods. DefaultExposureAwareCrudMethods uses @RequiredArgumentConstructor again.
2018-01-18 18:41:07 +01:00
Tobias Weiß
5172f89281 DATAREST-1176 - Add explicitly method annotated detection strategy 2018-01-18 18:41:07 +01:00
Mark Paluch
5d9dbf1823 DATAREST-1170 - Update copyright years to 2018. 2018-01-09 08:44:14 +01:00
Oliver Gierke
1ebdeb9589 DATAREST-1163 - ValidationErrors now properly looks up null values.
The field value lookup in ValidationErrors previously threw a NotReadablePropertyException in case a property value was null as we incorrectly piped the null value into an Optional in turn. We now eagerly reject the property if we can't find a PersistentProperty in the metamodel to avoid this.
2017-11-29 10:28:26 +01: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
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
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