Interface LinkBuilder
- All Known Implementing Classes:
BasicLinkBuilder
,LinkBuilderSupport
,TemplateVariableAwareLinkBuilderSupport
,WebFluxLinkBuilder
,WebMvcLinkBuilder
public interface LinkBuilder
Builder to ease building
Link
instances.- Author:
- Ricardo Gladwell, Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionAdds the given object'sString
representation as sub-resource to the current URI.toUri()
Creates a URI of the link built by the current builder instance.default Link
Creates theLink
built by the current builder instance with the given link relation.withRel
(LinkRelation rel) Creates theLink
built by the current builder instance with the givenLinkRelation
.Creates theLink
built by the current builder instance with the default self link relation.
-
Method Details
-
slash
Adds the given object'sString
representation as sub-resource to the current URI.- Parameters:
object
- can be null.- Returns:
-
toUri
URI toUri()Creates a URI of the link built by the current builder instance.- Returns:
-
withRel
Creates theLink
built by the current builder instance with the given link relation.- Parameters:
rel
- must not be null.- Returns:
-
withRel
Creates theLink
built by the current builder instance with the givenLinkRelation
.- Parameters:
rel
- must not be null or empty.- Returns:
-
withSelfRel
Link withSelfRel()Creates theLink
built by the current builder instance with the default self link relation.- Returns:
- See Also:
-