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 Type
    Method
    Description
    slash(Object object)
    Adds the given object's String representation as sub-resource to the current URI.
    Creates a URI of the link built by the current builder instance.
    default Link
    Creates the Link built by the current builder instance with the given link relation.
    Creates the Link built by the current builder instance with the given LinkRelation.
    Creates the Link built by the current builder instance with the default self link relation.
  • Method Details

    • slash

      LinkBuilder slash(@Nullable Object object)
      Adds the given object's String 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

      default Link withRel(String rel)
      Creates the Link built by the current builder instance with the given link relation.
      Parameters:
      rel - must not be null.
      Returns:
    • withRel

      Link withRel(LinkRelation rel)
      Creates the Link built by the current builder instance with the given LinkRelation.
      Parameters:
      rel - must not be null or empty.
      Returns:
    • withSelfRel

      Link withSelfRel()
      Creates the Link built by the current builder instance with the default self link relation.
      Returns:
      See Also: