Commit Graph

333 Commits

Author SHA1 Message Date
Oliver Gierke
2b38352795 Added special MappingJackson2HttpMessageConverter to log exceptions causing can(De)Serialize(…) to fail. 2013-12-28 19:10:23 +01:00
Oliver Gierke
8c13ee3b7e DATAREST-203 - Added test cases to show POSTs are generally working.
Some polishing in PersistentEntityResourceArgumentResolver.
2013-12-28 18:04:46 +01:00
Oliver Gierke
c953e6f54d DATAREST-203 - Fixed accidentally broken RepositorySearchController.
Due to the change in the default media type, the RepositorySearchController was totally broken as it used "produces" clauses in the request mapping. I've removed them and added test cases to make sure the search resources are exposed and are accessible.
2013-12-28 16:06:31 +01:00
Oliver Gierke
f641398465 DATAREST-213 - Make sure legacy representation can be activated.
Altered the order of HttpMessageConvertersRegistered based on the default media type being defined. This causes the legacy representation to be rendered as default representation if the default media type on RepositoryRestConfiguration is set to something different from HAL.
2013-12-28 15:48:58 +01:00
Oliver Gierke
110af70de3 DATAREST-210 - Added workaround for SPR-11251.
We're now using @EnableHypermediaSupport via a delegated class to prevent @EnableHypermediaSupport from breaking when RepositoryRestMvcConfiguration is subclassed.
2013-12-20 20:01:17 +01:00
Oliver Gierke
5584040e92 DATAREST-93 - Removed Gradle wrapper script customizations. 2013-12-19 17:04:36 +01:00
Oliver Gierke
204d2870e7 DATAREST-209 - Removed hard dependency on Jackson Hibernate 4 module.
The build script now declares the Jackson Hibernate 4 as optional dependency to avoid being registered in a non-Hibernate environment. Tightened auto-registration checks to also check for Hibernate 4 presence at all.

We automatically activate verbose date rendering when registering the Joda Time module.
2013-12-19 16:31:46 +01:00
Oliver Gierke
af520871dc DATAREST-203, DATAREST-75 - Initial support for HAL.
This commit introduces support for HAL rendering and making it the default rendering option. The configuration now registers an additional MappingJackson2HttpMessageConverter with the according HAL modules registered and makes this the default JSON renderer if the default media type is configured to HAL (which it is by default). To change this, set RepositoryRestConfiguration.setDefaultMediaType(…) back to application/json.

Refactored the PersistentEntityJackson2Module to turn the PersistentEntityResource into it's correct shape (turning associations into links) and the delegate to the default rendering, so that the HAL customizations provided by Spring HATEOAS can kick in. Adapted test cases to the change in default representation format.


Upgraded to Jackson 2.3.0, Spring 3.2.6 and Spring HATEOAS 0.9.0.BUILD-SNAPSHOT. Upgraded to Gradle 1.10.
2013-12-19 16:31:29 +01:00
Oliver Gierke
44420d862c DATAREST-199 - Tweaked unmarshalling of JSON payloads.
The BeanWrapper used to set and get values of entities now gets a autowired ConversionService applied. Simplified collection and map creation by using Spring API. Added test case to update an entity with an embedded collection.
2013-12-05 07:43:11 +01:00
Oliver Gierke
0667e0bfb2 DATAREST-200 - Embedded associations get rendered again.
Removed too strong guard that prevented managed but not-exported types to be rendered at all.
2013-12-04 21:41:57 +01:00
Spring Buildmaster
73a2fd7430 DATAREST-193 - Prepare next development iteration. 2013-11-21 06:10:13 -08:00
Spring Buildmaster
8fe3452065 DATAREST-193 - Release version 2.0 M1. 2013-11-21 06:10:11 -08:00
Oliver Gierke
ac799cff43 DATAREST-193 - Prepare 2.0 M1 release.
Updated changelog. Upgraded to milestone dependencies of Codd.
2013-11-21 14:59:07 +01:00
Oliver Gierke
a9862eb7c5 DATAREST-185 - Upgraded Spring Data dependencies.
Upgraded to Spring Data Neo4j 3.0 and Spring Data Gemfire 1.4 snapshots.
2013-11-18 18:42:09 +01:00
Oliver Gierke
4ee1850a37 DATAREST-93 - Improvements after API updates in Spring Data Commons.
Switched to the usage of Simple(Property|Association)Handler to avoid having to use raw PersistentProperty instances.
2013-11-14 10:04:28 +00:00
Oliver Gierke
8f2e3eb4fe DATAREST-163 - Fixed rendering of embedded documents for MongoDB.
Removed the attempt to add a link to the response for non-associations. Switched to the usage of Simple(Property|Association)Handlers for simplified generics.
2013-11-14 10:04:28 +00:00
Oliver Gierke
f965363650 DATAREST-93 - Upgraded to Gradle wrapper 1.8. 2013-11-14 10:04:28 +00:00
Oliver Gierke
8e29f9bcff DATAREST-184 - Upgraded to Spring Data Neo4j 2.3.3.
The upgrade is necessary to benefit from a fix for DATAGRAPH-409 which transitively fixes this ticket.

Added integration tests for Neo4j repositories.
2013-11-14 10:04:28 +00:00
Oliver Gierke
9b4b111d23 DATAREST-93 - Cleanups in repository invoker area.
Made RepositoryInvokerFactory an interface and renamed the previously existing implementation class to DefaultRepositoryInvokerFactory. Removed instantiation of the class from ResourceMetadataHandlerMethodArgumentResolver to keep the logic which implementation to use solely in the configuration.
2013-11-14 10:03:48 +00:00
Oliver Gierke
cb4770db56 DATAREST-162 - PersistentPropertyResourceMapping now considers @RestResource.
PersistentPropertyResourceMapping now inspects the @RestResource annotation on the property if it is present.
2013-11-14 10:03:48 +00:00
Oliver Gierke
f75ad4d266 DATAREST-185 - Upgraded to Spring 3.2.5. 2013-11-14 10:03:48 +00:00
Greg Turnquist
1de47e06ef Merge pull request #122 from dannyarcher/master
Changed Neo4J version. Thanks @dannyarcher!
2013-11-08 17:11:51 -08:00
Danny Archer
92a3036d3c Changed Neo4J version
- Changed Neo4J 2.4.0 to 2.3.2 to allow download and build due to 401 when
      trying to fetch Neo4J
2013-11-03 23:14:10 +11:00
Oliver Gierke
a6b5c1ec46 DATAREST-113 - Fixed glitches in JSON schema creation.
PersistentEntityToJsonSchemaConverter looks up the ResourceMetadata correctly and builds up URIs in a proper way.
2013-10-01 18:24:32 +02:00
Oliver Gierke
6260d3fba9 DATAREST-93 - Code cleanups.
Added missing license header. Polished code in RepositoryEntityController.
2013-10-01 17:41:50 +02:00
Oliver Gierke
282132994b DATAREST-93 - Upgraded to latest Spring 3.2.4. 2013-10-01 17:41:49 +02:00
Oliver Gierke
ba0c7be7df DATAREST-169 - Added integration test to access property. 2013-10-01 17:41:49 +02:00
Oliver Gierke
13bd9cfda2 DATAREST-170 - Upgraded to snapshot dependencies of Spring Data modules. 2013-10-01 17:41:49 +02:00
Oliver Gierke
b29ac22601 DATAREST-93 - Upgraded to latest Spring Data Babbage release. 2013-10-01 17:41:49 +02:00
Thomas Darimont
090c325766 Added short temporary note for disabling the github issues. 2013-08-27 18:35:26 +02:00
Thomas Darimont
96c33e6a57 Added Contributing section to readme.md 2013-08-27 14:28:37 +02:00
Oliver Gierke
9acad5d55d DATAREST-111 - Slightly raised precedence of RepositoryRestHandlerMapping.
Set order of RepositoryRestHandlerMapping to LOWEST_PRECEDENCE - 100 to give core Spring Framework components the chance to hook into the right place in the chain.

Refactored RepositoryRestHandlerMapping to really check for the exposed path and added test cases for handler method resolution.
2013-08-21 12:19:46 +02:00
Oliver Gierke
252efc5196 DATAREST-112 - Moved property mapping into PropertyResourceMapping.
PersistentEntityJackson2Module now entirely relies on the property mapping to do the right thing for link creation. The PropertyResourceMapping now returns the property name for both rel and path.
2013-08-21 10:20:37 +02:00
Oliver Gierke
70443fc6a7 DATAREST-93 - Refactorings in HandlerAdapters.
Use constructor injection consistently now in ResourceProcessorInvokingHandlerAdapter and RepositoryRestHandlerAdapter. Removed unnecessary constructor in ResourceProcessorInvokingHandlerAdapter.

Renamed RestController annotation to RepositoryRestController to avoid confusion with Spring 4's @RestController.
2013-08-16 12:04:27 +02:00
Phillip Webb
f02b717c44 DATAREST-106 - Spring 4.0 compatibility in ResourceProcessorInvokingHandlerAdapter.
Fix ResourceProcessorInvokingHandlerAdapter to call
getReturnValueHandlers() via reflection and deal with different
response types.

This change is necessary due to SPR-10519 which changed the API of
RequestMappingHandlerAdapter.getReturnValueHandlers() to return a
List rather than a HandlerMethodReturnValueHandlerComposite.

Original pull request: #114.
2013-08-16 11:25:15 +02:00
Oliver Gierke
8ac0d2c222 DATAREST-93 - Fixed test setup. 2013-07-24 14:08:51 +02:00
Oliver Gierke
d2c2ec8262 DATAREST-93 - More cleanups.
Merged core and repository modules into core. Renamed some packages for consistency in naming and in preparation to break up some package cycles. Removed @BaseUri and the according resolver. Refactored controllers a bit to have more reusable chunks of code.
2013-07-24 12:59:23 +02:00
Oliver Gierke
0f325bb0a0 DATAREST-93 - Use pluralized class name as default path if EvoInflector is present. 2013-07-17 23:20:47 +02:00
Oliver Gierke
c1d2f624c9 DATAREST-93 - Enable web integration tests for Gemfire. 2013-07-17 23:20:28 +02:00
Oliver Gierke
975b333746 DATAREST-103 - Added support for non-CrudRepositor implementations.
The exporter can now work with repositories that do not implement CrudRepository. Introduced a new RepositoryInvoker abstraction that transparently exposes which CRUD methods the repository offers. 

We still offer special invokers that can be used for CrudRepository and PagingaAndSortingRepository implementations to avoid the reflection overhead the general mechanism introduces.
2013-07-17 15:14:45 +02:00
Oliver Gierke
a4d8a22428 DATAREST-93 - Further refactorings and refinements regarding the search resource mapping. 2013-07-12 14:20:32 +02:00
Oliver Gierke
f8e53058f8 DATAREST-93 - More cleanups in code structure.
Removed the need for RepositoryInformationSupport. Refactored Converter implementations to get dependencies injected directly and use constructor injection.

Added new RepositoryInvoker abstraction to avoid reflection for known CrudRepository or PagingAndSortingRepository. Refactored existing RepositoryMethodInvoker to implement the new abstraction.

Refactored AbstractRepositoryRestController and RepositoryEntityContoller to use new mapping API.
2013-07-08 13:27:13 +02:00
Oliver Gierke
86a298efba DATAREST-93 - Made mapping classes package protected where possible. 2013-07-08 13:08:55 +02:00
Oliver Gierke
237d142d38 DATAREST-93 - Removed Neo4j repo as it's all in libs-snapshot now. 2013-07-03 11:21:38 +02:00
Oliver Gierke
bbe4dd8db3 DATAREST-93 - More repository tweaking. 2013-07-03 11:08:09 +02:00
Oliver Gierke
794bb0c0d0 DATAREST-93 - Hope to fix build. 2013-07-02 18:13:47 +02:00
Oliver Gierke
175f9eab10 DATAREST-99 - Updated RepositoryController to use new mapping API.
RepositoryController now uses the new mapping API to not expose non-public repositories anymore. Added integration test for that in the JPA module.
2013-06-29 17:56:09 +02:00
Oliver Gierke
6b902af058 DATAREST-93 - Build cleanup.
Use configuration hook to force all Spring Framework dependencies into a particular version. Disabled caching for dynamic versions to hopefully let Gradle pick up snapshot dependencies finally.
2013-06-29 15:38:58 +02:00
Oliver Gierke
2381c8af15 DATAREST-93 - Polished Jackson dependencies.
Upgraded to Jackson 2.2.2. Removed dependency to Jackson 1.9.12 remaining in webmvc module.
2013-06-29 14:26:50 +02:00
Oliver Gierke
310c2f1106 DATAREST-99 - Non-public repositories are not exported by default anymore. 2013-06-29 13:35:52 +02:00