DATAREST-502 - Prepare request parameters to enable URI-to-entity resolution for executing searches.

RepositorySearchController now takes all request parameters as MultiValueMap to execute query methods. For parameters mapping to a managed resource we try to interpret the given parameter value as URI to actually trigger the URI-to-entity resolution through the newly registered UriToEntityConverter.

The latter is now registered with the default ConversionService registered so that it's

A lot of cleanups in RepositorySearchController. Removed some obsolete prints to the console to reduce log output during test execution.

Related ticket: DATACMNS-678.
This commit is contained in:
Oliver Gierke
2015-04-07 17:01:14 +02:00
parent e741f90378
commit 1bb228df17
7 changed files with 124 additions and 29 deletions

View File

@@ -81,7 +81,7 @@ public class UriToEntityConverter implements ConditionalGenericConverter {
*/
@Override
public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) {
return conversionService.canConvert(STRING_TYPE, targetType);
return !sourceType.equals(URI_TYPE) ? false : conversionService.canConvert(STRING_TYPE, targetType);
}
/*