Commit Graph

22 Commits

Author SHA1 Message Date
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
c5a592bd9d DATAREST-93 - Further fixes in repository mappings.
Simplified new RepositoryMappings infrastructure. Integrated EvoInflectionRelProvider to build collection resource rels. Bumped version number to 2.0 as we're going to break backwards compatibility with the next release to straighten out the rel construction and mapping.
2013-06-18 19:17:56 +02:00
Jon Brisbin
aeaa1782f7 Pushed back version after inadvertently bumping it. 2013-03-12 09:50:12 -05:00
Jon Brisbin
fb1cf26fcc Bump project version. 2013-03-11 09:55:34 -05:00
Jon Brisbin
6e4e7da142 Incorporated recent changes to Spring Data Commons and dependent projects that obsoleted the need to manage domain object metadata within Spring Data REST. Required updating to the latest snapshots available for spring-data-commons and spring-data-jpa.
Additional changes include:

* Re-wrote the monolithic Controller into separate controller classes that have a more narrow focus.
* Implemented common functionality as a `HandlerMethodArgumentResolver` rather than as a helper method in a controller class.
* Re-implemented JSONP functionality as an HttpMessageConverter rather than inline within a controller class.
* Updated to Jackson 2 for all JSON handling.
* By relying on spring-data-commons, spring-data-rest now handles all supported Repository types: JPA, MongoDB, and GemFire.

Added support for MongoDB and GemFire repositories by relying on spring-data-commons to provide the metadata rather than maintaining internal metadata information that is store-specific.

Replaced Spock spec tests with JMock unit and integration tests. Started integrating Jetty 8 into the testing so MVC testing can be done against a live server.
2013-01-18 10:14:29 -06:00
Oliver Gierke
4f2d55308c DATAREST-57 - Bumped version number to 1.1.0.BUILD-SNAPSHOT. 2012-11-02 09:07:00 +01:00
Jon Brisbin
23e8525dca Updating to RELEASE versions of Spring Data Commons and JPA. 2012-10-10 09:09:34 -05:00
Jon Brisbin
68bf39749a Upgrading to Spring HATEOAS 0.3.0.RELEASE and Jackson 1.9.10 2012-10-09 09:14:23 -05:00
Jon Brisbin
efc38c642d Updating build to latest versions of dependencies. 2012-09-11 08:30:23 -05:00
Jon Brisbin
40645673bf Integrated Spring HATEOAS. 2012-08-27 15:16:02 -05:00
Oliver Gierke
ed9bb157c7 DATAREST-40 - General purpose post-processing mechanism for resources.
This commit implements the components described in DATAREST-40. The core
of it is the ResourceProcessingHandlerMethodReturnValueHandler. It gets 
ResourceProcessor and ResourcesProcessor instances handed into its 
constructor and selects the ones that need to be invoked in the calls to
handleReturnValue(…). In this process it does a variety of generics 
checks to ensure only the correct post-processors. To do so it inspects 
the controller method's return type, the object value type as well as 
the returned value potentially.

Assume we have a specialized Resource type 
StringResource extends Resource<String>. Beyond that we have a 
ResourceProcessor<Resource<String>> registered. Here's the decision 
matrix:

Return type					Returned type		What get's used?
Resource<?>					Resource<String>	object value inspected (Resource.getContent())
Resource<String>			Resource<String>	method return type
Resource<String>			StringResource		object value type as it's more specialized
StringResource				StringResource		method return type
Resource<?>					Resource<Long>		no invocation, object value doesn't match
Resource<? extends Number>	Resource<Long>		no invocation, object value doesn't match
Resource<Long>				Resource<Long>		no invocation, object value doesn't match

This works exactly the same for Resources returned. We peek into the 
collection returned by getContent() in case return value inspection is 
needed for type matches. If the collection is empty we don't match. The 
same applies to null values returned.

The second component added is the ResourcePostProcessorInvokingHandlerAdapter 
which customizes the setup of a RequestMappingHandlerAdapter by fronting 
the current configuration with the 
ResourceProcessingHandlerMethodReturnValueHandler to let it intercept
the handling and potentially call the post-processors.

Upgraded to snapshots of Spring Data Commons until we get to the next 
release and added Mockito as dependency.
2012-08-22 16:29:26 +02:00
Jon Brisbin
88fc8ba7cd Added event handling machinery to intercept render events. It's now possible to write and event handler to influence the resource objects that are being sent to the client. There is an abstract helper class and there is support for annotated POJOs. 2012-08-07 10:02:16 -05:00
Jon Brisbin
7f8abc5aa8 Big update. Bug fixes, code re-formatting, changing tests. 2012-07-26 13:31:34 -05:00
Jon Brisbin
f969f92acc #18, DATAREST-20, DATAREST-21, DATAREST-22 Bugfixes, re-vamp output method, JSONPE support
There were some issues with how results were being displayed in searches versus entity lists. This code changes the way all results are displayed by offereing several options for output. The default is to inline the entity in the response and page the results (defaults to 20). If the UA sends an `Accept` header of `application/x-spring-data-compact+json` or `text/uri-list`, however, SD REST will output a compact list of only links and will not inline the entities.

The method of output was completely rewritten to use HttpMessageConverters exclusively. Views and the subsequent ContentNegotiatingViewResolver machinery have been elimintated. This should make it easier to embed inside an existing Spring MVC application. This is also easily extendable so the user can plug in their own set of HttpMessageConverters for any output format they like (JAXB, Atom/XML, etc...).

Also added was JSONPE support. By setting the `jsonpParamName` property on the `RepositoryRestConfiguration` customization class, the user can change the default JSONP param name of `callback`. There's also a `jsonpOnErrParamName` property on that configuration (defaults to `null`) that will allow you to capture errors using JSONP. Normally this would not be possible using script element injection, but the REST controller changes the status code to 200 and pass your javascript function the actual response code and wraps the error as the second parameter.
2012-07-23 17:08:10 -05:00
Jon Brisbin
7bb48e3eb9 Bumped Spring version to 3.1.2 2012-07-20 16:54:35 -05:00
Jon Brisbin
b69675f401 Updated to Gradle 1.0 release. 2012-06-22 12:13:57 -05:00
Jon Brisbin
51a6728408 Updated dependencies to Spring Data JPA 1.1.0.RELEASE and Spring Data Commons 1.3.0.RELEASE 2012-05-16 14:07:23 -05:00
Jon Brisbin
61170d8b43 Javadoc updates. 2012-05-03 11:35:05 -05:00
Jon Brisbin
749382dad7 Documentation on handling events. Also added support for Spring Data Commons 1.3.0.RC2, which has improved metadata handling. 2012-05-02 16:24:53 -05:00
Jon Brisbin
d78126d018 Massive update that reworks the entire metadata system. 2012-04-30 16:13:11 -05:00
Jon Brisbin
3dc5495357 Initial commit 2012-03-08 15:57:24 -06:00