Commit Graph

72 Commits

Author SHA1 Message Date
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
Oliver Gierke
7c6bebfbe9 DATAREST-89 - Upgraded to latest Spring Data milestone builds. 2013-06-05 12:51:49 +02:00
Alexei Guevara
462adb5a79 Fixed issue DATAREST-82 2013-04-23 11:51:50 -04:00
Jon Brisbin
8fcf5681ab Remove obsolete config options, change from addResourceMapping to setResourceMapping. 2013-04-03 00:08:41 +02:00
Jon Brisbin
9c81264d52 Added extra checks to make sure that query methods marked with @RestResource(exported=false) aren't accidentally exported anyway. 2013-03-26 14:00:25 -05:00
Jon Brisbin
c25d05e12e Change the signature of a constructor. 2013-03-13 15:05:29 -05:00
Jon Brisbin
94328592f4 Add explicit transactional semantics to the deleteEntity method because of problems with Neo4J support. 2013-03-13 11:14:48 -05:00
Jon Brisbin
cf275cb304 Fix a bug where paging information wasn't being displayed in the JSON. 2013-03-12 09:49:39 -05:00
Jon Brisbin
df239e49ce Catch an error condition. 2013-03-12 09:49:07 -05:00
Jon Brisbin
8012d1135d EOL / tab normalization. 2013-03-06 16:06:56 -06:00
Jon Brisbin
05f11a6cf9 Fix for #71. Made validation messages more robust and synced them between the Spring Validator based validation and the JSR-303 validation annotations. The output differed before but is now consistent. 2013-03-05 14:05:53 -06:00
Jon Brisbin
810b2144c8 Added BeforeCreateEvent and AfterCreateEvent and needed changes to accommodate a Validator that might want to validate a new entity differently than it does one that's already been saved. 2013-03-05 12:29:08 -06:00
Jon Brisbin
afbf92bdad Fix for DATAREST-69. Tweaked how RepositoryEntityLinks gets its default baseUri if none is set in the configuration. 2013-03-05 10:54:13 -06:00
Jon Brisbin
9e47346314 Fix for DATAREST-69. Now inject an EntityLinks into the controller and provide the RepositoryEntityLinks as a bean in the RepositoryRestMvcConfiguration. 2013-03-05 08:59:13 -06:00
Jon Brisbin
9ac79514b7 Fix for DATAREST-70. Added a null check before constructing a RepositoryEntityLinks.PersistentEntityLinkBuilder 2013-03-05 07:58:27 -06:00
Jon Brisbin
be3c200a81 Turn off serialization test because it's unreliable in the current testing environment. 2013-03-04 09:35:37 -06:00
Jon Brisbin
de80e462f4 Fix bugs found when using this with the RESTBucks application. 2013-03-02 11:54:57 -06:00
Jon Brisbin
6ef500804b Tweak abstract base tests. 2013-03-02 11:50:09 -06:00
Jon Brisbin
7820db0231 Add a copy of the base test class to this module. 2013-02-26 16:38:58 -06:00
Jon Brisbin
cfcb097007 Fixes to get Spring Data REST to pass the TCK test suite. 2013-02-22 15:53:01 -06:00
Jon Brisbin
f4f7427263 Tweaked rel generation to make it hierarchical. 2013-02-19 17:37:14 -06:00
Jon Brisbin
3b600f9ba8 Updated ResourceProcessor framework to call configured RPs at the appropriate time. 2013-02-18 17:21:20 -06:00
Jon Brisbin
ef2b37f3e3 Fix for #60. Added maxPageSize to the RepositoryRestConfiguration so the user can specify a maximum which can be specified as the limit parameter. If the user specifies a value that exceeds the maximum, the configured maximum will be used rather than the value specified as a query parameter. 2013-01-22 10:18:29 -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
269d6f5983 Fix broken test that didn't have the AnnotatedHandlerBeanPostProcessor defined in it. 2012-11-27 10:43:22 -06:00
Jon Brisbin
00b8b5db69 Fix for #50 2012-11-27 10:24:37 -06:00
Jon Brisbin
9dd9afb93f Change AnnotatedHandlerRepositoryEventListener into a BeanPostProcessor which works better all around and processes every bean, looking for event handlers. 2012-10-29 10:24:30 -05:00
Jon Brisbin
851ae50301 Tweaked how the version is exposed. It isn't by default so I added a check for @RestResource on the version attribute. If a path is set, the version is exported under that name. 2012-10-15 07:42:02 -04:00
Jon Brisbin
1100693c53 Fixed a bug introduced by a change in how the validators were looked up. Not sure why I made the original change to begin with but the functionality has been been reverted to its previous behavior. 2012-10-02 10:06:53 -05:00
Jon Brisbin
dbfd43c1a0 Changes to the order in which ApplicationContexts are loaded, changed package that JavaConfig classes are in to keep them from being picked up by the repository component scanning, split single JavaConfig into separate JPA Repository config and Spring Data REST config classes. 2012-10-02 09:05:21 -05:00
Jon Brisbin
2c710b5978 DATAREST-44 Fix for situation where EclipseLink throws an exception if no version is present on the entity. 2012-09-05 14:50:31 -05:00
Jon Brisbin
e3dde1a2cd DATAREST-39 Introduced new property on AttributeMetadata to encapsulate the decision of whether or not a property is nullable. Removed references to JPA-specific classes from everything but the JpaAttributeMetadata class. 2012-09-05 08:57:43 -05: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
2000d07b32 Introduced a MethodParameterConversionService to help convert query parameters that might be annotated with specific converters. 2012-08-20 08:23:58 -05:00
Jon Brisbin
023ab6b885 Fix problem with the ConversionService not being sufficiently checked for converters when reading query parameters, requiring an alternative mechanism for doing parameter conversion. 2012-08-17 14:39:34 -05:00
Jon Brisbin
b9b6a8fe92 DATAREST-39: Modified the DELETEing of links so that an attempt to delete a required relationship will result in a 405 Method Not Allowed. Had to change the entities and tests to accommodate the new required relationship on the Address entity, which pingponged into a number of changes. 2012-08-17 13:37:26 -05:00
Jon Brisbin
2dd0511f8f #28, #29: Support for nested objects as links in the JSON representation. 2012-08-17 08:46:25 -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
3393780e65 DATAREST-37: Display entities inline when accessing relationship links. 2012-08-13 09:32:42 -05:00
Jon Brisbin
4abd842a86 Added an annotation for doing parameter conversion @ConvertWith. You can now specify a Spring Core Converter class to use to convert the query parameter String[] values coming in on the query string to the type needed in the query method parameter. 2012-08-07 17:05:43 -05:00
Jon Brisbin
81b5f29c1e Adding a test scenario for @MappedSuperclass, fixed a couple bugs w.r.t. generating links to entities. 2012-08-07 11:03:02 -05: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
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
b73dafbb8b Adding javadoc comments. 2012-07-31 13:13:01 -05:00
Jon Brisbin
bf9c719950 Fixed a bug where complex query method parameters that aren't managed by repositories were causing the parameter processing to short-circuit to a 404 error. Replaced that method call with a different one that simple returns a boolean if a type is managed by a repository so the if/else chain can continue on to the ConversionService. 2012-07-31 09:22:36 -05:00
Jon Brisbin
2f6650c846 Added before/after link delete events and fixed a bug with deleting links where the updated entity was never saved back to the DB. 2012-07-30 13:53:13 -05:00
Jon Brisbin
7f8abc5aa8 Big update. Bug fixes, code re-formatting, changing tests. 2012-07-26 13:31:34 -05:00
Jon Brisbin
93d40b396b Forgot to add an important file. doh! :/ 2012-07-23 17:09:30 -05:00