public class AnnotationLinkRelationProvider extends Object implements LinkRelationProvider, Ordered
LinkRelationProvider that evaluates the Relation annotation on entity types.LinkRelationProvider.LookupContextHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
AnnotationLinkRelationProvider() |
| 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.
|
int |
getOrder() |
boolean |
supports(LinkRelationProvider.LookupContext context)
Callback method to manually select
LinkRelationProvider implementations based on a given
LinkRelationProvider.LookupContext. |
public LinkRelation getCollectionResourceRelFor(Class<?> type)
LinkRelationProvidergetCollectionResourceRelFor in interface LinkRelationProvidertype - must not be null.public LinkRelation getItemResourceRelFor(Class<?> type)
LinkRelationProvidergetItemResourceRelFor in interface LinkRelationProvidertype - 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 © 2011–2021 Pivotal, Inc.. All rights reserved.