Interface LinkRenderer
-
- All Known Implementing Classes:
DefaultLinkRenderer
public interface LinkRenderer
Allows links to content to be rendered without exposing our marshalling architecture.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
render(ContentEntityObject content, ConversionContext conversionContext)
Renders link to specified content using the display name of the content as the link body.String
render(ContentEntityObject content, String linkAlias, ConversionContext conversionContext)
Renders link to specified content with specified alias.
-
-
-
Method Detail
-
render
String render(ContentEntityObject content, ConversionContext conversionContext) throws XhtmlException
Renders link to specified content using the display name of the content as the link body.- Parameters:
content
- the contentconversionContext
- conversion context- Returns:
- link to specified content in storage format.
- Throws:
XhtmlException
- if there is an error rendering the linkIllegalArgumentException
- if content is null or if the type of content is not a supported type. (seeContentTypeEnum
-
render
String render(ContentEntityObject content, String linkAlias, ConversionContext conversionContext) throws XhtmlException
Renders link to specified content with specified alias.- Parameters:
content
- the contentlinkAlias
- body or alias of resulting link. Note that this will be HTML encoded on output.conversionContext
- conversion context- Returns:
- link to specified content in storage format.
- Throws:
XhtmlException
- if there is an error rendering the linkIllegalArgumentException
- if content is null or if the type of content is not a supported type. (seeContentTypeEnum
-
-