Top Description Methods
org.springframework.web.method.support

public Interface UriComponentsContributor

Known Direct Implementers
org.springframework.web.method.annotation.RequestParamMethodArgumentResolver, org.springframework.web.method.support.CompositeUriComponentsContributor
Imports
java.util.Map, org.springframework.core.MethodParameter, org.springframework.core.convert.ConversionService, org.springframework.web.util.UriComponents, .UriComponentsBuilder

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.
Authors
Oliver Gierke, Rossen Stoyanchev
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public void
contributeMethodArgument(MethodParameter
the controller method parameter (never null)
parameter
,
Object
the argument value (possibly null)
value
,
UriComponentsBuilder
the builder to update (never null)
builder
,
Map<String, Object>
a map to add URI variables to (never null)
uriVariables
,
ConversionService
a ConversionService to format values as Strings
conversionService
)

Process the given method argument and either update the UriComponentsBuilder or add to the map with URI variables to use to expand the URI after all arguments are processed.

public boolean
supportsParameter(MethodParameter parameter)

Whether this contributor supports the given method parameter.

Method Detail

contributeMethodArgumentback to summary
public void contributeMethodArgument(MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String, Object> uriVariables, ConversionService conversionService)

Process the given method argument and either update the UriComponentsBuilder or add to the map with URI variables to use to expand the URI after all arguments are processed.

Parameters
parameter:MethodParameter

the controller method parameter (never null)

value:Object

the argument value (possibly null)

builder:UriComponentsBuilder

the builder to update (never null)

uriVariables:Map<String, Object>

a map to add URI variables to (never null)

conversionService:ConversionService

a ConversionService to format values as Strings

supportsParameterback to summary
public boolean supportsParameter(MethodParameter parameter)

Whether this contributor supports the given method parameter.