public class DefaultSelfLinkProvider extends Object implements SelfLinkProvider
EntityLinks instance to create self links. Considers
the configured EntityLookups to use the returned resource identifier to eventually create the link.| Constructor and Description |
|---|
DefaultSelfLinkProvider(PersistentEntities entities,
org.springframework.hateoas.server.EntityLinks entityLinks,
List<? extends EntityLookup<?>> lookups,
ConversionService conversionService)
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.hateoas.Link |
createSelfLinkFor(Class<?> type,
Object reference)
Returns the self link for the entity of the given type and the given reference.
|
org.springframework.hateoas.Link |
createSelfLinkFor(Object instance)
Returns the self link for the given entity instance.
|
public DefaultSelfLinkProvider(PersistentEntities entities, org.springframework.hateoas.server.EntityLinks entityLinks, List<? extends EntityLookup<?>> lookups, ConversionService conversionService)
entities - must not be null.entityLinks - must not be null.lookups - must not be null.public org.springframework.hateoas.Link createSelfLinkFor(Object instance)
SelfLinkProviderSelfLinkProvider.createSelfLinkFor(Class, Object).createSelfLinkFor in interface SelfLinkProviderinstance - must never be null.SelfLinkProvider.createSelfLinkFor(Class, Object)public org.springframework.hateoas.Link createSelfLinkFor(Class<?> type, Object reference)
SelfLinkProvidercreateSelfLinkFor in interface SelfLinkProvidertype - must not be null.reference - must not be null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.