|
Spring Hateoas | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.hateoas.UriTemplate
public class UriTemplate
Custom URI template to support qualified URI template variables.
http://tools.ietf.org/html/rfc6570,
Serialized Form| Constructor Summary | |
|---|---|
UriTemplate(String template)
Creates a new UriTemplate using the given template string. |
|
UriTemplate(String baseUri,
TemplateVariables variables)
Creates a new UriTemplate from the given base URI and TemplateVariables. |
|
| Method Summary | |
|---|---|
URI |
expand(Map<String,? extends Object> parameters)
Expands the UriTemplate using the given parameters. |
URI |
expand(Object... parameters)
Expands the UriTemplate using the given parameters. |
List<String> |
getVariableNames()
Returns the names of the variables discovered. |
List<TemplateVariable> |
getVariables()
Returns the TemplateVariables discovered. |
static boolean |
isTemplate(String candidate)
Returns whether the given candidate is a URI template. |
Iterator<TemplateVariable> |
iterator()
|
String |
toString()
|
UriTemplate |
with(TemplateVariables variables)
Creates a new UriTemplate with the current TemplateVariables augmented with the given ones. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UriTemplate(String template)
UriTemplate using the given template string.
template - must not be null or empty.
public UriTemplate(String baseUri,
TemplateVariables variables)
UriTemplate from the given base URI and TemplateVariables.
baseUri - must not be null or empty.variables - defaults to TemplateVariables.NONE.| Method Detail |
|---|
public UriTemplate with(TemplateVariables variables)
UriTemplate with the current TemplateVariables augmented with the given ones.
variables - can be null.
public static boolean isTemplate(String candidate)
candidate -
public List<TemplateVariable> getVariables()
TemplateVariables discovered.
public List<String> getVariableNames()
public URI expand(Object... parameters)
UriTemplate using the given parameters. The values will be applied in the order of the
variables discovered.
parameters -
expand(Map)public URI expand(Map<String,? extends Object> parameters)
UriTemplate using the given parameters.
parameters - must not be null.
public Iterator<TemplateVariable> iterator()
iterator in interface Iterable<TemplateVariable>public String toString()
toString in class Object
|
Spring Hateoas | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||