Class TypedEntityLinks.ExtendedTypedEntityLinks<T>

java.lang.Object
org.springframework.hateoas.server.TypedEntityLinks<T>
org.springframework.hateoas.server.TypedEntityLinks.ExtendedTypedEntityLinks<T>
Enclosing class:
TypedEntityLinks<T>

public static class TypedEntityLinks.ExtendedTypedEntityLinks<T> extends TypedEntityLinks<T>
Extension of TypedEntityLinks that exposes the ability to create links to collection resources as well.
Author:
Oliver Drotbohm
  • Method Details

    • linkToCollectionResource

      public Link linkToCollectionResource()
      Creates a Link pointing to the collection resource of the configured type. The relation type of the link will be determined by the implementation class and should be defaulted to IanaLinkRelations.SELF.
      Returns:
      the Link pointing to the collection resource exposed for the configured entity type. Will never be null.
      Throws:
      IllegalArgumentException - in case the given type is unknown the entity links infrastructure.