195 Commits

Author SHA1 Message Date
Spring Operator
e1440b1095 DATAREST-1351 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 374 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0.html with 1 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0.html ([https](https://www.apache.org/licenses/LICENSE-2.0.html) result 200).

Original Pull Request: #332
2019-03-22 10:25:26 +01:00
Spring Operator
fc7c7695f8 DATAREST-1351 - URL Cleanup.
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 13 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).
* http://www.pivotal.io with 2 occurrences migrated to:
  https://www.pivotal.io ([https](https://www.pivotal.io) result 301).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 26 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 13 occurrences

Original pull request: #309
2019-03-18 11:48:26 -05:00
Oliver Gierke
26927d91a2 DATAREST-1075 - AnnotatedEventHandlerInvoker skips methods introduced by proxy. 2017-07-06 13:11:54 +02:00
Mark Paluch
f136fd4f31 DATAREST-1058 - Prepare next development iteration. 2017-06-07 11:50:56 +02:00
Mark Paluch
e64f9e944a DATAREST-1058 - Release version 2.5.11 (Hopper SR11). 2017-06-07 11:11:08 +02:00
Oliver Gierke
9106a22db3 DATAREST-1079 - Upgraded to EvoInflector 1.2.2. 2017-05-18 14:52:40 +02:00
Oliver Gierke
4ecb007adf DATAREST-1057 - Prepare next development iteration. 2017-04-19 21:02:14 +02:00
Oliver Gierke
f56485d92d DATAREST-1057 - Release version 2.5.10 (Hopper SR10). 2017-04-19 20:36:43 +02:00
Oliver Gierke
007a1ff582 DATAREST-1017 - Prepare next development iteration. 2017-04-19 13:01:02 +02:00
Oliver Gierke
ebc925804e DATAREST-1017 - Release version 2.5.9 (Hopper SR9). 2017-04-19 12:38:29 +02:00
Oliver Gierke
9207164c2e DATAREST-1018 - Prevent NullPointerException in UriToEntityConverter.
In case PersistentEntities exposes a managed type whose raw type currently doesn't have a PersistentEntity registered, the constructor of UriToEntityConverter ran into a NullPointerException.

We now explicitly check for null and skip those types.

Filed DATAREST-1021 for further improvements in the 3.0 time frame.
2017-03-07 14:50:34 +01:00
Oliver Gierke
7f8ff8c2a7 DATAREST-1014 - Avoid Java 8 API usage in AnnotatedEventHandlerInvoker.
Dropped the call to Method.getParameterCount() in favor of ….getParameterTypes().length as the former method was introduced in Java 8.
2017-03-03 11:39:35 +01:00
Oliver Gierke
82e2cceecf DATAREST-989 - Prepare next development iteration. 2017-03-02 12:05:55 +01:00
Oliver Gierke
f92169d7fb DATAREST-989 - Release version 2.5.8 (Hopper SR8). 2017-03-02 11:30:05 +01:00
Mark Paluch
6bbf228bb1 DATAREST-992 - Remove references to Assert single-arg methods.
Replace references to Assert single-arg methods with references to methods accepting the test object and message.

Related ticket: SPR-15196.
2017-02-01 13:24:53 +01:00
Oliver Gierke
1eff4ba0bd DATAREST-966 - Prepare next development iteration. 2017-01-26 12:04:55 +01:00
Oliver Gierke
5a1b58911f DATAREST-966 - Release version 2.5.7 (Hopper SR7). 2017-01-26 11:33:51 +01:00
Oliver Gierke
26b1a18227 DATAREST-983 - AnnotatedEventHandlerInvoker now resolves generic handler method argument.
We now resolve the handler method argument type of an annotated repository event handler against the concrete handler type to make sure generics are resolved properly.
2017-01-24 16:57:47 +01:00
Oliver Gierke
8a7976fbf1 DATAREST-970 - AnnotationEventHandlerInvoker now considers order of event handler methods.
We now make sure that an @Order annotation on annotated event handler methods are considered and the methods are invoked in the defined order.

Non-annotation-based event handlers don't suffer from the same problem as they're ApplicationListener instances directly so that the container will enforce the correct ordering in case @Order is used or Ordered is implemented.

Some cleanup in EventHandlerMethod.

Original pull request: #248.
2017-01-19 15:10:09 +01:00
Oliver Gierke
5a5d6d73ce DATAREST-932 - Prepare next development iteration. 2016-12-21 19:33:41 +01:00
Oliver Gierke
134ef39544 DATAREST-932 - Release version 2.5.6 (Hopper SR6). 2016-12-21 19:04:46 +01:00
Oliver Gierke
c92968ac8f DATAREST-957 - Polish most critical Sonar warnings.
Fixed broken equals(…) in ProjectionDefinition. Switched to iterating over Map's entry set instead of the keys. Made UriAwareHttpServletRequest static.
2016-12-08 10:12:23 +01:00
Oliver Gierke
4c97011b2d DATAREST-915 - Prepare next development iteration. 2016-11-03 18:20:10 +01:00
Oliver Gierke
6d20ab6df5 DATAREST-915 - Release version 2.5.5 (Hopper SR5). 2016-11-03 17:56:32 +01:00
Oliver Gierke
7b357db535 DATAREST-903 - Prepare next development iteration. 2016-09-29 14:20:09 +02:00
Oliver Gierke
e09b22bf94 DATAREST-903 - Release version 2.5.4 (Hopper SR4). 2016-09-29 13:54:03 +02:00
Oliver Gierke
4e3b12db7d DATAREST-842 - Prepare next development iteration. 2016-09-20 11:19:00 +02:00
Oliver Gierke
dd90d3b32b DATAREST-842 - Release version 2.5.3 (Hopper SR3). 2016-09-20 10:54:50 +02:00
Oliver Trosien
e5a0bdfe9f DATAREST-898 - Fix typo in EntityLookupConfiguration assertion message.
Original pull request: #228.
2016-09-19 15:41:23 +02:00
Oliver Gierke
d58d628098 DATAREST-804 - Prepare next development iteration. 2016-06-15 14:17:52 +02:00
Oliver Gierke
c0262db1d3 DATAREST-804 - Release version 2.5.2 (Hopper SR2). 2016-06-15 13:45:52 +02:00
Oliver Gierke
6d3f2c3137 DATAREST-801 - Improved nested value handling in ValidationErrors.
We now correctly handle nested values by manually traversing the potentially nested property path, creating a PropertyAccessor for each nesting step considering the property access settings defined in the mapping metadata.
2016-04-14 21:34:44 +02:00
Oliver Gierke
c3bdae7520 DATAREST-802 - Prepare next development iteration. 2016-04-06 22:51:43 +02:00
Oliver Gierke
df7499608b DATAREST-802 - Release version 2.5.1 (Hopper SR1). 2016-04-06 22:32:15 +02:00
Oliver Gierke
69d62019d6 DATAREST-790 - Prepare next development iteration. 2016-04-06 16:38:18 +02:00
Oliver Gierke
c49a29a247 DATAREST-790 - Release version 2.5 GA (Hopper). 2016-04-06 16:35:59 +02:00
Oliver Gierke
b530cbe471 DATAREST-798 - Fixed invalid implementation of ValidationErrors.
Changed the implementation of ValidationErrors to be based on AbstractBeanPropertyBindingResult to consider the nesting implemented in superclasses and using a PersistentPropertyAccessor to lookup the property values.

ValidatingRepositoryEventListener now uses this implementation if a PersistentEntity can be obtained for the type under consideration, falling back to a DirectFieldBindingResult otherwise.
2016-04-04 15:12:33 +02:00
Oliver Gierke
05c723fe50 DATAREST-782 - Prepare next development iteration. 2016-03-18 11:15:51 +01:00
Oliver Gierke
03a720d1c0 DATAREST-782 - Release version 2.5 RC1 (Hopper). 2016-03-18 11:15:00 +01:00
Oliver Gierke
6075f3052a DATAREST-782 - Fixed build after Spring 4.2.5 update.
Upgraded to JSONPath 1.1.0 as 0.9 is not supported with Spring 4.2 anymore. Tweaked integration tests due to changed semantics and internals of JSONPath >= 1.0.
2016-03-17 21:29:20 +01:00
Oliver Gierke
892409da2c DATAREST-774 - Separated integration tests from core project to avoid classpath overlap.
Extracted store specific tests into separate test modules to prevent classpath overlap between projects. Those tests are now executed in an "it" build profile to prevent the tests being packaged for distribution on release.

Use Map-based repositories and mapping contexts for test in the Core and WebMvc module.

Slightly changed the configuration API for lookup types on RepositoryRestConfiguration.

Related ticket: DATAREST-776.
2016-02-29 19:40:10 +01:00
Oliver Gierke
897bc88d69 DATAREST-775 - Support for nested association links.
Tweaked custom Jackson serialization to make sure nested entities are rendered as resources so that links to related resources can be collected on nested levels as well.

Extracted EmbeddedResourcesAssembler from PersistentEntityResourceAssembler so that embedded resources can also be build for nested entities. Extracted a ResourceProcessorInvoker from ResourceProcessorHandlerMethodReturnValueHandler to allow ResourceSupport instances created for nested entities get the ResourceProcessor instance registered for them invoked as well.

ProjectionDefinitionRegistrar now also allows the domain type of a repository being registered as excerpt, too.

Related tickets: DATAREST-776.
2016-02-29 19:38:59 +01:00
Oliver Gierke
c74576b91e DATAREST-756 - Prepare next development iteration. 2016-02-12 15:43:39 +01:00
Oliver Gierke
1c850a5909 DATAREST-756 - Release version 2.5 M1 (Hopper). 2016-02-12 15:42:47 +01:00
Oliver Gierke
c49754ebb3 DATAREST-747 - ProjectionDefinitionConfiguration now returns the most concrete projection.
In case multiple projections are defined with a given name, we now return the projection defined for the most concrete type match.
2016-01-11 19:26:54 +01:00
Oliver Gierke
3ce10774d8 DATAREST-741 - UriToEntityDeserializer now uses RepositoryInvoker directly.
UriToEntityDeserializer now uses the RepositoryInvokerFactory to resolve entity instances directly to make sure potentially registered EntityLookup instances are considered for the lookup.
2016-01-06 14:17:42 +01:00
Oliver Gierke
482c78c925 DATAREST-724 - Fixed invocation of DELETE on item resource with entity lookup present.
Tweaked the RepositoryEntityController to lookup the identifier of the entity to be deleted from the entity obtained rather than forwarding the given id directly. This makes sure we use the real entity identifier on calls to delete in case the one to be used in URIs is customized via an EntityLookup.
2016-01-05 12:47:47 +01:00
Oliver Gierke
414f314684 DATAREST-723 - PropertyMappings now get eagerly initialized.
Switched to eager initialization of PropertyMappings to avoid potential ConcurrentModificationException.
2015-12-16 16:28:12 +01:00
Oliver Gierke
3a66bc75e2 DATAREST-724 - Added configuration API for entity lookup customizations.
RepositoryRestConfiguration now exposes a withCustomEntityLookup() returning an EntityLookupRegistrar that allows to define customizations as follows on Java 8:

config.withCustomEntityLookup()
  .forRepository(UserRepository.class)
  .withIdMapping(User::getUsername)
  .withLookup(UserRepository::findByUsername);

or even abbreviated to:

config.withCustomEntityLookup()
  .forRepository(UserRepository.class, User::getUsername, UserRepository::findByUsername);

The API basically takes two lambdas or method references to define the id mapping (User::getUsername in this case) as well as the lookup call based on the repository type with which the customization builder was set up in the first place (UserRepository::findByUsername in this case).
2015-12-09 16:00:32 +01:00
Oliver Gierke
44ab756873 DATAREST-724 - Added support for customizing the property to be used for URI generation.
Spring Data REST now exposes an EntityLookup interface that allows to customize the property of an entity that shall be used to create item resource URIs. By default this mechanism uses the backend identifier and uses the repository's findOne(…) method.

The EntityLookup now exposes one method to return the property value to be used for URI generation as well as one method to obtain the entity instance from the very same raw identifier value. The EntityLookups are registered with both the SelfLinkProvider (for link creation) and the RepositoryInvoker (to obtain the entity instance).
2015-12-09 12:42:15 +01:00