public class FirstLineTagRenderer extends Object implements TagRenderer
| Constructor and Description |
|---|
FirstLineTagRenderer() |
| 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.
|
public int doStartTag(Tag tag, StringBuffer tagBody, TransformContext context, OutputDocument target) throws TCDLTransformerException
TagHandlerBaseIt 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 TagHandlerBasetag - 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.TCDLTransformerExceptionpublic String doEndTag(Tag tag, StringBuffer tagBody, TransformContext context, OutputDocument target) throws TCDLTransformerException
TagHandlerBaseNote 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 TagHandlerBasetag - 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.TCDLTransformerExceptionpublic boolean requiresCodeBlock(TransformContext context, OutputDocument target, Tag tag)
TagHandlerBaseThe start [tag] is passed, so the handler may use attribute values to decide upon it's result
requiresCodeBlock in interface TagHandlerBasecontext - 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