public interface LinkRelationProvider extends org.springframework.plugin.core.Plugin<LinkRelationProvider.LookupContext>
LinkRelations for collections and items of the given type. Implementations can be selected
based on the LinkRelationProvider.LookupContext, for item resource relations, collection resource relations or both.supports(LookupContext)| Modifier and Type | Interface and Description |
|---|---|
static class |
LinkRelationProvider.LookupContext
LinkRelationProvider selection context for item resource relation lookups
(LinkRelationProvider.LookupContext.forItemResourceRelLookup(Class), collection resource relation lookups
LinkRelationProvider.LookupContext.forCollectionResourceRelLookup(Class) or both LinkRelationProvider.LookupContext.forType(Class). |
| Modifier and Type | Method and Description |
|---|---|
LinkRelation |
getCollectionResourceRelFor(Class<?> type)
Returns the relation type to be used to point to a collection resource of the given type.
|
LinkRelation |
getItemResourceRelFor(Class<?> type)
Returns the relation type to be used to point to an item resource of the given type.
|
boolean |
supports(LinkRelationProvider.LookupContext delimiter)
Callback method to manually select
LinkRelationProvider implementations based on a given
LinkRelationProvider.LookupContext. |
LinkRelation getItemResourceRelFor(Class<?> type)
type - must not be null.LinkRelation getCollectionResourceRelFor(Class<?> type)
type - must not be null.boolean supports(LinkRelationProvider.LookupContext delimiter)
LinkRelationProvider implementations based on a given
LinkRelationProvider.LookupContext. User code shouldn't need to call this method explicitly but rather use
DelegatingLinkRelationProvider, equip that with a set of LinkRelationProvider implementations as
that will perform the selection of the matching one on invocations of getItemResourceRelFor(Class) and
getCollectionResourceRelFor(Class) transparently.supports in interface org.springframework.plugin.core.Plugin<LinkRelationProvider.LookupContext>Plugin.supports(java.lang.Object)Copyright © 2011–2021 Pivotal, Inc.. All rights reserved.