Class RepositoryEntityLinks

java.lang.Object
org.springframework.hateoas.server.core.AbstractEntityLinks
org.springframework.data.rest.webmvc.support.RepositoryEntityLinks
All Implemented Interfaces:
EntityLinks, org.springframework.plugin.core.Plugin<Class<?>>

public class RepositoryEntityLinks extends AbstractEntityLinks
EntityLinks implementation that is able to create Link for domain classes managed by Spring Data REST.
Author:
Jon Brisbin, Oliver Gierke
  • Constructor Details

  • Method Details

    • supports

      public boolean supports(Class<?> delimiter)
    • linkFor

      public LinkBuilder linkFor(Class<?> type)
    • linkFor

      public LinkBuilder linkFor(Class<?> type, Object... parameters)
    • linkToPagedResource

      public Link linkToPagedResource(Class<?> type, Pageable pageable)
      Returns the link to to the paged colelction resource for the given type, pre-expanding the
      Parameters:
      type - must not be null.
      pageable - the pageable to can be null.
      Returns:
    • linkToCollectionResource

      public Link linkToCollectionResource(Class<?> type)
    • linkToItemResource

      public Link linkToItemResource(Class<?> type, Object id)
    • linkForItemResource

      public LinkBuilder linkForItemResource(Class<?> type, Object id)
      Specified by:
      linkForItemResource in interface EntityLinks
      Overrides:
      linkForItemResource in class AbstractEntityLinks
    • linksToSearchResources

      public Links linksToSearchResources(Class<?> type)
      Returns all links to search resource for the given type.
      Parameters:
      type - must not be null.
      Returns:
      Since:
      2.3
    • linksToSearchResources

      public Links linksToSearchResources(Class<?> type, Pageable pageable)
      Returns all link to search resources for the given type, pre-expanded with the given Pageable if applicable.
      Parameters:
      type - must not be null.
      pageable - can be null.
      Returns:
      Since:
      2.3
    • linksToSearchResources

      public Links linksToSearchResources(Class<?> type, Sort sort)
      Returns all link to search resources for the given type, pre-expanded with the given Sort if applicable.
      Parameters:
      type - must not be null.
      sort - can be null.
      Returns:
      Since:
      2.3
    • linkToSearchResource

      public Link linkToSearchResource(Class<?> domainType, LinkRelation relation)
      Creates the link to the search resource with the given LinkRelation for a given type.
      Parameters:
      domainType - must not be null.
      relation - must not be null.
      Returns:
      Since:
      2.3
    • linkToSearchResource

      public Link linkToSearchResource(Class<?> domainType, LinkRelation relation, Pageable pageable)
      Creates the link to the search resource with the given LinkRelation for a given type. Uses the given Pageable to pre-expand potentially available template variables.
      Parameters:
      domainType - must not be null.
      relation - must not be null.
      pageable - can be null.
      Returns:
      Since:
      2.3
    • linkToSearchResource

      public Link linkToSearchResource(Class<?> domainType, LinkRelation relation, Sort sort)
      Creates the link to the search resource with the given LinkRelation for a given type. Uses the given Sort to pre-expand potentially available template variables.
      Parameters:
      domainType - must not be null.
      relation - must not be null.
      sort - can be null.
      Returns:
      Since:
      2.3