Package org.springframework.web.util
Class AbstractUriTemplateHandler
- java.lang.Object
- org.springframework.web.util.AbstractUriTemplateHandler
- All Implemented Interfaces:
UriTemplateHandler
- Direct Known Subclasses:
DefaultUriTemplateHandler
@Deprecated public abstract class AbstractUriTemplateHandler extends Object implements UriTemplateHandler
Deprecated.as of 5.0 in favor ofDefaultUriBuilderFactoryAbstract base class forUriTemplateHandlerimplementations.Support
setBaseUrl(java.lang.String)andsetDefaultUriVariables(java.util.Map<java.lang.String, ?>)properties that should be relevant regardless of the URI template expand and encode mechanism used in sub-classes.- Since:
- 4.3
- Author:
- Rossen Stoyanchev
Constructor Summary
Constructors Constructor Description AbstractUriTemplateHandler()Deprecated.
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description URIexpand(String uriTemplate, Object... uriVariables)Deprecated.Expand the given URI template with an array of URI variables.URIexpand(String uriTemplate, Map<String,?> uriVariables)Deprecated.Expand the given URI template with a map of URI variables.protected abstract URIexpandInternal(String uriTemplate, Object... uriVariables)Deprecated.Actually expand and encode the URI template.protected abstract URIexpandInternal(String uriTemplate, Map<String,?> uriVariables)Deprecated.Actually expand and encode the URI template.StringgetBaseUrl()Deprecated.Return the configured base URL.Map<String,?>getDefaultUriVariables()Deprecated.Return a read-only copy of the configured default URI variables.voidsetBaseUrl(String baseUrl)Deprecated.Configure a base URL to prepend URI templates with.voidsetDefaultUriVariables(Map<String,?> defaultUriVariables)Deprecated.Configure default URI variable values to use with every expanded URI template.
Constructor Detail
AbstractUriTemplateHandler
public AbstractUriTemplateHandler()
Deprecated.
Method Detail
setBaseUrl
public void setBaseUrl(@Nullable String baseUrl)
Deprecated.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.- Parameters:
baseUrl- the base URL.
getBaseUrl
@Nullable public String getBaseUrl()
Deprecated.Return the configured base URL.
setDefaultUriVariables
public void setDefaultUriVariables(@Nullable Map<String,?> defaultUriVariables)
Deprecated.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.- Parameters:
defaultUriVariables- the default URI variable values- Since:
- 4.3
getDefaultUriVariables
public Map<String,?> getDefaultUriVariables()
Deprecated.Return a read-only copy of the configured default URI variables.
expand
public URI expand(String uriTemplate, Map<String,?> uriVariables)
Deprecated.Description copied from interface:UriTemplateHandlerExpand the given URI template with a map of URI variables.- Specified by:
expandin interfaceUriTemplateHandler- Parameters:
uriTemplate- the URI templateuriVariables- variable values- Returns:
- the created URI instance
expand
public URI expand(String uriTemplate, Object... uriVariables)
Deprecated.Description copied from interface:UriTemplateHandlerExpand the given URI template with an array of URI variables.- Specified by:
expandin interfaceUriTemplateHandler- Parameters:
uriTemplate- the URI templateuriVariables- variable values- Returns:
- the created URI instance
expandInternal
protected abstract URI expandInternal(String uriTemplate, Map<String,?> uriVariables)
Deprecated.Actually expand and encode the URI template.
expandInternal
protected abstract URI expandInternal(String uriTemplate, Object... uriVariables)
Deprecated.Actually expand and encode the URI template.