Class ItemLinksBuilder

java.lang.Object
org.eclipse.persistence.jpa.rs.features.ItemLinksBuilder

public final class ItemLinksBuilder extends Object
Convenient ItemLinks object builder.
Author:
Dmitry Kornilov
  • Constructor Details

    • ItemLinksBuilder

      public ItemLinksBuilder()
  • Method Details

    • addSelf

      public ItemLinksBuilder addSelf(String href)
      Adds a 'self' link.
      Parameters:
      href - 'self' link
      Returns:
      ItemLinksBuilder with added 'self' link.
    • addCanonical

      public ItemLinksBuilder addCanonical(String href)
      Adds a 'canonical' link.
      Parameters:
      href - 'canonical' link
      Returns:
      ItemLinksBuilder with added 'canonical' link.
    • addCanonical

      public ItemLinksBuilder addCanonical(String href, String mediaType)
      Adds a 'canonical' link.
      Parameters:
      href - 'canonical' link
      mediaType - media type
      Returns:
      ItemLinksBuilder with added 'canonical' link.
    • addNext

      public ItemLinksBuilder addNext(String href)
      Adds a 'next' link.
      Parameters:
      href - 'next' link
      Returns:
      ItemLinksBuilder with added 'next' link.
    • addPrev

      public ItemLinksBuilder addPrev(String href)
      Adds a 'prev' link.
      Parameters:
      href - 'prev' link
      Returns:
      ItemLinksBuilder with added 'prev' link.
    • addAlternate

      public ItemLinksBuilder addAlternate(String href)
      Adds a 'alternate' link. Alternate links always have "application/schema+json" media type.
      Parameters:
      href - 'alternate' link
      Returns:
      ItemLinksBuilder with added 'alternate' link.
    • addDescribes

      public ItemLinksBuilder addDescribes(String href)
      Adds a 'describes' link.
      Parameters:
      href - 'describes' link
      Returns:
      ItemLinksBuilder with added 'describes' link.
    • addDescribedBy

      public ItemLinksBuilder addDescribedBy(String href)
      Adds a 'describedBy' link.
      Parameters:
      href - 'describedBy' link
      Returns:
      ItemLinksBuilder with added 'describedBy' link.
    • addCreate

      public ItemLinksBuilder addCreate(String href)
      Adds a 'create' link.
      Parameters:
      href - 'create' link
      Returns:
      ItemLinksBuilder with added 'create' link.
    • addFind

      public ItemLinksBuilder addFind(String href)
      Adds a 'find' link.
      Parameters:
      href - 'find' link
      Returns:
      ItemLinksBuilder with added 'find' link.
    • addUpdate

      public ItemLinksBuilder addUpdate(String href)
      Adds a 'update' link.
      Parameters:
      href - 'update' link
      Returns:
      ItemLinksBuilder with added 'update' link.
    • addDelete

      public ItemLinksBuilder addDelete(String href)
      Adds a 'delete' link.
      Parameters:
      href - 'delete' link
      Returns:
      ItemLinksBuilder with added 'delete' link.
    • addExecute

      public ItemLinksBuilder addExecute(String href, String method)
      Adds a 'execute' link.
      Parameters:
      href - 'execute' link
      method - GET/POST etc.
      Returns:
      ItemLinksBuilder with added 'execute' link.
    • build

      public org.eclipse.persistence.internal.jpa.rs.metadata.model.ItemLinks build()
      Builds ItemLinks object.
      Returns:
      ItemLinks object.
    • getList

      public List<org.eclipse.persistence.internal.jpa.rs.metadata.model.LinkV2> getList()
      Returns a list of links.
      Returns:
      list of links.