@FunctionalInterface
public interface BrokenLinkUrlResolver
An implementation of this can be provided to via
DeliveryClient.setBrokenLinkUrlResolver(BrokenLinkUrlResolver) to resolve links to a content item that are
not published. This is passed on to the RichTextElementConverter to update href attributes in links
when no data-item-id is available on the link.
This is a FunctionalInterface to simplify implementation.
For example, the following implementation will render <a href="/404">Some text</a>:
DeliveryClient deliveryClient = new DeliveryClient("02a70003-e864-464e-b62c-e0ede97deb8c");
deliveryClient.setBrokenLinkUrlResolver(() -> "/404");
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
resolveBrokenLinkUrl()
Returns a String to be placed in the href attribute of any links to content items that are not published within
RichTextElements. |
java.lang.String resolveBrokenLinkUrl()
RichTextElements.