public interface LinkBuilder
Link instances.| Modifier and Type | Method and Description |
|---|---|
LinkBuilder |
slash(Identifiable<?> identifiable)
Adds the given
Identifiable's id as sub-resource. |
LinkBuilder |
slash(Object object)
Adds the given object's
String representation as sub-resource to the current URI. |
URI |
toUri()
Creates a URI of the link built by the current builder instance.
|
Link |
withRel(String rel)
Creates the
Link built by the current builder instance with the given rel. |
Link |
withSelfRel()
Creates the
Link built by the current builder instance with the default self rel. |
LinkBuilder slash(Object object)
String representation as sub-resource to the current URI. Will unwrap
Identifiables to their id value (see Identifiable.getId()).object - LinkBuilder slash(Identifiable<?> identifiable)
Identifiable's id as sub-resource. Will simply return the LinkBuilder as is if the
given entity is null.identifiable - URI toUri()
Link withRel(String rel)
Link built by the current builder instance with the given rel.rel - must not be null or empty.Link withSelfRel()
Link built by the current builder instance with the default self rel.Link.REL_SELFCopyright © 2012-2016–2017 Pivotal, Inc.. All rights reserved.