Commit Graph

1641 Commits

Author SHA1 Message Date
Spring Buildmaster
1d7e7f4ea4 DATAREST-634 - Prepare next development iteration. 2015-08-04 05:06:47 -07:00
Spring Buildmaster
402d7c9382 DATAREST-634 - Release version 2.4.0.RC1 (Gosling RC1). 2015-08-04 05:06:44 -07:00
Oliver Gierke
fc85586384 DATAREST-634 - Prepare 2.4.0.RC1 (Gosling RC1). 2015-08-04 13:12:25 +02:00
Oliver Gierke
4cedd71de7 DATAREST-634 - Updated changelog. 2015-08-04 13:12:25 +02:00
Oliver Gierke
4e40bb456a DATAREST-634 - Upgraded to Spring HATEOAS 0.18.0.
Upgraded to Hibernate 4.3.10 along the way.
2015-08-04 13:11:03 +02:00
Oliver Gierke
f17bd13c73 DATAREST-616 - Initial support to execute Querydsl predicates.
If Querydsl is on the classpath and the repository exposed implements QuerydslPredicateExecutor, we now register a component that customizes the RepositoryInvoker to route repository interactions for collection resource calls to the QuerydslPredicateExecutor.

The invocation gets enriched with a Predicate obtained from the request data. Bindings can be customized through the QuerydslBinderCustomizer interface implemented in a default method on the repository.

Tweaked the build to generate Querydsl meta-model classes for the MongoDB domain types.
2015-08-04 10:19:07 +02:00
Greg Turnquist
2244a2c588 DATAREST-632 - Fixed gap in JSON Schema unit tests.
Consolidated constraint tests for JSON Schema test for User and Profile.

Original pull request: #192.
2015-08-04 02:02:25 +02:00
Greg Turnquist
5dac9eac0c DATAREST-624 - Added reference documentations for Spring Data REST HAL Browser.
Original pull request: #193.
2015-08-04 01:57:53 +02:00
Oliver Gierke
4e0d0e4df1 DATAREST-631 - Polishing.
Moved just introduced test case into PersistentEntityToJsonSchemaConverterUnitTests. Added ticket reference. Removed obsolete test case.

Original pull request: #190.
2015-07-31 16:07:25 +02:00
Greg Turnquist
45d1e4d9f4 DATAREST-631 - Expose id attributes with JSON Schema metadata if configured.
The JSON Schema we expose now considers the owning type for configuration to expose the identifier. Previously, we erroneously checked the property type.

Original pull request: #190.
2015-07-31 16:07:25 +02:00
Oliver Gierke
ec0590ff51 DATAREST-630 - Polishing.
Simplified implementation change. Integrated new test case into the existing one. Cleaned up existing test case to always use TestMvcClient.

Original pull request: #189.
2015-07-31 14:45:24 +02:00
Greg Turnquist
b359aba77a DATAREST-630 - ALPS metadata now only exposes identifier property if explicitly configured to.
The ALPS metadata exposed now considers the id exposure configuration to decide whether to skip the identifier property or not.

Original pull request: #189.
2015-07-31 14:45:24 +02:00
Oliver Gierke
dee22d2726 DATAREST-628 - Updated changelog. 2015-07-28 16:46:16 +02:00
Fabian Trampusch
f180a3ef1a DATAREST-619 - Fixed HTTP method mentioned in Javadoc of RepositoryEntityController.patchItemResource(…).
Previously the Javadoc for said method mentioned PUT as the mapped HTTP method while it's actually PATCH.

Original pull request: #188.
2015-07-27 16:05:27 +02:00
Oliver Gierke
5b0b368353 DATAREST-625 - Removed references to BeanWrapper.
DomainObjectMerger is now using the PersistentPropertyAccessor API instead of the BeanWrapper.

Related ticket: DATACMNS-738.
2015-07-22 21:09:56 +02:00
Oliver Gierke
3ac3c0b828 DATAREST-605 - Fixed processing of Maps in DomainObjectReader.
We now post-process Map values recursively to make sure they get merged correctly if they're complex objects in turn.

Improved the exception message for invalid payloads for JSON Patch requests to indicate the expected payload as the root Jackson exception does not contain any hints to what's actually expected.
2015-07-22 17:46:01 +02:00
Oliver Gierke
12121f842e DATAREST-621 - Introduced RepositoryRestConfigurer for less invasive customization of Spring Data REST.
We now expose a RepositoryRestConfigurer interface that carries all configure… methods that exist on RepositoryRestMvcConfiguration. The latter are deprecated as of now in favor of implementing and declaring a RepositoryRestConfigurer bean (or extending RepositoryRestConfigurerAdapter for convenience).

Moved extensions of RepositoryRestMvcConfiguration to RepositoryRestConfigurerAdapter where possible.
2015-07-21 17:42:11 +02:00
Oliver Gierke
1e9e3f5635 DATAREST-622 - Removed unnecessary wrapping of embeddeds.
We now use a plain collection of EmbeddedWrapper instead of a Resources to avoid the links contained in the Resources to potentially cause issues on rendering.
2015-07-21 11:42:14 +02:00
Oliver Gierke
de5a98d47b DATAREST-606 - Polishing.
Moved the accessibility tweak to the EventHandlerMethod's constructor so that the modification only occurs at detection time. Polished unit test.

Original pull request: #187.
2015-07-19 12:53:47 +02:00
Fabian Trampusch
698643cf18 DATAREST-606 - Allow non-public @RepositoryEventHandler methods.
AnnotatedEventHandlerInvoker now makes sure the method about to be invoked is accessible.

Original pull request: #187.
2015-07-19 12:52:34 +02:00
Oliver Gierke
14db3d5f63 DATAREST-617 - Fixed content negotiation for requests with Accept: application/*+json.
We now tweak the ProducesRequestConditions for repository controllers to implicitly declare a produces clause of application/*+json to make sure the more concrete produces declarations on methods creating the compact representation are only used as fallbacks.
2015-07-16 14:16:48 +02:00
Oliver Gierke
f30c0f17b4 DATAREST-377 - UriStringDeserializer now falls back to null in case of an empty or null source.
UriStringDeserializer now explicitly checks the source JSON value to be null or empty and returns null right away. Previously it handed the value to UriTemplate without any further validation which caused assertion errors in case of an empty or null source.

We now also explicitly catch the IllegalArgumentException thrown from the UriTemplate to make sure that any failure creating a URI (usually from piping a JSON object into the serializer where a URI is expected) is rejected with an appropriate error message.
2015-07-13 08:31:32 +02:00
Antoine Vandecreme
f368be8b68 DATAREST-539 - Log exception even if it has no message. 2015-07-09 18:55:57 +02:00
Cedric Ziel
22b2984ce6 DATAREST-596 - Add missing letter to MVC configuration import example 2015-07-09 18:50:50 +02:00
Oliver Gierke
bd0483f5e6 DATAREST-597 - Improved AlpsJsonHttpMessageConverter for Spring 4.2 compatibility.
AlpsJsonHttpMessageConverter now implements ResponseBodyAdvice to apply the potentially necessary conversion from RootResourceInformation to Alps to make sure we also get it applied on latest Spring 4.2 snapshots that invoke a newly introduced method to handle generic types in Jackson marshaling.
2015-07-09 17:58:38 +02:00
Oliver Gierke
f8c7a1c376 DATAREST-609 - Removed server-side template expansion for incoming URI mapping.
Previously we leniently expanded incoming URIs prior to mapping them to controllers. As the original ticket describes, this can cause security issues in rather lenient security setups as the call might bypass a simple security rule but then eventually map to a URI mapped to a stricter security rule.

Made sure that self links now return canonical URIs instead of templates. To still advertise projections, PersistentEntityResourceAssembler now adds an additional link to the canonical resource to resources that contains the unexpanded template.

Switched from requiring a Repositories instance to PersistentEntities on the way.

Related tickets: DATAREST-267, DATAREST-268, DATAREST-300, DATAREST-318, SEC-3027.
2015-07-06 17:23:35 +02:00
Oliver Gierke
be8964c465 DATAREST-582 - Fixed potential double invocation of annotated event handlers.
AnnotatedEventHandlerInvoker now uses the user class to detect handler methods on to make sure we don't accidentally find CGLib generated methods and thus invoke the handler multiple times later on.

Extended MethodFilter Methods.USER_METHODS to filter methods on CGLib proxy classes, too.

Added missing license header and Javadocs where necessary.
2015-07-06 12:30:05 +02:00
Oliver Gierke
906d76a196 DATAREST-601 - Updated changelog. 2015-07-01 10:08:43 +02:00
Oliver Gierke
06b5a65de4 DATAREST-602 - Updated changelog. 2015-07-01 07:52:56 +02:00
Oliver Gierke
6cf9326c1d DATAREST-603 - Updated changelog. 2015-06-30 14:33:24 +02:00
Oliver Gierke
b5c95ae3d6 DATAREST-454 - Polishing.
Improved example headers to not expose we're referring to test code. Used inline code instead of bold for technical terms (HTTP methods, HTML attributes etc.).

Original pull request: #184.
2015-06-25 11:48:22 +02:00
Greg Turnquist
70f35cd314 DATAREST-454 - Document conditional operations.
Added documentation of ETag and Last-Modified header handling with Spring Data managed domain types.

Original pull request: #184.
2015-06-25 09:54:08 +02:00
Oliver Gierke
7f1799832d DATAREST-327 - Polishing.
Moved Spring Security specific dependencies to a dedicated profile in pom.xml. JavaDoc polishing. Removed assertions on the response message.

Original pull request: #171.
2015-06-23 18:11:12 +02:00
Greg Turnquist
ea8baf642b DATAREST-397 - Added integration tests to verify Spring Data REST working with Spring Security.
Added integration tests to verify Spring Data REST works with Spring Security as expected. Added method level security to sample repositories and verified HTTP responses to consider those.

Added some words on security configuration in the reference documentation. This is also demonstrated by some canonical samples found in [0].

Original pull request: #171.

[0] https://github.com/spring-projects/spring-data-examples/issues/21
2015-06-23 18:11:12 +02:00
Oliver Gierke
5346215d47 DATAREST-588 - Upgraded to Spring HATEOAS 0.18.0 to benefit from downstream fix. 2015-06-19 16:56:55 +02:00
Oliver Gierke
84aaa063b4 DATAREST-585 - Improvements in SpelAwareProxyProjectionFactory setup.
We now forward the ApplicationContext as ResourceLoader into the SpelAwareProxyProjectionFactory to make sure we use the correct class loader in a Spring Boot Dev Tools environment.
2015-06-19 13:19:07 +02:00
Oliver Gierke
e4cf6d9f23 DATAREST-584 - Polished dependency setup to mitigate differing dependency versions.
Declare Commons IO explicitly to make sure we use a version matching both Neo4j and Solr. Using guava property from Spring Data Build now.
2015-06-19 12:43:47 +02:00
Oliver Gierke
abd85f9e8a DATAREST-581 - Fixed ETag calculation for projected item resources.
Instead of using the PersistentEntityResource to obtain the ETag we now calculate headers based on the domain object and PersistentEntity upfront. This prevents the failure of trying to read the ETag from a potentially projected proxy.
2015-06-18 19:05:55 +02:00
Oliver Gierke
6831e18cde DATAREST-583 - RepositoryRestMvcConfiguration now forwards Environment and ResourceLoader to AnnotatedTypeScanner. 2015-06-18 17:53:01 +02:00
Oliver Gierke
7bcf34ce15 DATAREST-565 - HalBrowser controller now uses context-relative redirects. 2015-06-16 15:28:56 +02:00
Oliver Gierke
290c1886f0 DATAREST-577 - Excerpt projections are now configured automatically.
Excerpt projections defined in @RepositoryRestResource had to be discoverable (i.e. located in a sub-package of the domain type). RepositoryRestMvcConfiguration now uses an newly introduced constructor of ProjectionDefinitionConfiguration that automatically registers all projects in the given ResourceMappings.
2015-06-16 15:24:31 +02:00
Greg Turnquist
ad75c3cc8e DATAREST-508 - Added details about finding projection definitions.
Original pull request: #176.
2015-06-13 18:06:52 +02:00
Greg Turnquist
3e2b4f1994 DATAREST-576 - Remove old Markdown docs 2015-06-13 18:06:51 +02:00
Oliver Gierke
d90cbb29b3 DATAREST-563 - After release cleanups. 2015-06-02 12:03:28 +02:00
Spring Buildmaster
42fc85afdc DATAREST-563 - Prepare next development iteration. 2015-06-02 01:58:14 -07:00
Spring Buildmaster
0604e7b876 DATAREST-563 - Release version 2.4.0 M1 (Gosling). 2015-06-02 01:58:12 -07:00
Oliver Gierke
471f0c17e5 DATAREST-563 - Prepare 2.4.0.M1 (Gosling M1). 2015-06-02 10:47:05 +02:00
Oliver Gierke
f941b9ee18 DATAREST-563 - Updated changelog. 2015-06-02 08:25:06 +02:00
Greg Turnquist
394319f54b DATAREST-535 - Add documentation about overriding SDR handlers 2015-06-01 14:44:52 +02:00
Greg Turnquist
97952d1a6f DATAREST-550 - Specify more details about excerpts and projections
* Point out that excerpts are ONLY applied to collections.
* How projections can be found via annotation or manually registered
2015-06-01 14:32:17 +02:00