类 CompositeUriComponentsContributor
java.lang.Object
cn.taketoday.web.handler.method.support.CompositeUriComponentsContributor
- 所有已实现的接口:
UriComponentsContributor
A
UriComponentsContributor containing a list of other contributors
to delegate to and also encapsulating a specific ConversionService to
use for formatting method argument values as Strings.- 从以下版本开始:
- 4.0 2022/4/7 22:03
- 作者:
- Rossen Stoyanchev, Juergen Hoeller, Sam Brannen, Harry Yang
-
字段概要
字段修饰符和类型字段说明private final cn.taketoday.core.conversion.ConversionService -
构造器概要
构造器构造器说明CompositeUriComponentsContributor(UriComponentsContributor... contributors) Create an instance from a collection ofUriComponentsContributorsorParameterResolvingStrategies.CompositeUriComponentsContributor(Collection<?> contributors) Create an instance from a collection ofUriComponentsContributorsorParameterResolvingStrategies.CompositeUriComponentsContributor(Collection<?> contributors, cn.taketoday.core.conversion.ConversionService cs) Create an instance from a collection ofUriComponentsContributorsorParameterResolvingStrategies. -
方法概要
修饰符和类型方法说明voidcontributeMethodArgument(cn.taketoday.core.MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String, Object> uriVariables) An overloaded method that uses the ConversionService created at construction.voidcontributeMethodArgument(cn.taketoday.core.MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String, Object> uriVariables, cn.taketoday.core.conversion.ConversionService conversionService) Process the given method argument and either update theUriComponentsBuilderor add to the map with URI variables to use to expand the URI after all arguments are processed.booleanDetermine if thisCompositeUriComponentsContributorhas any contributors.booleansupportsParameter(cn.taketoday.core.MethodParameter parameter) Whether this contributor supports the given method parameter.
-
字段详细资料
-
contributors
-
conversionService
private final cn.taketoday.core.conversion.ConversionService conversionService
-
-
构造器详细资料
-
CompositeUriComponentsContributor
Create an instance from a collection ofUriComponentsContributorsorParameterResolvingStrategies. Since both of these tend to be implemented by the same class, the most convenient option is to obtain the configuredParameterResolvingStrategiesinRequestMappingHandlerAdapterand provide that to this constructor.- 参数:
contributors- a collection ofUriComponentsContributororParameterResolvingStrategies
-
CompositeUriComponentsContributor
Create an instance from a collection ofUriComponentsContributorsorParameterResolvingStrategies. Since both of these tend to be implemented by the same class, the most convenient option is to obtain the configuredParameterResolvingStrategiesinRequestMappingHandlerAdapterand provide that to this constructor.- 参数:
contributors- a collection ofUriComponentsContributororParameterResolvingStrategies
-
CompositeUriComponentsContributor
public CompositeUriComponentsContributor(@Nullable Collection<?> contributors, @Nullable cn.taketoday.core.conversion.ConversionService cs) Create an instance from a collection ofUriComponentsContributorsorParameterResolvingStrategies. Since both of these tend to be implemented by the same class, the most convenient option is to obtain the configuredParameterResolvingStrategiesin theRequestMappingHandlerAdapterand provide that to this constructor.If the
ConversionServiceargument isnull,DefaultFormattingConversionServicewill be used by default.- 参数:
contributors- a collection ofUriComponentsContributororParameterResolvingStrategiescs- a ConversionService to use when method argument values need to be formatted as Strings before being added to the URI
-
-
方法详细资料
-
hasContributors
public boolean hasContributors()Determine if thisCompositeUriComponentsContributorhas any contributors.- 返回:
trueif thisCompositeUriComponentsContributorwas created with contributors to delegate to
-
supportsParameter
public boolean supportsParameter(cn.taketoday.core.MethodParameter parameter) 从接口复制的说明:UriComponentsContributorWhether this contributor supports the given method parameter.- 指定者:
supportsParameter在接口中UriComponentsContributor
-
contributeMethodArgument
public void contributeMethodArgument(cn.taketoday.core.MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String, Object> uriVariables, cn.taketoday.core.conversion.ConversionService conversionService) 从接口复制的说明:UriComponentsContributorProcess the given method argument and either update theUriComponentsBuilderor add to the map with URI variables to use to expand the URI after all arguments are processed.- 指定者:
contributeMethodArgument在接口中UriComponentsContributor- 参数:
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
-
contributeMethodArgument
public void contributeMethodArgument(cn.taketoday.core.MethodParameter parameter, Object value, UriComponentsBuilder builder, Map<String, Object> uriVariables) An overloaded method that uses the ConversionService created at construction.
-