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:
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user