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
Identifiable
s 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_SELF
Copyright © 2012-2015–2015 Pivotal, Inc.. All rights reserved.