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 givenLinkRelation
found in the givenInputStream
representation.findLinksWithRel
(LinkRelation rel, String representation) Returns all links with the givenLinkRelation
found in the givenString
representation.findLinkWithRel
(LinkRelation rel, InputStream representation) Finds a single link with the givenLinkRelation
in the givenInputStream
representation.findLinkWithRel
(LinkRelation rel, String representation) Finds a single link with the givenLinkRelation
in the givenString
representation.boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.hateoas.client.LinkDiscoverer
findLinksWithRel, findLinksWithRel, findLinkWithRel, findLinkWithRel, findRequiredLinkWithRel, findRequiredLinkWithRel
-
Method Details
-
findLinkWithRel
Description copied from interface:LinkDiscoverer
Finds a single link with the givenLinkRelation
in the givenString
representation.- Specified by:
findLinkWithRel
in 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:LinkDiscoverer
Finds a single link with the givenLinkRelation
in the givenInputStream
representation.- Specified by:
findLinkWithRel
in interfaceLinkDiscoverer
- Parameters:
rel
- must not be null.representation
- must not be null.- Returns:
- the first
Link
with the givenLinkRelation
found, orOptional.empty()
if none was found.
-
findLinksWithRel
Description copied from interface:LinkDiscoverer
Returns all links with the givenLinkRelation
found in the givenString
representation.- Specified by:
findLinksWithRel
in interfaceLinkDiscoverer
- Parameters:
rel
- must not be null.representation
- must not be null.- Returns:
- will never be null.
-
findLinksWithRel
Description copied from interface:LinkDiscoverer
Returns all links with the givenLinkRelation
found in the givenInputStream
representation.- Specified by:
findLinksWithRel
in interfaceLinkDiscoverer
- Parameters:
rel
- must not be null.representation
- must not be null.- Returns:
- will never be null.
-
supports
- Specified by:
supports
in interfaceorg.springframework.plugin.core.Plugin<MediaType>
-