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 LinksfindLinksWithRel(String relation, InputStream representation) Returns all links with the given link relation found in the givenInputStreamrepresentation.default LinksfindLinksWithRel(String relation, String representation) Returns all links with the given link relation found in the givenStringrepresentation.findLinksWithRel(LinkRelation relation, InputStream representation) Returns all links with the givenLinkRelationfound in the givenInputStreamrepresentation.findLinksWithRel(LinkRelation relation, String representation) Returns all links with the givenLinkRelationfound in the givenStringrepresentation.findLinkWithRel(String relation, InputStream representation) Finds a single link with the given relation type in the givenInputStreamrepresentation.findLinkWithRel(String relation, String representation) Finds a single link with the given relation type in the givenStringrepresentation.findLinkWithRel(LinkRelation relation, InputStream representation) Finds a single link with the givenLinkRelationin the givenInputStreamrepresentation.findLinkWithRel(LinkRelation relation, String representation) Finds a single link with the givenLinkRelationin the givenStringrepresentation.default LinkfindRequiredLinkWithRel(LinkRelation relation, InputStream representation) Finds a single link with the given relation type in the givenInputStreamrepresentation.default LinkfindRequiredLinkWithRel(LinkRelation relation, String representation) Finds a single link with the given relation in the givenStringrepresentation.Methods inherited from interface org.springframework.plugin.core.Plugin
supports
-
Method Details
-
findLinkWithRel
Finds a single link with the givenLinkRelationin the givenStringrepresentation.- 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 givenStringrepresentation.- Parameters:
relation- must not be null or empty.representation- must not be null.- Returns:
- the first
Linkwith the given link relation found, orOptional.empty()if none was found.
-
findRequiredLinkWithRel
Finds a single link with the given relation in the givenStringrepresentation.- Parameters:
relation- must not be null.representation- must not be null.- Returns:
- the first link with the given relation type found.
- Throws:
IllegalArgumentException- if noLinkfor the givenLinkRelationcan be found.
-
findLinkWithRel
Finds a single link with the givenLinkRelationin the givenInputStreamrepresentation.- Parameters:
relation- must not be null.representation- must not be null.- Returns:
- the first
Linkwith the givenLinkRelationfound, orOptional.empty()if none was found.
-
findLinkWithRel
Finds a single link with the given relation type in the givenInputStreamrepresentation.- 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 givenInputStreamrepresentation.- 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 noLinkfor the givenLinkRelationcan be found.
-
findLinksWithRel
Returns all links with the given link relation found in the givenStringrepresentation.- Parameters:
relation- must not be null or empty.representation- must not be null.- Returns:
- will never be null.
-
findLinksWithRel
Returns all links with the givenLinkRelationfound in the givenStringrepresentation.- 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 givenInputStreamrepresentation.- Parameters:
relation- must not be null or empty.representation- must not be null.- Returns:
- will never be null.
-
findLinksWithRel
Returns all links with the givenLinkRelationfound in the givenInputStreamrepresentation.- Parameters:
relation- must not be null.representation- must not be null.- Returns:
- will never be null.
-