Class UberLinkDiscoverer
java.lang.Object
org.springframework.hateoas.mediatype.uber.UberLinkDiscoverer
- All Implemented Interfaces:
LinkDiscoverer,org.springframework.plugin.core.Plugin<MediaType>
Find links by rel in an UBER+JSON representation. TODO: Pending
https://github.com/json-path/JsonPath/issues/429, replace deserializing solution with JsonPath-based expression
"$.uber.data[?(@.rel.indexOf('%s') != -1)].url"
- Since:
- 1.0
- Author:
- Greg Turnquist, Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionfindLinksWithRel(LinkRelation rel, InputStream representation) Returns all links with the givenLinkRelationfound in the givenInputStreamrepresentation.findLinksWithRel(LinkRelation rel, String representation) Returns all links with the givenLinkRelationfound in the givenStringrepresentation.findLinkWithRel(LinkRelation rel, InputStream representation) Finds a single link with the givenLinkRelationin the givenInputStreamrepresentation.findLinkWithRel(LinkRelation rel, String representation) Finds a single link with the givenLinkRelationin the givenStringrepresentation.booleanMethods 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
-
Method Details
-
findLinkWithRel
Description copied from interface:LinkDiscovererFinds a single link with the givenLinkRelationin the givenStringrepresentation.- Specified by:
findLinkWithRelin interfaceLinkDiscoverer- Parameters:
rel- must not be null.representation- must not be null.- Returns:
- the first link with the given relation type found, or
Optional.empty()if none was found.
-
findLinkWithRel
Description copied from interface:LinkDiscovererFinds a single link with the givenLinkRelationin the givenInputStreamrepresentation.- Specified by:
findLinkWithRelin interfaceLinkDiscoverer- Parameters:
rel- must not be null.representation- must not be null.- Returns:
- the first
Linkwith the givenLinkRelationfound, orOptional.empty()if none was found.
-
findLinksWithRel
Description copied from interface:LinkDiscovererReturns all links with the givenLinkRelationfound in the givenStringrepresentation.- Specified by:
findLinksWithRelin interfaceLinkDiscoverer- Parameters:
rel- must not be null.representation- must not be null.- Returns:
- will never be null.
-
findLinksWithRel
Description copied from interface:LinkDiscovererReturns all links with the givenLinkRelationfound in the givenInputStreamrepresentation.- Specified by:
findLinksWithRelin interfaceLinkDiscoverer- Parameters:
rel- must not be null.representation- must not be null.- Returns:
- will never be null.
-
supports
- Specified by:
supportsin interfaceorg.springframework.plugin.core.Plugin<MediaType>
-