Class HalLinkDiscoverer
java.lang.Object
org.springframework.hateoas.client.JsonPathLinkDiscoverer
org.springframework.hateoas.mediatype.hal.HalLinkDiscoverer
- All Implemented Interfaces:
LinkDiscoverer,org.springframework.plugin.core.Plugin<org.springframework.http.MediaType>
- Direct Known Subclasses:
HalFormsLinkDiscoverer
LinkDiscoverer implementation based on HAL link structure.- Author:
- Oliver Gierke, Greg Turnquist
-
Field Summary
Fields inherited from class org.springframework.hateoas.client.JsonPathLinkDiscoverer
mediaTypes -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructor forMediaTypes.HAL_JSON.protectedHalLinkDiscoverer(org.springframework.http.MediaType... mediaTypes) -
Method Summary
Modifier and TypeMethodDescriptionprotected LinkextractLink(Object element, LinkRelation rel) Callback for eachLinkDiscovererto extract relevant attributes and generate aLink.Creates a newLinkDiscovererthat looks up HAL links in the document recursively.Methods inherited from class org.springframework.hateoas.client.JsonPathLinkDiscoverer
findLinksWithRel, findLinksWithRel, findLinkWithRel, findLinkWithRel, supportsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.hateoas.client.LinkDiscoverer
findLinksWithRel, findLinksWithRel, findLinkWithRel, findLinkWithRel, findRequiredLinkWithRel, findRequiredLinkWithRel
-
Constructor Details
-
HalLinkDiscoverer
public HalLinkDiscoverer()Constructor forMediaTypes.HAL_JSON. -
HalLinkDiscoverer
protected HalLinkDiscoverer(org.springframework.http.MediaType... mediaTypes)
-
-
Method Details
-
inspectEmbeddeds
Creates a newLinkDiscovererthat looks up HAL links in the document recursively. In other words, it also finds ones contained in the_embeddedclause.- Returns:
- will never be null.
- Since:
- 3.0
-
extractLink
Description copied from class:JsonPathLinkDiscovererCallback for eachLinkDiscovererto extract relevant attributes and generate aLink.- Overrides:
extractLinkin classJsonPathLinkDiscoverer- Returns:
- link
-