Interface UriComponentsContributor
- All Known Implementing Classes:
CompositeUriComponentsContributor
,PathVariableMethodArgumentResolver
,RequestParamMethodArgumentResolver
public interface UriComponentsContributor
Strategy for contributing to the building of a
UriComponents
by
looking at a method parameter and an argument value and deciding what
part of the target URL should be updated.- Since:
- 4.0
- Author:
- Oliver Gierke, Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contributeMethodArgument
(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String, Object> uriVariables, ConversionService conversionService) Process the given method argument and either update theUriComponentsBuilder
or add to the map with URI variables to use to expand the URI after all arguments are processed.boolean
supportsParameter
(MethodParameter parameter) Whether this contributor supports the given method parameter.
-
Method Details
-
supportsParameter
Whether this contributor supports the given method parameter. -
contributeMethodArgument
void contributeMethodArgument(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String, Object> uriVariables, ConversionService conversionService) Process the given method argument and either update theUriComponentsBuilder
or add to the map with URI variables to use to expand the URI after all arguments are processed.- Parameters:
parameter
- the controller method parameter (nevernull
)value
- the argument value (possiblynull
)builder
- the builder to update (nevernull
)uriVariables
- a map to add URI variables to (nevernull
)conversionService
- a ConversionService to format values as Strings
-