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:LinkExtractor
Returns true if the link extractor accepts the given suffix (processor mapped to this suffix).- Specified by:
accept
in interfaceLinkExtractor
- Parameters:
suffix
- Suffix- Returns:
- true if JSON response of this processor is supported
-
getLinks
Description copied from interface:LinkExtractor
Retrieves links from the JSON document via JSON path.- Specified by:
getLinks
in interfaceLinkExtractor
- Parameters:
jsonPathContext
- Document context- Returns:
- Link URLs
-