Class HalLinks.Builder

java.lang.Object
com.helixframework.api.contract.HalLinks.Builder
Enclosing class:
HalLinks

public static final class HalLinks.Builder extends Object
  • Method Details

    • link

      public HalLinks.Builder link(String rel, HalLink link)
      Adds a link with the given relation.
      Parameters:
      rel - the link relation (e.g., "self", "next", "update")
      link - the HalLink instance
      Returns:
      this builder instance
    • link

      public HalLinks.Builder link(String rel, String href)
      Convenience overload for directly creating a link by href.
      Parameters:
      rel - the link relation
      href - the link href
      Returns:
      this builder instance
    • link

      public HalLinks.Builder link(String rel, String href, HalLink.HttpMethod method)
      Convenience overload for href + method.
      Parameters:
      rel - the link relation
      href - the link href
      method - HTTP method
      Returns:
      this builder instance
    • link

      public HalLinks.Builder link(String rel, String href, String method)
      Convenience overload for href + method.
      Parameters:
      rel - the link relation
      href - the link href
      method - HTTP method
      Returns:
      this builder instance
    • build

      public HalLinks build()
      Builds and returns a new immutable HalLinks instance.
      Returns:
      a new HalLinks instance