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
f3dde0c144
Fixed failing test due to changing the key name in the root-level object, removed the serialVersionUID compile flag.
2012-08-06 14:40:32 -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
bd24e582fd
Updated wiki documentation.
2012-08-01 13:22:26 -05:00
Jon Brisbin
b73dafbb8b
Adding javadoc comments.
2012-07-31 13:13:01 -05:00
Jon Brisbin
38a3ffd376
Added ConversionFailedException to the list of 400 Bad Request throwables.
2012-07-31 10:25:49 -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
b681844258
Added missing exception resolver configuration to turn exceptions into meaningful HTTP codes as well as provide sane serialization of exception stacktraces.
2012-07-30 15:17:37 -05:00
Jon Brisbin
3a8969e55f
Trying to fix build failures due to strange transaction issues not experienced in local builds.
2012-07-30 14:30:57 -05:00
Jon Brisbin
aa8e5a123f
Trying to fix build failures due to strange transaction issues not experienced in local builds.
2012-07-30 14:28:54 -05:00
Jon Brisbin
7bc2b0cb97
Added transactional awareness to the tests to ensure they pass.
2012-07-30 14:23:00 -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
1cb9307b1c
Added notNull assertions to the configuration class to prevent bad configurations from blowing up the exporter.
2012-07-30 08:56:12 -05:00
Jon Brisbin
300c06f640
Changed servlet 3.0 dependency to provided.
2012-07-27 14:12:28 -05:00
Jon Brisbin
f71b25b49c
Previous configuration caused a WAR to be built. Had to take that out of the gradle build so it would look properly like a Java project again.
2012-07-27 10:02:04 -05:00
Jon Brisbin
6be6de34d3
Fixing and adding tests.
2012-07-27 09:40:50 -05:00
Jon Brisbin
7f8abc5aa8
Big update. Bug fixes, code re-formatting, changing tests.
2012-07-26 13:31:34 -05:00
Jon Brisbin
6867d07295
DATAREST-23 Fix NPE when result of query is null.
2012-07-24 08:26:34 -05:00
Jon Brisbin
93d40b396b
Forgot to add an important file. doh! :/
2012-07-23 17:09:30 -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
014271d7db
Make parameter names for sorting and paging and what repositories to export configurable.
2012-07-20 16:54:35 -05:00
Jon Brisbin
7bb48e3eb9
Bumped Spring version to 3.1.2
2012-07-20 16:54:35 -05:00
Jon Brisbin
3b3814772f
Bumped Spring version to 3.1.2
2012-07-20 16:54:34 -05:00
Jon Brisbin
395101497f
Added documentation on how to integrate Spring Data REST with an existing Spring MVC application. Renamed a couple components to keep them consistent with the others.
2012-06-26 13:28:45 -05:00
Jon Brisbin
b3290c190c
Changed how handler mappings work in Spring Data REST so that only paths that have Repositories exported on them are recognized by the controller.
...
This makes it easier to integrate the RepositoryRestController into an existing Spring MVC application because all you have to do is include the RepositoryRestMvcConfiguration JavaConfig bean into your existing application.
Also included some changes to the way views are resolved so that only views starting with "org.springframework.data.rest" will be recognized as our own special views.
2012-06-26 11:24:52 -05:00
Jon Brisbin
ebd50e96e7
Added script to load lots of random names pulled from a spreadsheet based on the 1990 Census.
2012-06-26 11:19:58 -05:00
Jon Brisbin
5ea1cdcf24
Added documentation on paging and sorting.
2012-06-25 11:58:29 -05:00
Jon Brisbin
da332dcd31
Merge branch 'master' of github.com:SpringSource/spring-data-rest
2012-06-25 11:31:15 -05:00
Jon Brisbin
7696c96580
Fixed bugs in standalone configuration to make it easier to integrate with existing MVC applications.
2012-06-25 11:29:03 -05:00
J. Brisbin
902050633e
Merge pull request #16 from rstoyanchev/master
...
Add Eclipse plugin and ignore Eclipse settings
2012-06-25 06:11:38 -07:00
Jon Brisbin
25b8813604
Change configuration to make it easier to integrate with an existing Spring MVC application by implementing special MVC mapping and HanndlerAdapter beans that only recognize Spring Data REST components.
2012-06-22 12:15:25 -05:00
Jon Brisbin
0a05216b18
Change default page size to 20.
2012-06-22 12:14:25 -05:00
Jon Brisbin
b69675f401
Updated to Gradle 1.0 release.
2012-06-22 12:13:57 -05:00
Rossen Stoyanchev
83aad31010
Add eclipse plugin and update .gitignore
2012-06-21 10:53:00 -04:00
Jon Brisbin
079661d19e
Added support for paging and sorting.
2012-06-18 15:31:23 -05:00
Jon Brisbin
3e2a79d329
Added wiki documentation on API usage from curl. Also fixed a couple bugs, tweaked how rels are generated in some links.
2012-06-13 09:23:58 -05:00
Jon Brisbin
e0b3d84362
Forgot to add the new Entity to the JPA configuration for fix for #14 .
2012-05-23 10:32:37 -05:00
Jon Brisbin
9fb07a0fe5
Fix for #14 where links in linked entities weren't being rendered correctly.
...
Also added another entity and Repository to push the Person entity down another step in the hierarchy to test this. This change mirrors the one I did to fix #12 .
2012-05-23 10:03:50 -05:00
Jon Brisbin
987e386aba
Fix for #12 . Was passing the parent's path information to the self link generator rather than the child's.
2012-05-22 08:56:27 -05:00
Jon Brisbin
3646d0fc67
Updated wiki to document accessing Repository query methods via HTTP.
2012-05-16 16:35:21 -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
df8a8912cd
Changed the POST/create method to look for the query parameter "returnBody" and, if present and set to "true", return the entity in the body of the response. If it is not present or set to "false", then no content is returned in the body of the response, which is the current behaviour.
2012-05-16 10:48:22 -05:00
Jon Brisbin
75d90747f9
Merge remote-tracking branch 'origin/master'
2012-05-15 12:03:59 -05:00
Jon Brisbin
0b6175f005
Address #10 by changing the way views are selected.
...
Now returns a ModelAndView with view names specific to the representation being sent back. Added a new helper class: RepositoryRestViewResolver that always hands back a default View unless overriden by the user who might set `customViewMappings` so that the exporter will use their own custom views instead of the default one.
2012-05-15 12:03:31 -05:00
J. Brisbin
be762f989f
Merge pull request #9 from ptemplier/master
...
documentation : typo on 'instantiated'
2012-05-14 09:38:49 -07:00
ptemplier
3a32c5bd1a
typo on 'instantiated'
2012-05-14 18:22:05 +03:00
Jon Brisbin
d177cc7753
Fixed a bug in saving entities via PUT.
2012-05-10 07:06:28 -05:00
Jon Brisbin
27322ddcf9
Fixed a failing test.
2012-05-09 10:02:17 -05:00
Jon Brisbin
6e0f9a4162
Fixed a failing test.
2012-05-09 10:00:19 -05:00
Jon Brisbin
e1e460e718
Added the ability to control the exporting of Repositories, query methods or entity fields by adding "exported = true|false" to the @RestResource annotation.
2012-05-09 09:47:52 -05:00