Class ItemLinksBuilder


  • public final class ItemLinksBuilder
    extends java.lang.Object
    Convenient ItemLinks object builder.
    Author:
    Dmitry Kornilov
    Since:
    EclipseLink 2.6.0
    • Constructor Detail

      • ItemLinksBuilder

        public ItemLinksBuilder()
    • Method Detail

      • addSelf

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

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

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

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

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

        public ItemLinksBuilder addAlternate​(java.lang.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​(java.lang.String href)
        Adds a 'describes' link.
        Parameters:
        href - 'describes' link
        Returns:
        ItemLinksBuilder with added 'describes' link.
      • addDescribedBy

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

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

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

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

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

        public ItemLinksBuilder addExecute​(java.lang.String href,
                                           java.lang.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 java.util.List<org.eclipse.persistence.internal.jpa.rs.metadata.model.LinkV2> getList()
        Returns a list of links.
        Returns:
        list of links.