Commit Graph

839 Commits

Author SHA1 Message Date
Mark Paluch
49605b2b1a DATAREST-1351 - URL Cleanup. 2019-06-05 11:30:39 +02:00
Oliver Drotbohm
3c635c3c81 DATAREST-1382 - Avoid to call BackendIdConverter if no id used for the request mapping.
Contrary to what's stated in the Javadoc of BackendIdConverter, BackendIdConverterHandlerMethodArgumentResolver now skips the invocation of ….fromRequestId(…) if no identifier path variable is found for the mapping of the method invoked.
2019-06-04 23:51:31 +02:00
Oliver Drotbohm
8b9ed0ca07 DATAREST-1381 - Polishing. 2019-06-04 23:51:31 +02:00
Oliver Drotbohm
d80070acb9 DATAREST-1381 - Improve documentation around @RepositoryRestController. 2019-06-04 23:51:31 +02:00
Oliver Drotbohm
928faa7f9a DATAREST-1383 - Polishing.
Avoid repeated lookups of PersistentPropertyAccessor in DomainObjectReader for PATCH requests. Formatting.
2019-05-28 17:37:33 +02:00
Oliver Drotbohm
28787116a6 DATAREST-1383 - PATCH requests now skip application of values for backend read-only properties.
MappedProperties now immediately drops non-writable properties when created for deserialization. Previously those properties would have to be annotated with @JsonProperty(access = Access.READ_ONLY) explicitly to avoid them being considered.
2019-05-28 17:37:33 +02:00
Mark Paluch
03c2ae02aa DATAREST-1366 - Prepare next development iteration. 2019-05-13 12:17:53 +02:00
Mark Paluch
d2abf3ccde DATAREST-1366 - Release version 3.2 M4 (Moore). 2019-05-13 11:59:50 +02:00
Oliver Drotbohm
82b928848b DATAREST-1373 - Upgrade to API changes in Spring HATEOAS 1.0 M2. 2019-05-08 19:49:58 +02:00
Christoph Strobl
b470f5239a DATAREST-1349 - Prepare next development iteration. 2019-04-11 12:00:20 +02:00
Christoph Strobl
d4659f1015 DATAREST-1349 - Release version 3.2 M3 (Moore). 2019-04-11 11:24:31 +02:00
Spring Operator
3a0cba94a2 DATAREST-1351 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 395 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0.html with 1 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0.html ([https](https://www.apache.org/licenses/LICENSE-2.0.html) result 200).

Original Pull Request: #352
2019-03-22 10:51:57 +01:00
Spring Operator
c40dab98a1 DATAREST-1351 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 13 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).
* http://www.springframework.org/schema/beans/spring-beans.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans.xsd ([https](https://www.springframework.org/schema/beans/spring-beans.xsd) result 200).
* http://www.springframework.org/schema/gemfire/spring-gemfire.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/gemfire/spring-gemfire.xsd ([https](https://www.springframework.org/schema/gemfire/spring-gemfire.xsd) result 200).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 26 occurrences
* http://www.springframework.org/schema/beans with 2 occurrences
* http://www.springframework.org/schema/gemfire with 2 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 14 occurrences

Original Pull Request: #329
2019-03-21 09:49:23 +01:00
Oliver Drotbohm
5f41d6664e DATAREST-1354 - Polishing. 2019-03-20 17:28:00 +01:00
Oliver Drotbohm
0900517e04 DATAREST-1354 - Avoid exceptions for missing enum value translations.
We now use a dedicated implementation of MessageSourceResolvable to avoid missing enum value translations actually causing exceptions. That also allows us to defer the calculation of the default (potentially translated in a default way).
2019-03-20 17:28:00 +01:00
Christoph Strobl
40bfd50b5d DATAREST-1318 - Prepare next development iteration. 2019-03-07 10:07:29 +01:00
Christoph Strobl
185566a54c DATAREST-1318 - Release version 3.2 M2 (Moore). 2019-03-07 09:42:22 +01:00
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
Jeroen Reijn
6d0acfd997 DATAREST-1143 - Prefer ResourceNotFoundException over ResponseEntity.notFound().
This is to allow users to plug in custom exception handling to control these situations.

Original pull request: #284.
2019-03-05 15:46:05 +01:00
Oliver Drotbohm
017b69c4e1 DATAREST-1338 - JsonPatch handling is now able to traverse maps.
We're now able to correctly identify Map keys within JsonPatch paths so that e.g. people/Dave/name properly translates into a people['Dave'].name SpEL expression.

Streamlined the design of SpelPath to avoid duplicate parsing and properly express the difference between typed and untyped paths in the type hierarchy. Slightly refactored the type hierarchy so that only methods that make sense in either untyped or typed state appear on the instance returned (getLeafType(Class) was exposed on TypedSpelPath before, which was confusing).
2019-03-05 13:54:58 +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
1bf08180db DATAREST-1341 - Adapt to package refactorings in Spring HATEOAS. 2019-02-27 20:31:59 +01:00
Oliver Drotbohm
85694576b2 DATAREST-1341 - Adapt RepositoryLinkBuilder to API changes in Spring HATEOAS.
Removed obsolete BaseUriLinkBuilder as well.
2019-02-22 18:33:50 +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
Oliver Drotbohm
a05d6a2a90 DATAREST-1332 - Polishing. 2019-02-07 20:55:42 +01:00
Oliver Drotbohm
e4c1625447 DATAREST-1332 - Fixed regression in CORS request handling.
The lookup of the RequestMappingInfo in exposeEffectiveLookupPathKey(…) yields null for CORS preflight requests to resources that do not support OPTIONAL explicitly. We now guard against that to avoid a subsequent NullPointerException.
2019-02-07 20:55:42 +01:00
Oliver Drotbohm
fa9b31c9af DATAREST-1321 - Lookup types can now produce non-String reference values.
Previously we assumed lookup types to always result in String based values. We now loosen that constraint to also allow other scalar types, mostly targeting numeric types like long and integer.
2019-01-08 11:47:45 +01:00
Mark Paluch
68bfd55982 DATAREST-1330 - Update copyright years to 2019. 2019-01-08 11:47:37 +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
Oliver Gierke
33c156dae0 DATAREST-1294 - Polishing.
Aligned with general request attribute naming conventions and prefixed the one we now use with the class' name. Altered the local attribute name to EFFECTIVE_REPOSITORY_RESOURCE_LOOKUP_PATH.

Renamed the constant holding the name from …_KEY to …_ATTRIBUTE.
2018-10-18 15:58:31 +02:00
Oliver Gierke
3f0eb17dcf DATAREST-1294 - Expose effective repository lookup path as request attribute.
We now expose a partially resolved PathPattern to contain the explicit repository base path so that the subpaths can be grouped around the individual repositories exposed.

Related ticket: spring-projects/spring-boot#14872
2018-10-18 12:17:12 +02: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
Oliver Gierke
88b73de3b7 DATAREST-1274 - JsonPatch paths now properly verify multi-digit indexes. 2018-08-08 08:44:43 +02:00
Oliver Gierke
5635479dd1 DATAREST-1248 - SortTranslator now considers read-only properties sortable.
MappedProperties now exposes a factory method that uses the Jackson introspector for serialization (instead of deserialization) which now also includes read-only properties. Previously, read-only ones were not considered as they are excluded from the metadata if it is looked up for deserialization.
2018-08-07 15:43:50 +02:00
Oliver Gierke
501ddda59f DATAREST-1273 - Properly support adding to collections via indexes in JsonPatch expressions.
We now support adding a to a collection via JsonPatch expressions by using the collection's size as target index. Contrary to paths pointing to existing collection elements we cannot determine the type of the object to be created. Thus, we fall back to the common element type of all existing collection elements. We also reject indexes pointing to elements with an index greater than the current collection's size.
2018-08-07 10:47:41 +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
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
c644eb979f DATAREST-1259 - Removed obsolete bean definition for HttpRequestHandlerAdapter. 2018-07-10 12:33:28 +02:00
Florian Lüdiger
10dedaefa3 DATAREST-810 - Fix minor typo in Javadoc.
Original pull request: #295.
2018-07-04 16:34:58 +02:00
Oliver Gierke
6ee2b1374a DATAREST-1256 - Upgraded to Spring HATEOAS 0.25.0.BUILD-SNAPSHOT.
Adapted RepositoryRestMvcConfiguration to now create a shared fallback ObjectMapper and avoid to register it as Spring Bean. Adapted test cases that previously were relying on such a bean being present.

Adapted test cases to verify on the correct ALPS document structure (see spring-projects/spring-hateoas#665).
2018-06-20 20:01:57 +02:00
Oliver Gierke
9f3443cde9 DATAREST-1251 - PersistentEntityProjector now uses lambdas instead of anonymous inner classes. 2018-06-13 14:44:10 +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