public class DefaultLinkRelationProvider extends Object implements LinkRelationProvider, Ordered
LinkRelationProvider to simply use the uncapitalized version of the given type's
name as item resource LinkRelation as well as an appended List for the collection resource
LinkRelation.LinkRelationProvider.LookupContextHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
DefaultLinkRelationProvider() |
| 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 delimiter)
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 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–2023 Pivotal, Inc.. All rights reserved.