public class ContentHeaderTagRenderer extends Object implements TagRenderer
Constructor and Description |
---|
ContentHeaderTagRenderer() |
Modifier and Type | Method and Description |
---|---|
String |
doEndTag(Tag tag,
StringBuffer tagBody,
TransformContext context,
OutputDocument target)
Called whenever an ending Tag that is associated with the handler is encountered in TCDL content.
|
int |
doStartTag(Tag tag,
StringBuffer tagBody,
TransformContext context,
OutputDocument target)
Called whenever as starting Tag that is associated with the handler is encountered in TCDL content.
|
boolean |
requiresCodeBlock(TransformContext context,
OutputDocument target,
Tag tag)
This method is called right before doStartTag and its return value indicates
if the engine must wrap the result of doEndTag inside a code block.
|
void |
setRequiredTcmURI(String requiredTcmURI)
Item URI for item (page or component) that is being transformed.
|
public void setRequiredTcmURI(String requiredTcmURI)
requiredTcmURI
- Item URI for item that is being transformedpublic int doStartTag(Tag tag, StringBuffer tagBody, TransformContext context, OutputDocument target)
TagHandlerBase
It is possible to prepend data to the tagContents using the [tagBody] buffer. The tagBody StringBuffer collects the content occurring (or generated by nested tags) between the start and closing tag.
doStartTag
in interface TagHandlerBase
tag
- The fully initialized tagtagBody
- Buffer that will be used by the framework to write tag content to.context
- TransformContext offering access to context attributestarget
- OutputDocument for setting supporting information to build the final documentpublic String doEndTag(Tag tag, StringBuffer tagBody, TransformContext context, OutputDocument target) throws TCDLTransformerException
TagHandlerBase
Note that the Tag [tag] parameter will have all attributes set of the start tag (in fact it is the start tag), so all information of the tag is at your disposal.
doEndTag
in interface TagHandlerBase
tag
- The fully initialized tagtagBody
- Buffer that will be used by the framework to write tag content to.context
- TransformContext offering access to context attributestarget
- OutputDocument for setting supporting information to build the final documentTCDLTransformerException
- On problems transforming the TCDL.TCDLTransformerException
public boolean requiresCodeBlock(TransformContext context, OutputDocument target, Tag tag)
TagHandlerBase
The start [tag] is passed, so the handler may use attribute values to decide upon it's result
requiresCodeBlock
in interface TagHandlerBase
context
- TransformContext offering access to context attributestarget
- OutputDocument for setting supporting information to build the final documenttag
- The fully initialized tagCopyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries