Interface LinkDiscoverer
- All Superinterfaces:
org.springframework.plugin.core.Plugin<MediaType>
- All Known Implementing Classes:
AlpsLinkDiscoverer
,CollectionJsonLinkDiscoverer
,HalFormsLinkDiscoverer
,HalLinkDiscoverer
,JsonPathLinkDiscoverer
,UberLinkDiscoverer
Interface to allow discovering links by relation type from some source.
- Author:
- Oliver Gierke
-
Method Summary
Modifier and TypeMethodDescriptiondefault Links
findLinksWithRel
(String relation, InputStream representation) Returns all links with the given link relation found in the givenInputStream
representation.default Links
findLinksWithRel
(String relation, String representation) Returns all links with the given link relation found in the givenString
representation.findLinksWithRel
(LinkRelation relation, InputStream representation) Returns all links with the givenLinkRelation
found in the givenInputStream
representation.findLinksWithRel
(LinkRelation relation, String representation) Returns all links with the givenLinkRelation
found in the givenString
representation.findLinkWithRel
(String relation, InputStream representation) Finds a single link with the given relation type in the givenInputStream
representation.findLinkWithRel
(String relation, String representation) Finds a single link with the given relation type in the givenString
representation.findLinkWithRel
(LinkRelation relation, InputStream representation) Finds a single link with the givenLinkRelation
in the givenInputStream
representation.findLinkWithRel
(LinkRelation relation, String representation) Finds a single link with the givenLinkRelation
in the givenString
representation.default Link
findRequiredLinkWithRel
(LinkRelation relation, InputStream representation) Finds a single link with the given relation type in the givenInputStream
representation.default Link
findRequiredLinkWithRel
(LinkRelation relation, String representation) Finds a single link with the given relation in the givenString
representation.Methods inherited from interface org.springframework.plugin.core.Plugin
supports
-
Method Details
-
findLinkWithRel
Finds a single link with the givenLinkRelation
in the givenString
representation.- Parameters:
relation
- 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
Finds a single link with the given relation type in the givenString
representation.- Parameters:
relation
- must not be null or empty.representation
- must not be null.- Returns:
- the first
Link
with the given link relation found, orOptional.empty()
if none was found.
-
findRequiredLinkWithRel
Finds a single link with the given relation in the givenString
representation.- Parameters:
relation
- must not be null.representation
- must not be null.- Returns:
- the first link with the given relation type found.
- Throws:
IllegalArgumentException
- if noLink
for the givenLinkRelation
can be found.
-
findLinkWithRel
Finds a single link with the givenLinkRelation
in the givenInputStream
representation.- Parameters:
relation
- must not be null.representation
- must not be null.- Returns:
- the first
Link
with the givenLinkRelation
found, orOptional.empty()
if none was found.
-
findLinkWithRel
Finds a single link with the given relation type in the givenInputStream
representation.- Parameters:
relation
- must not be null or empty.representation
- must not be null.- Returns:
- the first link with the given relation type found, or
Optional.empty()
if none was found.
-
findRequiredLinkWithRel
Finds a single link with the given relation type in the givenInputStream
representation.- Parameters:
relation
- must not be null or empty.representation
- must not be null.- Returns:
- the first link with the given relation type found.
- Throws:
IllegalArgumentException
- if noLink
for the givenLinkRelation
can be found.
-
findLinksWithRel
Returns all links with the given link relation found in the givenString
representation.- Parameters:
relation
- must not be null or empty.representation
- must not be null.- Returns:
- will never be null.
-
findLinksWithRel
Returns all links with the givenLinkRelation
found in the givenString
representation.- Parameters:
relation
- must not be null.representation
- must not be null.- Returns:
- will never be null.
-
findLinksWithRel
Returns all links with the given link relation found in the givenInputStream
representation.- Parameters:
relation
- must not be null or empty.representation
- must not be null.- Returns:
- will never be null.
-
findLinksWithRel
Returns all links with the givenLinkRelation
found in the givenInputStream
representation.- Parameters:
relation
- must not be null.representation
- must not be null.- Returns:
- will never be null.
-