类 AbstractUriTemplateHandler
java.lang.Object
cn.taketoday.web.util.AbstractUriTemplateHandler
- 所有已实现的接口:
UriTemplateHandler
- 直接已知子类:
DefaultUriTemplateHandler
Abstract base class for
UriTemplateHandler implementations.
Support setBaseUrl(java.lang.String) and setDefaultUriVariables(java.util.Map<java.lang.String, ?>) properties
that should be relevant regardless of the URI template expand and encode
mechanism used in sub-classes.
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Expand the given URI template with an array of URI variables.Expand the given URI template with a map of URI variables.protected abstract URIexpandInternal(String uriTemplate, Object... uriVariables) Actually expand and encode the URI template.protected abstract URIexpandInternal(String uriTemplate, Map<String, ?> uriVariables) Actually expand and encode the URI template.Return the configured base URL.Return a read-only copy of the configured default URI variables.private URIinsertBaseUrl(URI url) Insert a base URL (if configured) unless the given URL has a host already.voidsetBaseUrl(String baseUrl) Configure a base URL to prepend URI templates with.voidsetDefaultUriVariables(Map<String, ?> defaultUriVariables) Configure default URI variable values to use with every expanded URI template.
-
字段详细资料
-
baseUrl
-
defaultUriVariables
-
-
构造器详细资料
-
AbstractUriTemplateHandler
public AbstractUriTemplateHandler()
-
-
方法详细资料
-
setBaseUrl
Configure a base URL to prepend URI templates with. The base URL must have a scheme and host but may optionally contain a port and a path. The base URL must be fully expanded and encoded which can be done viaUriComponentsBuilder.- 参数:
baseUrl- the base URL.
-
getBaseUrl
Return the configured base URL. -
setDefaultUriVariables
Configure default URI variable values to use with every expanded URI template. These default values apply only when expanding with a Map, and not with an array, where the Map supplied toexpand(String, Map)can override the default values.- 参数:
defaultUriVariables- the default URI variable values
-
getDefaultUriVariables
Return a read-only copy of the configured default URI variables. -
expand
从接口复制的说明:UriTemplateHandlerExpand the given URI template with a map of URI variables.- 指定者:
expand在接口中UriTemplateHandler- 参数:
uriTemplate- the URI templateuriVariables- variable values- 返回:
- the created URI instance
-
expand
从接口复制的说明:UriTemplateHandlerExpand the given URI template with an array of URI variables.- 指定者:
expand在接口中UriTemplateHandler- 参数:
uriTemplate- the URI templateuriVariables- variable values- 返回:
- the created URI instance
-
expandInternal
Actually expand and encode the URI template. -
expandInternal
Actually expand and encode the URI template. -
insertBaseUrl
Insert a base URL (if configured) unless the given URL has a host already.
-