Commit Graph

12 Commits

Author SHA1 Message Date
Oliver Gierke
2bcfd92c3b #321 - Remove dependency to Objenesis.
We're now using the inlined version of Objenesis in Spring Framework to avoid the additional dependency.
2015-03-19 13:34:41 +01:00
Oliver Gierke
8436e9ed4e #165 - Removed support for Jackson 1.x. 2014-03-21 17:45:58 +01:00
Oliver Gierke
9b172631f9 #121 - Fixed Bundlor template to create correct OSGi manifest. 2014-01-01 19:43:47 +01:00
Oliver Gierke
4142140a37 #91 - Improved proxying for method link references with Objenesis.
Upgraded to Spring 3.2.3 to be able to use inlined CGLib directly. We now use Objenesis to create the proxy instances which avoids the need for a default constructor.
2013-06-28 23:25:20 +02:00
Oliver Gierke
6acf17e730 #47, #60 - Added RelProvider implementation pluralizing using the Evo Inflector algorithm.
See http://www.csse.monash.edu.au/~damian/papers/HTML/Plurals.html for details of the algorithm.
2013-04-29 12:18:54 +02:00
Oliver Gierke
3f8b90e2b5 #33 - ControllerLinkBuilder now regards X-Forwarded-Host header.
When setting up the builder we now set the host to the value held in the X-Forwarded-Host [0] header if present. This allows to render appropriate URIs in reverse proxy scenarios. This is essentially an extension of ServletUriComponentsBuilder that will be fixed in there eventually. See SPR-10110 [1] for details.

[0] http://tools.ietf.org/html/draft-ietf-appsawg-http-forwarded-10
[1] https://jira.springsource.org/browse/SPR-10110
2012-12-19 17:34:47 +01:00
Oliver Gierke
531dd8f5ed #18 - Added support for creating links from method mappings.
ControllerLinkBuilder(Factory) now has a linkTo(Method method, Object… parameters) and linkTo(Object dummyMethodInvocationResult) method to either inspect the given method or the result of the dummy method invocation that can be created through DummyInvocationUtils.methodOn(…). So for the following controller:

@Controller
@RequestMapping("/people")
class PersonController {
  
  @RequestMapping(value = "/{person}", method = RequestMethod.GET)
  public HttpEntity<PersonResource> show(@PathVariable Long person) { … }
}

you could now do:

Link link = linkTo(methodOn(PersonController.class).show(2L)).withSelfRel();
assertThat(link.getHref(), is("/people/2")));

The code is highly inspired by the code Dietrich Schulten (@dschulten) provided in his pull requests but radically reduced to the core functionality. I also didn't add support for JAX-RS in the first place, but this is definitely a topic going forward.
2012-12-19 13:10:31 +01:00
Oliver Gierke
0e0bf16957 #31 - Introduced LinkDiscoverer to extract Link instances from representations.
LinkDiscoverer exposes an API to find Links by their relation types in representations. Added JSONPath based base class and a DefaultLinkDiscoverer that finds Links based on the default rendering of our Jackson mappings.
2012-12-15 19:07:03 +01:00
Oliver Gierke
40b486cb43 #27 - Added support for Jackson 2.
Added Jackson 2 dependencies. Doubly annotated representation model classes with both Jackson 1 and Jackson 2 annotations. Added Integration tests for Jackson 2 marshaling provided by Jon. Polished template.mf.
2012-11-16 21:32:47 +01:00
Ricardo Gladwell
9e728b4660 #13 - Introduced LinkBuilder implementation inspecting JAX-RS @Path annotation.
Refactored LinkBuilder(Factory) classes to extract reusable code into common superclass for ControllerLinkBuilder and JaxRsLinkBuilder.
2012-09-13 17:42:54 +02:00
Oliver Gierke
ca57ed440d Enhancements of Resource abstraction.
Introduced Resource and Resources value objects. The former captures single entity instances but adds links to it. The latter does the same for a collection of entities. Added SPI interfaces ResourcePostProcessor and ResourcesPostProcessor to allow manipulating Resource and Resources instances.
2012-08-07 19:17:51 +02:00
Oliver Gierke
7286b829f8 Polished build.
Set version number to 0.1.0.BUILD-SNAPSHOT to quickly allow releases while not doing an 1.0.0 release in the first place. Added Bundlor to generate an appropriate OSGi manifest.
2012-06-12 20:00:25 +02:00