Package io.wcm.handler.link.spi
Interface LinkMarkupBuilder
-
- All Known Implementing Classes:
DummyLinkMarkupBuilder
,SimpleLinkMarkupBuilder
@ConsumerType public interface LinkMarkupBuilder
Builds XHTML markup for links. The markup builder should build only an empty anchor tag without content.This interface has to be implemented by a Sling Model class. The adaptables should be
SlingHttpServletRequest
andResource
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
accepts(@NotNull Link link)
Checks whether this builder can generate markup for the given link.@Nullable io.wcm.handler.commons.dom.Anchor
build(@NotNull Link link)
Build link anchor markup
-
-
-
Method Detail
-
accepts
boolean accepts(@NotNull @NotNull Link link)
Checks whether this builder can generate markup for the given link.- Parameters:
link
- Link metadata- Returns:
- true if this markup builder can handle the given link
-
build
@Nullable @Nullable io.wcm.handler.commons.dom.Anchor build(@NotNull @NotNull Link link)
Build link anchor markup- Parameters:
link
- Link metadata with resolved link information- Returns:
- Anchor or null if link is invalid
-
-