Commit Graph

730 Commits

Author SHA1 Message Date
Oliver Gierke
2abbcd0cd9 DATAREST-901 - After release cleanups. 2016-09-29 09:13:36 +02:00
Mark Paluch
6cf4e50e98 DATAREST-909 - Revert Jackson-aware Sort and Pageable translation.
Revert changes introduced by DATAREST-883 - Jackson-aware field translation in Sort and DATAREST-906 - Consider default pageable if Sort is null. The way how Sort translation was implemented breaks Sort and Pageable argument resolution for custom controllers as a domain type is always required. Argument resolution fails if the related domain type cannot be resolved.

 Related pull requests: #231, #222.
2016-09-27 09:12:05 +02:00
Mark Paluch
b4210049d6 DATAREST-906 - Consider default Pageable even if Sort is empty.
We now resolve default configured Pageable without dropping them if their Sort is empty. Previously, any default Pageable was dropped if its Sort was empty which caused null being handed to controller methods of @RepositoryRestController instances.

Original pull request: #231.
2016-09-23 15:31:46 +02:00
Spring Buildmaster
1f89fc8fd1 DATAREST-901 - Prepare next development iteration. 2016-09-20 15:03:11 +00:00
Spring Buildmaster
3ada6c8823 DATAREST-901 - Release version 2.4.5.RELEASE. 2016-09-20 15:03:11 +00:00
Oliver Gierke
57172af59f DATAREST-901 - Prepare 2.4.5 (Gosling SR5). 2016-09-20 15:29:21 +02:00
Oliver Gierke
cb9d227576 DATAREST-901 - Updated changelog. 2016-09-20 15:29:13 +02:00
Oliver Gierke
99a78a00e9 DATAREST-842 - Updated changelog. 2016-09-20 11:50:44 +02:00
Oliver Gierke
2bed28842d DATAREST-902 - Fixed order depending DuplicateLinkListingTest.
We now use the explicit identifier of the person just created, not a fixed 1 as other tests might have used that identifier already and that entity is not available anymore as a transaction rollback occured in those tests.
2016-09-20 07:46:34 +02:00
Oliver Gierke
ec95f9e14f DATAREST-883 - Polishing.
Switched to use @RequiredArgsConstructor where possible. Slightly rearranged test cases. Inlined JacksonMappingAwareSortTranslator to not expose it as bean unless necessary. Use static Jackson BeanClassIntrospector to avoid unnecessary recreation.

Original pull request: #222.
2016-09-19 08:29:43 +02:00
Mark Paluch
c48050bfa1 DATAREST-883 - Consider Jackson field names in Sort mapping.
We now consider Jackson field names when resolving Sort arguments. Domain model properties annotated with @JsonProperty("sales") can be specified by their Jackson-mapped field name in sort arguments. Field names are mapped to their according persistent property names to be used in repository query method sorting. Unknown field names are silently dropped.

Original pull request: #222.
2016-09-19 08:15:38 +02:00
Oliver Gierke
129ea2a5e3 DATAREST-837 - DomainObjectMerger doesn't nullify read-only properties on PUT.
PUT requests are supposed to replace the state of the resource with the request payload. However, Spring Data REST already handles a couple of domain object propoerties in a special way as theri values map to dedicated HTTP features: identifiers (URIs), last-modified dates (header) etc.

For users, it might be worthwhile to exclude other properties from being set by applying the payload, like properties that are completely under the control of the server, e.g. creation user and date, last modifying user etc. So far, users didn't have any means to exclude those properties as the handling of PUT requests treated every missing property of the payload as null value.

DomainObjectMerger now checks whether a property is actually writable before applying the implicit null value. The application can be disabled by annotation a property with @ReadOnlyProperty.
2016-08-18 13:11:47 +02:00
Oliver Gierke
0cae0e5e70 DATAREST-863 - Adapt to changes in Accept header lookup in Spring 4.3.
Spring 4.3's HeaderContentNegotiationStrategy switched from looking up the Accept header via the method returning a single (potentially comma separated) one to the method returning multiple headers in the first place. We now added an override of HttpServletRequestWrapper.getHeaders(…) to out custom adapter defaulting the media type to make sure the defaulting is visible and thus the right handler methods are looked up.

That previously missing caused the DelegatingHandlerMapping selecting the redirect to the HAL browser in case a request to the API root was sent without an accept header as the defaulting of the header to application/hal+json wasn't properly exposed anymore and the redirect to the browser — declaring a produces clause of text/html — was not causing any media type mismatch anymore.
2016-08-04 21:15:33 -07:00
Oliver Gierke
f8806cc43a DATAREST-803 - Updated changelog. 2016-07-28 09:03:21 +02:00
Oliver Gierke
dbedcfff8c DATAREST-804 - Updated changelog. 2016-07-28 09:03:13 +02:00
Oliver Gierke
10436a0df7 DATAREST-847 - RepositoryEntityCotroller.saveAndReturn(…) now uses save result.
Previously we handed the original entity to the AfterSaveEvent. This should work in most cases but actually repositories are allowed to return a completely different instance so that we now hand over the instance returned by the repository interaction to avoid potentially occurring issues.
2016-07-01 14:45:24 +02:00
Oliver Gierke
954c49be89 DATAREST-815 - Tweaked HalBrowser controller implementation to consider proxied requests.
We now use the APIs in place in Spring MVC to make sure we create proper redirects for requests that carry proxy headers so that the redirect target is still going through the proxy.
2016-04-27 15:34:34 +02:00
Oliver Gierke
8d249b4b9c DATAREST-802 - Updated changelog. 2016-04-06 23:14:27 +02:00
Oliver Gierke
e8ad9b1541 DATAREST-790 - Updated changelog. 2016-04-06 18:44:38 +02:00
Massimo Mangoni
4d1d07f3e5 DATAREST-790 - Fixed typos in the reference documentation.
Original pull request: #203.
2016-04-06 13:26:31 +02:00
Oliver Gierke
29783fe23e DATAREST-720 - HAL Browser fragment now considers the context path if set.
Removed some obsolete Maven dependency versions along the way.
2016-04-01 13:00:09 +02:00
Oliver Gierke
877070a56f DATAREST-782 - Updated changelog. 2016-03-18 13:19:28 +01:00
Oliver Gierke
2557a2401a DATAREST-766 - After release cleanups. 2016-02-23 14:18:16 +01:00
Spring Buildmaster
8bb2143919 DATAREST-766 - Prepare next development iteration. 2016-02-23 05:26:21 -08:00
Spring Buildmaster
01661f9763 DATAREST-766 - Release version 2.4.4 (Gosling SR4). 2016-02-23 05:26:20 -08:00
Oliver Gierke
62ebf7ae72 DATAREST-766 - Prepare 2.4.4 (Gosling SR4). 2016-02-23 12:56:55 +01:00
Oliver Gierke
648d9cd8d5 DATAREST-766 - Updated changelog. 2016-02-23 12:56:47 +01:00
Oliver Gierke
685da6d4eb DATAREST-756 - Updated changelog. 2016-02-12 22:11:09 +01:00
Oliver Gierke
0995aea18b DATAREST-766 - Tweaked version properties for Gosling SR4. 2016-02-11 19:49:15 +01:00
Oliver Gierke
12d08bf159 DATAREST-754 - Polishing.
Upgraded to Groovy 2.4.4. Polished sample domain types and repositories. Removed obsolete format registration in test cases for schema creation. Keep inlined null checks to make sure the IDE doesn't create unnecessary can-be-null warnings.

Original pull request: #206.
2016-01-25 17:51:10 +01:00
Greg Turnquist
18cc22738c DATAREST-753 - Added support for Groovy-based domain objects.
Groovy-based objects inherit from GroovyObject. This brings along attributes that Spring Data REST may try to parse when generating metadata like JSON Schema. Also verify ALPS is supported.

We now exclude those artificial properties from being exposed in the schema as well as causing issues.

Original pull request: #206.
2016-01-25 17:51:10 +01:00
Oliver Gierke
3c411d1261 DATAREST-747 - ProjectionDefinitionConfiguration now returns the most concrete projection.
In case multiple projections are defined with a given name, we now return the projection defined for the most concrete type match.
2016-01-11 19:40:26 +01:00
Oliver Gierke
a8f271a67d DATAREST-743 - Made ProjectionResourceContentSerializer immutable.
ProjectionResourceContentSerializer.unwrappingSerializer(…) now returns a new unwrapping instance instead of mutating the current instance to prevent the source one from answering subsequent calls to isUnwrappingSerializer() with true.

This allows the source instance to be reused and produce reliable results on multiple serialization attempts.

Related tickets: DATAREST-716.
2016-01-07 21:46:38 +01:00
Oliver Gierke
a0a84c7959 DATAREST-731 - After release cleanups. 2015-12-18 10:26:34 +01:00
Spring Buildmaster
5b0110f2d0 DATAREST-731 - Prepare next development iteration. 2015-12-18 01:17:45 -08:00
Spring Buildmaster
3a495f9ce7 DATAREST-731 - Release version 2.4.2.RELEASE (Gosling SR2). 2015-12-18 01:17:44 -08:00
Oliver Gierke
f5b088d311 DATAREST-731 - Prepare 2.4.2.RELEASE (Gosling SR2). 2015-12-18 08:30:37 +01:00
Oliver Gierke
9d977a8c8c DATAREST-731 - Updated changelog. 2015-12-18 08:30:25 +01:00
Oliver Gierke
8c5bf9802f DATAREST-723 - PropertyMappings now get eagerly initialized.
Switched to eager initialization of PropertyMappings to avoid potential ConcurrentModificationException.
2015-12-16 16:02:23 +01:00
Oliver Gierke
5c1b731bfa DATAREST-729 - Removed relative reference to parent POM. 2015-12-13 16:21:15 +01:00
vtsukur
d449dd253d DATAREST-711 - Actualized examples with projection configuration and fixed typos.
Original pull request: #202.
2015-12-13 16:20:26 +01:00
Oliver Gierke
f7cff01d99 DATAREST-697 - Fixed unwrapping mode in ProjectionSerializer.
Projection serializer now only creates a nested JSON document if it's not in unwrapping mode. Switched to a completely immutable implementation as we were previously mutating state in the request for an unwrapping instance as we were assuming the instances not being reused.
2015-12-10 13:20:59 +01:00
Oliver Gierke
66f0a6d9f2 DATAREST-712 - Fixed Querydsl setup.
We accidentally backported the groupId of Querydsl 4 into the bugfix branch. This is now reverted back to the 3.x groupId.
2015-11-25 16:44:47 +01:00
Oliver Gierke
c5263eabf5 DATAREST-714 - Reference documentation now mentions RepositoryrestConfigurer instead of RepositorytestMvcConfiguration.
Fixed documentation on how to customize Spring Data REST by moving away from extending RepositoryRestMvcConfiguration to RepositoryRestConfigurer.
2015-11-25 14:46:08 +01:00
Oliver Gierke
937ef6d9af DATAREST-712 - Fixed application of Querydsl bindings to only kick in for collection resources.
The Querydsl integration in RootResourceInformationHandlerMethodArgumentResolver now only kicks in if the controller method parameter is annotated with @QuerydslPredicate. This allows us to apply the QuerydslBindings for collection resources but make sure they aren't accidentally applied during executions of query methods etc.

Improved the type lookup for query method execution to make sure the correct mapping is looked up for collection parameters.
2015-11-24 15:36:22 +01:00
Oliver Gierke
2d1fe6fe87 DATAREST-705 - DomainObjectReader now doesn't wipe identifier and version properties.
Identifier and version properties are handled in a special way by Spring Data REST (ids are derived from and exposed via the URI, versions make it into the ETag header) and are not contained in the response representation. That requires handling PUT request having to explicitly exclude them from being wiped to null so that the server side values are still preserved.
2015-11-20 16:53:25 +01:00
Oliver Gierke
515bee79fe DATAREST-707 - After release cleanups. 2015-11-19 12:34:06 +01:00
Spring Buildmaster
45a00b55ba DATAREST-707 - Prepare next development iteration. 2015-11-15 06:30:45 -08:00
Spring Buildmaster
89a39035f2 DATAREST-707 - Release version 2.4.1.RELEASE (Gosling SR1). 2015-11-15 06:30:43 -08:00
Oliver Gierke
6fb2a60d09 DATAREST-707 - Prepare 2.4.1.RELEASE (Gosling SR1). 2015-11-15 14:06:55 +01:00