public class TypedEntityLinks<T> extends Object
Link
s and LinkBuilder
instances based on an identifier function.EntityLinks.forType(Function)
,
EntityLinks.forType(Class, Function)
Modifier and Type | Class and Description |
---|---|
static class |
TypedEntityLinks.ExtendedTypedEntityLinks<T>
Extension of
TypedEntityLinks that exposes the ability to create links to collection resources as well. |
Modifier and Type | Method and Description |
---|---|
LinkBuilder |
linkForItemResource(T entity)
Returns a
LinkBuilder able to create links to the controller managing the given entity. |
Link |
linkToItemResource(T entity)
Creates a
Link pointing to item resource backing the given entity. |
public LinkBuilder linkForItemResource(T entity)
LinkBuilder
able to create links to the controller managing the given entity. Implementations
will know about the URI structure being used to expose item-resource URIs.type
- the entity to point to, must not be null.LinkBuilder
pointing to the item resource identified by the given entity. Will never be
null.IllegalArgumentException
- in case the given type is unknown the entity links infrastructure.public Link linkToItemResource(T entity)
Link
pointing to item resource backing the given entity. The relation type of the link will be
determined by the implementation class and should be defaulted to IanaLinkRelations.SELF
.type
- the entity to point to, must not be null.Link
pointing to the resource exposed for the given entity. Will never be null.IllegalArgumentException
- in case the given type is unknown the entity links infrastructure.Copyright © 2011–2021 VMware, Inc.. All rights reserved.