Class RichTextInternalLinks
java.lang.Object
io.wcm.siteapi.integrationtestsupport.linkextractor.RichTextInternalLinks
- All Implemented Interfaces:
LinkExtractor
Extracts internal links from rich text fragments in JSON.
Looks for components with specific resource types and a "text" property containing the HTML fragment. Within the HTML fragments anchor tags with a attribute "data-type=internal" are processed, which is the default representation of internal links generated by wcm.io Link Handler.
-
Constructor Summary
ConstructorsConstructorDescriptionRichTextInternalLinks(String... resourceTypes) RichTextInternalLinks(List<String> resourceTypes) -
Method Summary
-
Constructor Details
-
RichTextInternalLinks
- Parameters:
resourceTypes- Resource type(s) for components containing rich text.
-
RichTextInternalLinks
- Parameters:
resourceTypes- Resource type(s) for components containing rich text.
-
-
Method Details
-
accept
Description copied from interface:LinkExtractorReturns true if the link extractor accepts the given suffix (processor mapped to this suffix).- Specified by:
acceptin interfaceLinkExtractor- Parameters:
suffix- Suffix- Returns:
- true if JSON response of this processor is supported
-
getLinks
Description copied from interface:LinkExtractorRetrieves links from the JSON document via JSON path.- Specified by:
getLinksin interfaceLinkExtractor- Parameters:
jsonPathContext- Document context- Returns:
- Link URLs
-