public class ControllerLinkRelationProvider extends Object implements LinkRelationProvider
LinkRelationProvider inspecting ExposesResourceFor annotations on controller classes.LinkRelationProvider.LookupContext| Constructor and Description |
|---|
ControllerLinkRelationProvider(Class<?> controller,
org.springframework.plugin.core.PluginRegistry<LinkRelationProvider,LinkRelationProvider.LookupContext> providers)
Creates a new
ControllerLinkRelationProvider |
| Modifier and Type | Method and Description |
|---|---|
LinkRelation |
getCollectionResourceRelFor(Class<?> resource)
Returns the relation type to be used to point to a collection resource of the given type.
|
LinkRelation |
getItemResourceRelFor(Class<?> resource)
Returns the relation type to be used to point to an item resource of the given type.
|
boolean |
supports(LinkRelationProvider.LookupContext context)
Callback method to manually select
LinkRelationProvider implementations based on a given
LinkRelationProvider.LookupContext. |
public ControllerLinkRelationProvider(Class<?> controller, org.springframework.plugin.core.PluginRegistry<LinkRelationProvider,LinkRelationProvider.LookupContext> providers)
ControllerLinkRelationProvidercontroller - must not be null.providers - must not be null.public LinkRelation getItemResourceRelFor(Class<?> resource)
LinkRelationProvidergetItemResourceRelFor in interface LinkRelationProviderresource - must not be null.public LinkRelation getCollectionResourceRelFor(Class<?> resource)
LinkRelationProvidergetCollectionResourceRelFor in interface LinkRelationProviderresource - must not be null.public boolean supports(LinkRelationProvider.LookupContext context)
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 © 2012-2019–2019 Pivotal, Inc.. All rights reserved.