32 Commits

Author SHA1 Message Date
Spring Buildmaster
24418b20a4 DATAREST-601 - Prepare next development iteration. 2015-06-30 23:43:14 -07:00
Spring Buildmaster
c9cb4a9b74 DATAREST-601 - Release version 2.1.6.RELEASE (Dijkstra SR6). 2015-06-30 23:43:12 -07:00
Spring Buildmaster
3e18809961 DATAREST-458 - Prepare next development iteration. 2015-01-27 09:24:26 -08:00
Spring Buildmaster
ccc94dccd2 DATAREST-458 - Release version 2.1.5.RELEASE (Dijkstra SR5). 2015-01-27 09:24:09 -08:00
Spring Buildmaster
e523f2dcf0 DATAREST-378 - Prepare next development iteration. 2014-08-27 03:35:07 -07:00
Spring Buildmaster
2d65e81f6a DATAREST-378 - Release version 2.1.4.RELEASE (Dijkstra SR4). 2014-08-27 03:35:05 -07:00
Spring Buildmaster
16031df155 DATAREST-361 - Prepare next development iteration. 2014-07-28 03:12:28 -07:00
Spring Buildmaster
deaf35511c DATAREST-361 - Release version 2.1.2.RELEASE (Dijkstra SR2). 2014-07-28 03:12:25 -07:00
Oliver Gierke
c595ce63e5 DATAREST-343 - Fixed dependency to jackson-annotations after 2.3.4 upgrade.
See: https://github.com/FasterXML/jackson-annotations/issues/39
2014-07-28 12:05:13 +02:00
Oliver Gierke
092fc365db DATAREST-361 - Prepare version 2.1.2.RELEASE.
Upgraded to Spring HATEOAS 0.16.0.RELEASE.
2014-07-28 09:49:20 +02:00
Oliver Gierke
bba78849bd DATAREST-326 - Improved configuration setup for better Boot compatibility.
We now don't expose the PersistentEntityJackson2Module as bean anymore to prevent global registration in case of a Boot setup. The HttpMessageConverters registered are now TypeConstrainedMappingJackson2HttpMessageConverters so that they only get used of the object to marshal is of type ResourceSupport.
2014-07-25 21:27:35 +02:00
Oliver Gierke
1674be28fb DATAREST-351 - Upgraded to Evo Inflector 1.2.
This is mainly to prevent users from running into Java 6 incompatibility as the Evo library was accidentally compiled requiring Java 7 compatibility in version 1.1.
2014-07-08 17:10:09 +02:00
Oliver Gierke
5182808605 DATAREST-337 - Fix trailing whitespace in poms. 2014-07-08 14:05:52 +02:00
Spring Buildmaster
350fcd8a76 DATAREST-337 - Prepare next development iteration. 2014-06-30 07:42:04 -07:00
Spring Buildmaster
e57ddb1695 DATAREST-337 - Release version 2.1.1.RELEASE (Dijkstra SR1). 2014-06-30 07:42:01 -07:00
Oliver Gierke
7ee41aafdb DATAREST-341 - Upgraded to Spring HATEOAS 0.14.0.RELEASE. 2014-06-30 14:10:29 +02:00
Oliver Gierke
e8fd0c60ff DATAREST-306 - Prepare next development iteration. 2014-05-22 12:40:20 +02:00
Spring Buildmaster
c67f79d5ae DATAREST-306 - Release version 2.1.0.RELEASE. 2014-05-20 20:04:39 +02:00
Oliver Gierke
e9e4da3062 DATAREST-306 - Prepare 2.1 GA. 2014-05-20 20:04:32 +02:00
Spring Buildmaster
cafa6f7931 DATAREST-297 - Prepare next development iteration. 2014-05-02 06:15:33 -07:00
Spring Buildmaster
5693af6f2a DATAREST-297 - Release version 2.1.0.RC1. 2014-05-02 06:15:31 -07:00
Oliver Gierke
358ff1bda8 DATAREST-297 - Prepare 2.1.0.RELEASE.
Upgraded to Spring HATEOAS 0.11.0, Spring Plugin 1.1.0 and Evo Inflector 1.1.
2014-05-01 20:52:29 +02:00
Spring Buildmaster
d0ccd7251d DATAREST-257 - Prepare next development iteration. 2014-03-31 08:33:17 -07:00
Spring Buildmaster
b5b5b94f01 DATAREST-257 - Release version 2.1.0.M1. 2014-03-31 08:33:14 -07:00
Oliver Gierke
af7e15b8e6 DATAREST-221 - Added support for projections.
This commit introduces support to access resources via projections, which means naming a dedicated set of properties of the entity to be exposed and being able to refer to that set through a request parameter.

## General usage

Projections are defined as interfaces that mimic the properties of the domain class to be exported:

@Projection(types = Customer.class, name = "summary")
interface Summary {
  String getFirstname();
  String getLastname();
  AddressSummary getAddress();
}

interface AddressSummary() {
  String getZipCode();
}

The projection interface can be annotated with @Projection to be auto-discovered. We scan all packages in which we find domain types to be exported for projection types and auto-register them. For manual registration, use RepositoryRestConfiguration.projectionDefinitionConfiguration().addProjection(…) and manually register them.

If a projection is registered for a given type, this will be indicated via a "projection" template variable in the URI pointing to resources with projections. The name of the variable can also be configured on ProjectionDefinitionConfiguration.

## Internals

The projection interfaces are consider bean property delegates by default. This means, that for the above interfaces we will lookup the firstname, lastname and address property of the projection target. In the case of address we re-project the result of the proxy target invocation with a sub-projection onto AddressSummary.

For more advanced use-cases you can annotate a method of the projection interface with @Value and use a SpEL expression to invoke further functionality and return that to be rendered:

interface MyProjection {

  @Value("#{@myBean.someMethod(target)}")
  SubProjection getValue();
}

This projection would call the someMethod(…) method on a Spring bean named myBean handing the proxy target to the method. The result will be projected in turn onto a type called SubProjection.

As the projection objects are exposed to Jackson as is, they can be annotated with Jackson annotations to further customize the representation.
2014-02-27 08:48:58 +01:00
Spring Buildmaster
b16b2e0ec6 DATAREST-249 - Prepare next development iteration. 2014-02-25 07:45:29 +01:00
Spring Buildmaster
fb73b52be7 DATAREST-249 - Release version 2.0.0.RELEASE. 2014-02-24 10:00:15 -08:00
Spring Buildmaster
84880ffe5e DATAREST-226 - Prepare next development iteration. 2014-01-29 06:40:33 -08:00
Spring Buildmaster
3a87ad8d49 DATAREST-226 - Release version 2.0.0.RC1. 2014-01-29 06:40:30 -08:00
Oliver Gierke
20a407d40c DATAREST-226 - Prepare 2.0 RC1 release.
Upgraded to Spring Data RC modules, Spring HATEOAS 0.9.0.RELEASE and Spring Plugin 1.0.0.RELEASE. Removed placeholder for Jackson 2 version as it's in the parent build pom now. Switched to milestone repository.
2014-01-29 15:35:46 +01:00
Oliver Gierke
88b2f05edf DATAREST-229 - RepositoryEntityLinks now exposes templated links.
If the resource exposed for a domain or repository type is considered a paging resource we now return a templated URI. Introduced ResourceMapping.isPagingResource() to allow clients to find out about whether the resource is actually capable of pagination. Adapted implementations to inspect the findAll(…) method as well as the search methods for a Pageable parameter.

Tweaked pom.xml to create correct classpaths if the IDE uses direct workspace project references.
2014-01-23 17:11:34 +01:00
Oliver Gierke
f02000e619 DATAREST-224 - Introduce Maven POMs.
Adapted JpaWebTests to compile on Java6. Fixed some broken test case in Neo4jWebTests.
2014-01-20 10:18:44 +01:00