public class TaxonomyTagRenderer extends Object implements TagRenderer
Constructor and Description |
---|
TaxonomyTagRenderer() |
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)
Processes and retrieves a Taxonomy for the given TaxonomyURI which is displayed as a simple tree.
|
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 |
setContextKeyword(String contextKeyword)
This sets the Context Facet for this TaxonomyHandler, to use as starting point.
|
void |
setKeywordParameterName(String keywordParameterName)
The name of the parameter the TCMURI value of the TaxonomyFacet will be given to in a HTML link .
|
void |
setPageRedirect(String pageRedirect)
This sets the pageLink to which all taxonomyFacet links will point to.
|
void |
setShowDescription(String showDescription)
This sets if the Taxonomy Tree should consist of only the description field instead of the keyword name.
|
void |
setShowEmptyKeywords(String showEmptyKeywords)
This sets if empty TaxonomyFacets with a reference count of 0 should be displayed.
|
void |
setShowRoot(String showRoot)
This sets if the root of the Taxonomy shall be displayed, by default will always be displayed.
|
void |
setTaxonomyURI(String taxonomyURI)
Sets the TaxonomyURI to display.
|
public int doStartTag(Tag tag, StringBuffer tagBody, TransformContext context, OutputDocument target) throws TCDLTransformerException
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 documentTCDLTransformerException
- On problems transforming the TCDL.TCDLTransformerException
public 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 tagpublic void setTaxonomyURI(String taxonomyURI)
taxonomyURI
- The uri of the Taxonomy to displaypublic void setPageRedirect(String pageRedirect)
pageRedirect
- The page every TaxonomyFacet link will point topublic void setKeywordParameterName(String keywordParameterName)
keywordParameterName
- The name of the parameter the TCMURI value of the TaxonomyFacet
will be given to in a HTML linkpublic void setContextKeyword(String contextKeyword)
contextKeyword
- The Taxonomyfacet to use as the context for this Taxonomypublic void setShowRoot(String showRoot)
showRoot
- true if the root must be displayed, false if notpublic void setShowEmptyKeywords(String showEmptyKeywords)
showEmptyKeywords
- true if the TaxonomyFacets with reference count of 0 must be displayed,
false if they shouldn't be displayed.public void setShowDescription(String showDescription)
showDescription
- If true, the description field will be used, when false the keyword name is usedCopyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries