Jon Brisbin
5f21071a5e
Fix for #74 . Replace self link building with calls to EntityLinks instance.
2013-03-06 08:25:55 -06:00
Jon Brisbin
35a4846590
Remove JSONP support from the controllers in preference to a forthcoming JSONP Servlet Filter to implement the functionality on a wider scale.
2013-03-06 07:56:48 -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
eaf88b18e3
Fix for DATAREST-71.
2013-03-05 07:41:14 -06:00
Jon Brisbin
3cc83ecf70
Fix deprecation warning.
2013-03-04 09:35:01 -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
cfcb097007
Fixes to get Spring Data REST to pass the TCK test suite.
2013-02-22 15:53:01 -06:00
Jon Brisbin
ec9f94aac4
Added unit test for ResourceProcessorHandlerMethodReturnValueHandler as well as fix from pull request #61
2013-02-19 08:41:29 -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
9f082f00fd
DATAREST-60 Only set the errback parameter if one is configured in the RepositoryRestConfiguration.
2013-01-22 10:02:20 -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
0aacc6d4d3
Fix for #47
2012-11-27 10:24:01 -06:00
Jon Brisbin
754ae21c4c
Merge branch 'master' of github.com:SpringSource/spring-data-rest
2012-11-05 09:26:04 -06:00
Oliver Gierke
9adcd01aa3
DATAREST-56 - RepositoryRestHandlerMapping now uses lowest precedence.
...
Invoke super constructor with Ordered.LOWEST_PRECEDENCE to allow custom controller implementations hook into the URI space managed by the RepositoryRestController.
2012-11-02 08:53:28 +01: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
334e079348
Fixed a bug where the repository rel wasn't being respected in linked property link lists.
2012-10-18 08:49:31 -04:00
Jon Brisbin
dfe8e24bdd
Cosmetic change.
2012-10-17 12:49:05 -04:00
Jon Brisbin
2fa177d9ec
Fix an NPE bug when serializing an entity with no ID.
2012-10-17 12:48:47 -04: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
d526e073ba
Fix NPE.
2012-10-12 08:32:28 -05:00
Jon Brisbin
babf3b0104
Added custom FieldError arguments to the message formatting arguments. Now passes type name, property name, value, then user-supplied arguments.
2012-10-12 08:29:14 -05:00
Jon Brisbin
96a37b490f
Merge branch 'master' of github.com:SpringSource/spring-data-rest
2012-10-11 10:38:39 -05:00
Jon Brisbin
72691f2d16
Merge pull request #40 from jotomo/bean-default
...
Declare all @Autowired uses of RepositoryRestConfiguration as optional.
2012-10-11 08:38:00 -07:00
Jon Brisbin
4b6a408b5a
Forgot to add the test error message file.
2012-10-10 09:27:20 -05:00
Jon Brisbin
aff62b7cd7
Added specific message key for testing @NotNull handling.
2012-10-10 08:56:29 -05:00
Johannes Mockenhaupt
470ccf1308
Declare all @Autowired uses of RepositoryRestConfiguration as optional.
2012-10-10 01:53:42 +02:00
Jon Brisbin
d97c14ebb2
Integrated standard Spring MessageSource components for resolving error messages in validators.
2012-10-09 16:55:14 -05:00
Jon Brisbin
e8be1c1ded
Added timestamp to Person for testing Date conversion.
2012-10-09 09:15:39 -05:00
Jon Brisbin
3fa13a60a7
Make RepositoryRestConfiguration bean optional by defaulting.
2012-10-09 09:13:49 -05:00
Jon Brisbin
39a53f6841
Fix bug in URI-generation for links.
2012-10-02 10:37:26 -05: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
ce466d00ab
Changed ApplicationRestConfig to just import RepositoryRestMvcConfiguration rather than extend it. It works the same either way. It's easier to override the default behavior by extending it, but if you're just defining validators and additional components, you can just use the @Import.
2012-10-02 09:58:52 -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
df3b60ba41
Changed the way baseUri is calculated. Changed tests to accommodate new method signatures, fix failing tests.
...
* Added a configuration property to `RepositoryRestConfiguration` for deployments behind a proxy which do not know the external URL to use as the baseUri for links.
* Changed the way the baseUri is injected into the controller by introducing a `BaseUriMethodArgumentResolver` to inject the proper baseUri (either the one from the configuration, or the one from the request if that's not specified).
2012-10-01 09:52:46 -05:00
Jon Brisbin
697f39d5b0
Tweak to accommodate some weird situation in the Gradle build where the HSQL session stays open a lot longer than it does when the tests are run in the IDE, which causes all kinds of stupid situations that have to be adjusted for in the tests.
2012-09-27 16:53:13 -05:00
Jon Brisbin
a3d0c548c5
Tests were failing for some reason. Various errors from the Gradle command line that don't happen when the tests are run in the IDE. Had to comment out the delete/clear of entities because that was causing a foreign key error and had to comment out a non-optional relationship test because I had to remove a back reference in a bi-directional relationship (I think it's an HSQL problem or a Gradle test environment problem because these things don't happen when run in the IDE).
2012-09-27 16:48:38 -05:00
Jon Brisbin
c856d50a7c
Previous Jackson Module configuration was causing serializers to be set to none (probably because it was the last module to be registered).
2012-09-27 16:15:02 -05:00
Jon Brisbin
2b187c91ed
Already picking up the necessary Jackson modules. No need to register the internal one twice.
2012-09-27 16:14:20 -05:00
Jon Brisbin
28f4936d97
Added JsonSchemaController for generating JSON schema for managed entities.
2012-09-27 15:53:32 -05:00
Jon Brisbin
50dc81954b
Added JSON serializers to format timestamps into human-readable strings.
2012-09-27 15:52:51 -05:00
Jon Brisbin
3ffae1a1ec
Added default servlet enabling in the test app to be able to serve static resources from the webapp.
2012-09-27 15:51:36 -05:00
Jon Brisbin
cff8065d8d
Fixed misspelling.
2012-09-27 15:50:41 -05:00
Jon Brisbin
967e6572ff
Removed obsolete reference.
2012-09-27 15:50:24 -05:00
Jon Brisbin
1ac4ab6c17
Added simple assert to ensure RepositoryMetadata is non-null.
2012-09-27 15:49:50 -05:00
Jon Brisbin
4fc50526a3
Fixed problem with infinite recursion on entities by adding @JsonBackReference et al
2012-09-27 15:49:11 -05:00
Jon Brisbin
2ddf788350
DATAREST-48 Fix a bug with compact content-type not displaying links properly when executing query methods.
2012-09-13 08:22:57 -05:00