Commit Graph

516 Commits

Author SHA1 Message Date
Oliver Gierke
c3ffe7793b 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:38 +01:00
Oliver Gierke
8700c60cef 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:22:17 +01:00
Oliver Gierke
a2ba4224fb DATAREST-414 - Polishing.
Extracted groups of dependencies into auto-activated profiles to make more visible which dependencies belong to which store. Simplified dependency setup where possible.

General polishing in the test cases added.
2015-01-11 17:53:10 +01:00
Greg Turnquist
a31588cabc DATAREST-414 - Added integration tests for Cassandra.
Original pull request: #158.
2015-01-11 17:52:17 +01:00
Oliver Gierke
f09880ff16 DATAREST-437 - Moved to projections API of Spring Data Commons.
Related tickets: DATACMNS-630, DATACMNS-618.
2015-01-11 16:45:41 +01:00
Oliver Gierke
af745cfb37 DATAREST-436 - Removed obsolete examples and TCK module. 2015-01-09 16:39:02 +01:00
Oliver Gierke
368b36951a DATAREST-434 - Forward root exception in PersistentEntityResourceHandlerMethodArgumentResolver. 2015-01-08 10:54:38 +01:00
Oliver Gierke
e39d624832 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 13:55:07 +01:00
Oliver Gierke
ca8399316f DATAREST-431 - Switched to Formatters for Point and Distance of Spring Data Commons.
Dropped our Converter implementations for Point and Distance and rather use the ones provided through Spring Data Commons, the addFormatters(…) method of SpringDataWebConfiguration in particular.

Related ticket: DATACMNS-626.
2015-01-05 13:12:52 +01:00
Oliver Gierke
1c2201faa1 DATAREST-427 - Fixed NullPointerException in RepositoryRestExceptionHandler.
Handling HttpMessageNotReadableException in RepositoryRestExceptionHandler previously handed null to the badRequest(…) method resulting in an assertion failure in response(…) eventually. This is now fixed by handing in an HttpHeaders instance.
2015-01-05 12:17:35 +01:00
John K. Tims
e14bdad574 DATAREST-430 - Fixed typos in reference documentation.
Original pull request: #157.
2015-01-03 16:51:02 +01:00
Oliver Gierke
55cf4cd9e0 DATAREST-429 - Improved handling of custom base paths.
Introduced a new property basePath on RepositoryRestConfiguration to allow a smooth migration to a new non-absolute base path configuration model to customize the URIs under which repository resources are exposed.

We're deprecating the current baseUri property as it previously supported absolute URIs. These are still supported but a warning is logged to ping users to move to the new base path based configuration.

We now use the base path to dynamically augment the mappings detected on our controllers with the path configured.
2015-01-03 16:32:16 +01:00
Oliver Gierke
e2a35e7ce9 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:54 +01:00
Oliver Gierke
7c43512d1d 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:03:08 +01:00
Greg Turnquist
11d02e12bc DATAREST-387 - Separated integration tests for individual stores.
Original pull request: #156.
2014-12-07 15:55:33 +01:00
Christoph Strobl
38d1b81a4d DATAREST-387 - Added integration tests for Spring Data Solr repositories.
Added configuration for setting up an EmbeddedSolrServer instance within a temporary directory. We use a temporary test folder created by JUnit where we copy the required configuration to. The directory will also hold all index data and will be deleted afterwards.

Original pull request: #156.
2014-12-07 15:55:33 +01:00
Hendy Irawan
0347bda251 DATAREST-422 - Fixed broken link to reference documentation in README.
Original pull request: #153.
2014-12-05 15:29:37 +01:00
Oliver Gierke
28db79ef42 DATAREST-421 - Polishing of new exception handling infrastructure.
Removed leftovers from AbstractRepositoryRestController. Renamed GlobalExceptionHandler to RepositoryRestExceptionHandler and minimized visibility of exception handler methods. Restricted application of the exception handler to controllers in the Spring Data REST base package.

Relatted pull request: #155.
2014-12-05 10:27:00 +01:00
kakawait
e13be6badc DATAREST-421 - Extracted @ControllerAdvice class in order to allow easy overriding.
Original pull request: #155.
2014-12-05 10:26:56 +01:00
Oliver Gierke
7f990b006b DATAREST-388 - Improved annotation based event handling.
The annotation based event handling now relies on the type of the first method argument to determine the domain type the handler is interested in. Improved method invocation to not unnecessarily wrap exceptions thrown from them. Changed the test cases to throw a dedicated runtime exception to implicitly test that the 

Renamed LinkSaveEvent to LinkedEntityEvent as it's not only used for save-events for entities. Make use of Methods' USER_METHOD filter. Moved the class into the util package. Removed the UUID converter as Spring's DefaultFormattingConversionService provides it out of the box.

Added missing license headers and JavaDoc. Deprecated Class<?> attributes on handling annotations.

Related pull request: #151.
2014-12-04 20:25:20 +01:00
Oliver Gierke
e6a19a366d 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:05:48 +01:00
Oliver Gierke
42b906ca04 DATAREST-418 - After release cleanups. 2014-12-01 13:46:35 +01:00
Spring Buildmaster
7f4c97bf0a DATAREST-418 - Prepare next development iteration. 2014-12-01 04:29:46 -08:00
Spring Buildmaster
aa30ac65ec DATAREST-418 - Release version 2.3.0.M1. 2014-12-01 04:29:44 -08:00
Oliver Gierke
5e1a1e6711 DATAREST-418 - Prepare 2.3.0.M1 (Fowler M1). 2014-12-01 13:08:51 +01:00
Oliver Gierke
c4e978cd55 DATAREST-418 - Updated changelog. 2014-12-01 11:33:24 +01:00
Oliver Gierke
a32d1867b4 DATAREST-160 - Polished support for ETag headers based on version properties.
Introduced a dedicated value object for ETags and moved the logic of ETagValidator into it. Switched from an annotation based injection model to a type based one.

The HTTP status code for a non-matching ETag is now 412 Precondition failed as the HTTP specification suggests.

Original pull request: #148.
2014-11-28 22:23:59 +01:00
Pablo Lozano
8fe634cb0d DATAREST-160 - Added support for ETag/If-Match based on entity's version property.
Original pull request: #148.
2014-11-28 22:23:59 +01:00
Oliver Gierke
2e03e8397e DATAREST-401 - Updated changelog. 2014-11-28 12:23:15 +01:00
Oliver Gierke
4b6e5bffc3 DATAREST-417 - Adapt to type reorganization in Spring Data Commons. 2014-11-25 11:37:56 +01:00
Oliver Gierke
afd1027d36 DATAREST-416 - Switched to IdentifierAccessor API where needed.
We now use the newly introduced IdentifierAccessor API to make sure we benefit from store specific optimizations when looking up identifier values.

Added some user class lookups to make sure the projection and resource mapping lookup works if proxies types are handed around.
2014-11-24 13:25:43 +01:00
Oliver Gierke
780d674012 DATAREST-415 - Moved to PersistentPropertyAccessor API.
We now use the PersistentPropertyAccessor provided by the PersistentEntity to lookup property values to benefit from store-specific customizations. Code that relies on value conversion by using a ConversionService now explicitly uses a ConvertingPropertyAccessor.

Related tickets: DATACMNS-596.
2014-11-24 13:22:08 +01:00
Oliver Gierke
458cdfa7e8 DATAREST-409 - Port RepositoryInvoker API to Spring Data Commons.
Introduced SupportedHttpMethods abstraction to be able to test the exposure of HTTp methods based on a CrudMethods instance only. Moved ResourceType to the core module.
2014-11-14 16:49:31 +01:00
Oliver Gierke
dbeec0a5de 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:54:38 +01:00
Greg Turnquist
e304e14527 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:54:35 +01:00
Oliver Gierke
8504a8837c 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:30:53 +02:00
Oliver Gierke
0b5726ac41 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 11:56:39 +02:00
Oliver Gierke
08dd3c69d0 DATAREST-380 - Removed obsolete repository declaration. 2014-09-05 15:44:47 +02:00
Oliver Gierke
1e0e3f0ad4 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-09-05 15:44:47 +02:00
Oliver Gierke
40697a0e72 DATAREST-380 - After release cleanups. 2014-09-05 14:24:49 +02:00
Spring Buildmaster
648a50a2c1 DATAREST-380 - Prepare next development iteration. 2014-09-05 03:56:17 -07: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
Oliver Gierke
1b2f46f608 DATAREST-378 - Updated changelog. 2014-09-05 08:19:33 +02:00
Oliver Gierke
c84ab6ad44 DATAREST-374 - After release cleanups. 2014-08-13 16:33:21 +02:00
Spring Buildmaster
78ec4a8771 DATAREST-374 - Prepare next development iteration. 2014-08-13 07:27:55 -07:00
Spring Buildmaster
37a5300e87 DATAREST-374 - Release version 2.2.0.RC1 (Evans RC1). 2014-08-13 07:27:52 -07:00
Oliver Gierke
6250eabcd0 DATAREST-374 - Prepare 2.2.0.RC1 (Evans RC1). 2014-08-13 16:13:19 +02:00
Oliver Gierke
95b69967bb DATAREST-374 - Updated changelog. 2014-08-13 15:05:19 +02:00