Commit Graph

522 Commits

Author SHA1 Message Date
Oliver Gierke
2de98cbfd6 DATAREST-498 - IncomingRequest now correctly evaluates parameterized media types.
IncomingRequest.isJsonPatchRequest()/….isJsonMergePatchRequest() previously did a hard equals comparison to the media type discovered in the request. This fails if the request's media type contains parameters (e.g. the charset).

We now rather use MediaType.isCompatibleWith(…) to compare the media types more leniently.

Renamed test case to match conventions so that the Maven build actually executes them.
2015-03-30 21:53:28 +02:00
Greg Turnquist
b104d5dd61 DATAREST-478 - Polished up bits of documentation.
Original pull request: #169.
2015-03-22 18:07:12 +01:00
Greg Turnquist
d36e342b56 DATAREST-453 - Added appendix linking to Spring Data examples.
Added a new section that lists Spring Data REST specific example projects.

Original pull request: #168.
2015-03-22 18:06:38 +01:00
Oliver Gierke
8414b290b9 DATAREST-491 - Fixed handling of non-entity maps in JSON processing.
During our custom JSON handling on PUT requests, we previously piped all JSON objects through code that expected that one to be mapped to a PersistentEntity. This fails for JSON objects that basically represent maps.

We now skip that code paths for non-entity properties.
2015-03-20 09:41:52 +01:00
Oliver Gierke
3b0e34e98a DATAREST-487 - Updated changelog. 2015-03-06 08:23:08 +01:00
Oliver Gierke
91dacf9484 DATAREST-485 - Fixed handling of empty requests for RepositoryPropertyReferenceController.createPropertyReference(…).
The test case introduced for DATAREST-482 failed when running against Spring 4.1 generation as the handling of empty request payload changed slightly in 4.1. We now explicitly use required = false to get null handed into the controller and manually default the Resources<Object> in it.

Related tickets: DATAREST-482, SPR-12778.
2015-03-03 09:51:47 +01:00
Greg Turnquist
0f4067a166 DATAREST-450 - Migrate wiki content to reference docs.
Scrubbed old format. Lightened up paging section and focus more on "next"/"prev" hypermedia controls and their benefit. Moved several sections under one top level section called "Customizing Spring Data REST". Cleaned up index.adoc to match the style of Spring Data JPA. Removed JSONP section.
Remove embedded entity operations, based on old spring-data-rest-compact media type. Utilized relative leveloffset for each include. Corrected some ALPS mistakes.

Original pull request: #162.
2015-02-27 10:13:12 +01:00
Greg Turnquist
1f482f17fb DATAREST-451 - Add projection and excerpt to reference documentation.
Original pull request: #163.
2015-02-25 17:20:25 +01:00
Greg Turnquist
632d60f7bc DATAREST-452 - Add ALPS metadata to reference documentation.
Original pull request: #164.
2015-02-25 15:45:47 +01:00
Oliver Gierke
8fba7dc6db DATAREST-463 - Polishing.
Collapsed if clauses leading to the very same return in RootResourceinformationToAlpsDescriptorConverter. Renamed isExportableProperty(…) to isExportable(…) in JacksonMetadata. Removed commented out code in AssociationLinks. Cleanups in test code.

Original pull request: #160.
2015-02-22 15:30:02 +01:00
Greg Turnquist
180d0ce3f4 DATAREST-463 - Hide ignored attributes from ALPS metadata.
If @JsonIgnore is applied to either a field or a getter method for an association, then do not expose that property's metadata down from ALPS.

Original pull request: #160.
2015-02-22 15:28:35 +01:00
Oliver Gierke
67e368e3c7 DATAREST-459 - After release cleanups. 2015-01-28 17:43:01 +01:00
Spring Buildmaster
2b6f96d149 DATAREST-459 - Prepare next development iteration. 2015-01-28 07:31:27 -08:00
Spring Buildmaster
fd7d3cf7d9 DATAREST-459 - Release version 2.2.2.RELEASE (Evans SR2). 2015-01-28 07:31:18 -08:00
Oliver Gierke
54fe5f1414 DATAREST-459 - Prepare 2.2.2.RELEASE (Evans SR2). 2015-01-28 12:09:28 +01:00
Oliver Gierke
9f2682150f DATAREST-459 - Updated changelog. 2015-01-28 11:24:09 +01:00
Oliver Gierke
b59e272ab2 DATAREST-458 - Updated changelog. 2015-01-28 10:16:21 +01:00
Oliver Gierke
2376f14b72 DATAREST-470 - Moved to EclipseLink JPA API JAR instead of Hibernate. 2015-01-27 22:22:29 +01:00
Oliver Gierke
64137658ba DATAREST-468 - Added patch media types to documentation section of item resources. 2015-01-27 08:31:36 +01:00
Oliver Gierke
cecdde96ca DATAREST-461 - Ignore unmapped properties when applying PUT requests.
We now make sure that unmapped properties (e.g. by using @JsonIgnore) are ignored when applying PUT request payloads. To do so we now basically use the merging algorithm used for PATCH requests but make sure we fill up the request payload with explicit null values for all mapped but not contained properties.
2015-01-21 14:51:16 +01:00
Oliver Gierke
93202f3696 DATAREST-460 - Polished RepositoryRestMvcConfiguration to fix CGLib proxying.
Made private methods that call @Bean methods protected so that they can become subject to CGLib proxying. Inlined getDefaultedRelProvider().
2015-01-20 10:39:41 +01:00
Oliver Gierke
0f2533885f DATAREST-418 - Updated changelog. 2015-01-20 08:08:14 +01:00
Neeme Praks
72f50e9f79 DATAREST-457 - Fixed typo in JavaDoc of BaseUri.
Original pull request: #159.
2015-01-20 08:00:37 +01:00
Oliver Gierke
527ac2903f DATAREST-446 - Removed RepositoriesUtils in favor of RepositoryMetadata.
To be sure to pick up domain type lookup customizations we now consistently use RepositoryMetadata instead of trying to be clever and re-detecting it via RepositoriesUtils.
2015-01-16 13:15:49 +01:00
Oliver Gierke
8f4c49bc16 DATAREST-445 - Fixed domain type lookup in RepositoryCollectionResourceMapping.
We now use the domain type provided by RepositoryMetadata instead of manually looking up to be sure to pick up customizations correctly.
2015-01-16 12:25:42 +01:00
Oliver Gierke
2ec11a9966 DATAREST-436 - Removed obsolete examples and TCK module. 2015-01-09 16:40:42 +01:00
Oliver Gierke
d248f60701 DATAREST-434 - Forward root exception in PersistentEntityResourceHandlerMethodArgumentResolver. 2015-01-08 10:54:54 +01:00
Oliver Gierke
a9199da896 DATAREST-427 - Refactorings in UriToEntityConverter.
Instead of using a DomainClassConverter directly we now use a raw ConversionService in UriToEntityConverter. This allos us to get rid off the bean definitions for UriToEntityConverter and DomainClassConverter. The population of the ConversionService is now taken care of by calling SpringDataWebConfiguration's addFormatter(…) in defaultConversionService().

Added unit tests for UriToEntityConverter.
2015-01-05 15:48:10 +01:00
John K. Tims
0476ae6712 DATAREST-430 - Fixed typos in reference documentation.
Original pull request: #157.
2015-01-03 16:51:12 +01:00
Oliver Gierke
4ba65a52a3 DATAREST-424 - Registered HttpMessageConverters now implement Ordered.
To be able to control the order of the HttpMessageConverter beans registered by RepositoryRestMvcConfiguration we now use a dedicated subtype of TypeConstrainedMappingJackson2HttpMessageConverter which additionally implements Ordered.
2014-12-10 19:47:02 +01:00
Oliver Gierke
11668b3439 DATAREST-423 - Fixed HandlerAdapterSetup to consider ConversionService.
The special RepositoryRestHandlerAdapter we set up for repository invocations didn't consider the ConversionService Spring Data REST sets up. This causes binding issues in case someone wants to override resource handling by declaring an @RepositoryRestController and using a domain type as handler method argument.

We now explicitly configure the RepositoryRestHandlerAdapter to use the ConversionService we set up and equip with Spring Data Commons' DomainClassConverter.
2014-12-09 13:15:21 +01:00
Hendy Irawan
51cce29e8c DATAREST-422 - Fixed broken link to reference documentation in README.
Original pull request: #153.
2014-12-05 15:30:15 +01:00
Oliver Gierke
58e748f141 DATAREST-388 - Improved annotation based event handling.
We're now using ReflectionUtils.invokeMethod(…) to avoid the exceptions being thrown from reflectively-invoked event handler methods to be wrapped in IllegalStateExceptions.

Related pull request: #151.
2014-12-04 19:11:24 +01:00
Oliver Gierke
c9795664b8 DATAREST-394, DATAREST-408 - Projections now consider collections and maps.
The ProjectingMethodInterceptor now inspects collections and maps to apply projections to collection elements and map values. Test cases inspired by a contribution of Saulo Medeiros de Araujo.

Related pull request: #152.
2014-12-01 19:04:29 +01:00
Oliver Gierke
47622630a3 DATAREST-227 - Renamed WebTestUtils to TestMvcClient.
Renmaed WebTestUtils to TestMvcClient, added assertions to constructor and fixed formatting of JavaDoc.

Original pull request: #149.
2014-11-10 16:56:48 +01:00
Greg Turnquist
3cba04d9b0 DATAREST-227 - Broke up AbstractWebIntegrationTest and its subclasses.
Decouple the test machinery of this class from the barrage of common test cases used against the various data stores. This way, other test suites that use the same integration approach don't have to be a part of this class hierarchy. Also move utilities and assertion methods into separate utility classes to slim down the class hierarchy.

Original pull request: #149.
2014-11-10 16:56:41 +01:00
Oliver Gierke
0b8a186271 DATAREST-401 - After release cleanups. 2014-10-31 21:34:47 +01:00
Spring Buildmaster
942bb63c19 DATAREST-401 - Prepare next development iteration. 2014-10-31 13:27:03 -07:00
Spring Buildmaster
050b3140ba DATAREST-401 - Release version 2.2.1.RELEASE. 2014-10-31 13:26:59 -07:00
Oliver Gierke
bd71fb930e DATAREST-401 - Prepare 2.2.1.RELEASE (Evans SR1). 2014-10-31 21:04:15 +01:00
Oliver Gierke
e2644a0bcf DATAREST-401 - Updated changelog. 2014-10-30 11:57:45 +01:00
Oliver Gierke
f51c0154ee DATAREST-381 - Improved HandlerMapping infrastructure to make sure controllers consider base URI.
Removed class-level @RequestMapping annotations as the controllers get picked up by standard Spring MVC and are exposed via the root even if a base URI is configured. Created custom @BaseUriAwareController and use that in AlpsController to make sure it doesn't get picked up by Spring MVC.
2014-10-21 22:12:09 +02:00
Oliver Gierke
7812587931 DATAREST-384 - Fixed affordances and execution of sortable search resources.
Search resources are now considered sortable if they contain a Sort parameter. This is now reflected in MethodResourceMapping.isSortableResource().

Building on top of that, the RepositorySearchController now appends the sort template variable to links generated when listing search resources. It also now accepts resolved Sort instances to forward them to the query method execution. The controller now also uses DefaultedPageable so that request missing pagination information use the defaults configured for the PageableHandlerMethodArgumentResolver.
2014-10-15 13:32:32 +02:00
Oliver Gierke
12abae17e9 DATAREST-380 - Remove obsolete repository declaration. 2014-10-15 12:23:48 +02:00
Oliver Gierke
32bda65bcf DATAREST-385 - Projection definition configurations are now detected for super types.
Projections defined for a parent type are now also available for sub-types.
2014-10-15 12:21:55 +02:00
Oliver Gierke
73526e9158 DATAREST-380 - After release cleanups. 2014-09-05 14:25:31 +02:00
Spring Buildmaster
0190789486 DATAREST-380 - Prepare next development iteration. 2014-09-05 14:22:10 +02:00
Spring Buildmaster
31b689a566 DATAREST-380 - Release version 2.2.0.RELEASE (Evans GA). 2014-09-05 03:56:15 -07:00
Oliver Gierke
e4942c74ff DATAREST-380 - Prepare 2.2.0.RELEASE (Evans GA). 2014-09-05 12:49:12 +02:00
Oliver Gierke
5169b6a0d1 DATAREST-380 - Updated changelog. 2014-09-05 09:23:52 +02:00