Commit Graph

1641 Commits

Author SHA1 Message Date
Oliver Gierke
8f988036e2 DATAREST-487 - Prepare 2.3.0.RC1 (Fowler RC1). 2015-03-05 19:18:07 +01:00
Oliver Gierke
791f6d057c DATAREST-487 - Updated changelog. 2015-03-05 15:54:43 +01:00
Oliver Gierke
b1ef67211f DATAREST-487 - Dependency upgrades in preparation of the release.
Upgraded to Spring HATEOAS 0.17.0.RELEASE, Spring Plugin 1.2.0.RELEASE as well as Evo Inflector 1.2.1.
2015-03-05 11:22:29 +01:00
Oliver Gierke
def74e6618 DATAREST-354 - General rewrite of the JSONSchema support.
Significant overhaul of the JSONSchema support. This currently adds the following features:

- Complex nested types are exposed as descriptors with the properties pointing to them whenever necessary.
- Sets are treated as unique collections.
- Enums are handled as expected (enum values are listed).
- Renamings via @JsonProperty are considered.
- @JsonProperty(required = true) is considered and added to required properties.
- Date/time types (legacy Date, JSR-310, ThreeTenBP and Joda Time) are exposed with format "date-time".
- Objects with @JsonValue methods are considered to be rendered as String value.
- Formats and patterns can be manually configured on MetadataConfiguration.

TODOs:

- Implementation polish, JavaDoc
- Automatically inspect ObjectMapper to detect customizations made through Mixins and custom Serializers.
2015-03-05 10:13:47 +01:00
Tom Crossland
ed5bde10e7 DATAREST-484 - Corrected a tiny spelling mistake in projections-excerpts.adoc.
Original pull request: #166.
2015-03-04 11:53:45 +01:00
Oliver Gierke
c532bb0d51 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:49:38 +01:00
Oliver Gierke
8cbd952d88 DATAREST-483 - Upgrade to JSONPath 0.9.1 and Spring HATEOAS 0.17.0 snapshots. 2015-03-02 17:41:02 +01:00
Greg Turnquist
ebbe77da5b 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:26 +01:00
Oliver Gierke
8b3b7bac98 DATAREST-482 - Added test cases for MongoDB association handling on PUTs.
Added a test case that verifies associations to stay intact if someone updates the item resource using a PUT. Added a second test case that shows PUTting an empty String with media type text/uri-list results in the associations wiped.
2015-02-26 11:48:08 +01:00
Greg Turnquist
7d13c447fe DATAREST-451 - Add projection and excerpt to reference documentation.
Original pull request: #163.
2015-02-25 17:19:01 +01:00
Greg Turnquist
d6595970e3 DATAREST-452 - Add ALPS metadata to reference documentation.
Original pull request: #164.
2015-02-25 15:45:34 +01:00
Oliver Gierke
0a542564bc 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:23:46 +01:00
Greg Turnquist
8d47fab92c 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:21:24 +01:00
Oliver Gierke
98fd079b21 DATAREST-469 - Added dedicated resource type for search links.
RepositorySearchController now returns a RepositorySearchesResources so that users can implement a custom ResourceProcessor to augment the list of links exposed for Spring Data repository query methods.
2015-02-09 10:52:37 +01:00
Oliver Gierke
ec2bd0145d DATAREST-471 - Populate Last-Modified headers from auditing information.
We now populate the Last-Modified header for requests to the item resource and search resource invocations that return a single item.
2015-02-04 21:03:57 +01:00
Oliver Gierke
14cee9c94f DATAREST-467 - RepositoryEntityLinks now exposes methods to create links to search resources.
RepositoryEntityLinks now exposes methods to obtain links to all search resources and individual ones, including overloads to pre-expand Pageable and Sort parameters potentially contained in the method signature.

Search links now also contain a projection template variable if the type returned by the query method backing the search resource has projections registered.
2015-01-30 20:46:03 +01:00
Oliver Gierke
7d9db83e97 DATAREST-459 - Updated changelog. 2015-01-28 20:55:57 +01:00
Oliver Gierke
349979a321 DATAREST-458 - Updated changelog. 2015-01-28 10:16:46 +01:00
Oliver Gierke
ec6ee8e291 DATAREST-470 - Moved to EclipseLink JPA API JAR instead of Hibernate. 2015-01-27 22:21:30 +01:00
Oliver Gierke
3eb0691d95 DATAREST-468 - Added patch media types to documentation section of item resources. 2015-01-27 08:31:26 +01:00
Oliver Gierke
fbd803f32a DATAREST-414 - Added retry logic to connect to embedded Cassandra.
The Cassandra tests sometimes cannot to the embedded instance on the CI server. Added a triple retry with a delay of 200ms to work around a potentially slow Cassandra bootstrap.
2015-01-21 15:24:13 +01:00
Oliver Gierke
c67b3e749d 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:44:48 +01:00
Oliver Gierke
1755a82fe2 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:21 +01:00
Neeme Praks
f755987a02 DATAREST-457 - Fixed typo in JavaDoc of BaseUri.
Original pull request: #159.
2015-01-20 08:00:50 +01:00
Oliver Gierke
65f45d6433 DATAREST-448 - RepositoryRestHandlerMapping is now checking for a repository mapping again.
Re-introduced the accidentally removed checks that the resolved handler method actually points to a repository resource.
2015-01-16 14:43:21 +01:00
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