public abstract class AbstractEntityLinks extends Object implements EntityLinks
EntityLinks
by delegating to the more fine
grained ones to reduce the implementation effort for actual implementation classes.Constructor and Description |
---|
AbstractEntityLinks() |
Modifier and Type | Method and Description |
---|---|
LinkBuilder |
linkForSingleResource(Class<?> type,
Object id)
Returns a
LinkBuilder able to create links to the controller managing the given entity type and id. |
LinkBuilder |
linkForSingleResource(Identifiable<?> entity)
Returns a
LinkBuilder able to create links to the controller managing the given entity. |
Link |
linkToSingleResource(Identifiable<?> entity)
Creates a
Link pointing to single resource backing the given entity. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
linkFor, linkFor, linkToCollectionResource, linkToSingleResource
public Link linkToSingleResource(Identifiable<?> entity)
EntityLinks
Link
pointing to single resource backing the given entity. The relation type of the link will be
determined by the implementation class and should be defaulted to Link.REL_SELF
.linkToSingleResource
in interface EntityLinks
entity
- the entity type to point to, must not be null.Link
pointing to the resource exposed for the given entity. Will never be null.public LinkBuilder linkForSingleResource(Class<?> type, Object id)
EntityLinks
LinkBuilder
able to create links to the controller managing the given entity type and id.
Implementations will know about the URI structure being used to expose single-resource URIs.linkForSingleResource
in interface EntityLinks
type
- the entity type to point to, must not be null.id
- the id of the object of the handed type, Identifiable
s will be unwrapped.LinkBuilder
pointing to the single resource identified by the given type and id. Will never be
null.public LinkBuilder linkForSingleResource(Identifiable<?> entity)
EntityLinks
LinkBuilder
able to create links to the controller managing the given entity.linkForSingleResource
in interface EntityLinks
entity
- the entity type to point to, must not be null.LinkBuilder
pointing the given entity. Will never be null.EntityLinks.linkForSingleResource(Class, Object)
Copyright © 2012-2015–2015 Pivotal, Inc.. All rights reserved.