Commit Graph

20 Commits

Author SHA1 Message Date
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
Oliver Gierke
5c61632ec2 DATAREST-93 - Fixed formatting in Spring Data REST.
Added formatter to be used within Eclipse going forward.
2013-06-18 16:21:34 +02:00
Oliver Gierke
90c4b62428 DATAREST-93 - Removed compiler warnings.
Removed dependency on jMock.
2013-06-11 15:01:03 +02:00
Oliver Gierke
cb4056e351 DATAREST-94 - Removed dependency to Guava.
Introduced simple Function interface. Replaced usage of Multimap with Spring's MultiValueMap.
2013-06-05 22:13:00 +02:00
Jon Brisbin
6ef500804b Tweak abstract base tests. 2013-03-02 11:50:09 -06: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
Jon Brisbin
5cfa242a8d Added package-info 2012-10-17 12:51:23 -04:00
Jon Brisbin
40645673bf Integrated Spring HATEOAS. 2012-08-27 15:16:02 -05:00
Jon Brisbin
3aa8905b15 Added configuration property for domain type to repository mappings. Also improved the post-processing support, though I think there's still some room for tweaking. 2012-08-20 15:06:15 -05:00
Jon Brisbin
d7e2e53ce2 Implemented a new style of JSON serialization and deserialization by registering Repository-aware components with Jackson's underlying ObjectMapper. This has the benefit of allowing us to transliterate domain objects into link representations and back again, no matter where those entities appear in complex nested object graphs. 2012-08-15 14:31:57 -05:00
Jon Brisbin
d2c6ecacc5 Tweaking fluent bean utils by adding fallback to Field access. 2012-08-15 14:28:23 -05:00
Jon Brisbin
3393780e65 DATAREST-37: Display entities inline when accessing relationship links. 2012-08-13 09:32:42 -05:00
Jon Brisbin
7775af8be4 Changing the representation to be more consistent in key naming (breaking change). Also starting work on the ability to "enrich" a representation with e.g. more links to other resources, etc... 2012-08-06 12:25:26 -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
e44506c4e0 Reorganize how configuration is loaded, add UUID/String Converters. 2012-05-07 10:26:27 -05:00
Jon Brisbin
61170d8b43 Javadoc updates. 2012-05-03 11:35:05 -05:00
Jon Brisbin
d549aaecee Tweaking query method support. 2012-05-02 11:09:27 -05:00
Jon Brisbin
fe9e485d81 Added ApplicationEvent handling and annotation-based extension mechanism. 2012-04-26 11:40:14 -05:00
Jon Brisbin
e49014542c Re-org submodules, add debug compiler options 2012-04-11 15:44:20 -05:00