public class RootUriTemplateHandler extends Object implements UriTemplateHandler
UriTemplateHandler
to set the root for URI that starts with '/'
.Modifier | Constructor and Description |
---|---|
|
RootUriTemplateHandler(String rootUri)
Create a new
RootUriTemplateHandler instance. |
|
RootUriTemplateHandler(String rootUri,
UriTemplateHandler handler)
Create a new
RootUriTemplateHandler instance. |
protected |
RootUriTemplateHandler(UriTemplateHandler handler) |
Modifier and Type | Method and Description |
---|---|
static RootUriTemplateHandler |
addTo(RestTemplate restTemplate,
String rootUri)
Add a
RootUriTemplateHandler instance to the given RestTemplate . |
URI |
expand(String uriTemplate,
Map<String,?> uriVariables) |
URI |
expand(String uriTemplate,
Object... uriVariables) |
String |
getRootUri() |
protected RootUriTemplateHandler(UriTemplateHandler handler)
public RootUriTemplateHandler(String rootUri)
RootUriTemplateHandler
instance.rootUri
- the root URI to be used to prefix relative URLspublic RootUriTemplateHandler(String rootUri, UriTemplateHandler handler)
RootUriTemplateHandler
instance.rootUri
- the root URI to be used to prefix relative URLshandler
- the delegate handlerpublic URI expand(String uriTemplate, Map<String,?> uriVariables)
expand
in interface UriTemplateHandler
public URI expand(String uriTemplate, Object... uriVariables)
expand
in interface UriTemplateHandler
public String getRootUri()
public static RootUriTemplateHandler addTo(RestTemplate restTemplate, String rootUri)
RootUriTemplateHandler
instance to the given RestTemplate
.restTemplate
- the RestTemplate
to add the handler torootUri
- the root URIRootUriTemplateHandler
.Copyright © 2021 Pivotal Software, Inc.. All rights reserved.