public class DelegatingLinkRelationProvider extends Object implements LinkRelationProvider
LinkRelationProvider.LookupContext| Constructor and Description |
|---|
DelegatingLinkRelationProvider(LinkRelationProvider... providers)
Creates a new
DefaultLinkRelationProvider for the given LinkRelationProviders. |
DelegatingLinkRelationProvider(org.springframework.plugin.core.PluginRegistry<LinkRelationProvider,LinkRelationProvider.LookupContext> providers) |
| 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. |
public DelegatingLinkRelationProvider(LinkRelationProvider... providers)
DefaultLinkRelationProvider for the given LinkRelationProviders.providers - must not be null.public DelegatingLinkRelationProvider(org.springframework.plugin.core.PluginRegistry<LinkRelationProvider,LinkRelationProvider.LookupContext> providers)
public LinkRelation getItemResourceRelFor(Class<?> type)
LinkRelationProvidergetItemResourceRelFor in interface LinkRelationProvidertype - must not be null.public LinkRelation getCollectionResourceRelFor(Class<?> type)
LinkRelationProvidergetCollectionResourceRelFor in interface LinkRelationProvidertype - must not be null.public boolean supports(LinkRelationProvider.LookupContext delimiter)
LinkRelationProviderLinkRelationProvider 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 LinkRelationProvider.getItemResourceRelFor(Class) and
LinkRelationProvider.getCollectionResourceRelFor(Class) transparently.supports in interface LinkRelationProvidersupports in interface org.springframework.plugin.core.Plugin<LinkRelationProvider.LookupContext>Plugin.supports(java.lang.Object)Copyright © 2011–2020 Pivotal, Inc.. All rights reserved.