public class DefaultCurieProvider extends Object implements CurieProvider
CurieProvider
rendering a single configurable UriTemplate
based curie.Modifier and Type | Class and Description |
---|---|
protected static class |
DefaultCurieProvider.Curie
Value object to get the curie
Link rendered in JSON. |
Constructor and Description |
---|
DefaultCurieProvider(String name,
UriTemplate uriTemplate)
Creates a new
DefaultCurieProvider for the given name and UriTemplate . |
Modifier and Type | Method and Description |
---|---|
Collection<? extends Object> |
getCurieInformation(Links links)
Returns an object to render as the base curie information.
|
String |
getNamespacedRelFor(String rel)
Returns the rel to be rendered for the given rel.
|
String |
getNamespacedRelFrom(Link link)
Returns the rel to be rendered for the given
Link . |
public DefaultCurieProvider(String name, UriTemplate uriTemplate)
DefaultCurieProvider
for the given name and UriTemplate
.name
- must not be null or empty.uriTemplate
- must not be null and contain exactly one template variable.public Collection<? extends Object> getCurieInformation(Links links)
CurieProvider
getCurieInformation
in interface CurieProvider
links
- the Links
that have been added to the response so far.public String getNamespacedRelFrom(Link link)
CurieProvider
Link
. Will potentially prefix the rel but also might decide
not to, depending on the actual rel.getNamespacedRelFrom
in interface CurieProvider
public String getNamespacedRelFor(String rel)
CurieProvider
getNamespacedRelFor
in interface CurieProvider
Copyright © 2012-2015–2015 Pivotal, Inc.. All rights reserved.