public class CmsHtmlDecorator extends CmsHtmlParser
It uses the information of a to process the
text decorations.CmsDecoratorConfiguration
m_echo, m_noAutoCloseTags, m_result, TAG_ARRAY, TAG_LIST| Constructor and Description |
|---|
CmsHtmlDecorator(CmsObject cms)
Constructor, creates a new, empty CmsHtmlDecorator.
|
CmsHtmlDecorator(CmsObject cms,
I_CmsDecoratorConfiguration config)
Constructor, creates a new CmsHtmlDecorator with a given configuration.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
doDecoration(java.lang.String html,
java.lang.String encoding)
Processes a HTML string and adds text decorations according to the decoration configuration.
|
void |
resetDecorationDefinitions()
Resets the first occurance flags of all decoration objects.
|
static java.util.List<java.lang.String> |
splitAsList(java.lang.String source,
java.lang.String[] delimiters,
boolean trim,
boolean includeDelimiters)
Splits a String into substrings along the provided delimiter list and returns
the result as a List of Substrings.
|
void |
visitStringNode(org.htmlparser.Text text)
Visitor method (callback) invoked when a remark Tag (HTML comment) is encountered.
|
void |
visitTag(org.htmlparser.Tag tag)
Visitor method (callback) invoked when a starting Tag (HTML comment) is encountered.
|
collapse, configureNoAutoCorrectionTags, getConfiguration, getNoAutoCloseTags, getResult, getTagHtml, process, setConfiguration, setNoAutoCloseTags, visitEndTag, visitRemarkNodepublic CmsHtmlDecorator(CmsObject cms) throws CmsException
cms - the CmsObjectCmsException - if something goes wrongpublic CmsHtmlDecorator(CmsObject cms, I_CmsDecoratorConfiguration config)
cms - the CmsObjectconfig - the configuration to be usedpublic static java.util.List<java.lang.String> splitAsList(java.lang.String source, java.lang.String[] delimiters, boolean trim, boolean includeDelimiters)
source - the String to splitdelimiters - the delimiters to split attrim - flag to indicate if leading and trailing whitespaces should be omittedincludeDelimiters - flag to indicate if the delimiters should be included as wellpublic java.lang.String doDecoration(java.lang.String html, java.lang.String encoding) throws java.lang.Exception
html - a string holding the HTML code that should be added with text decorationsencoding - the encoding to be usedjava.lang.Exception - if something goes wrongpublic void resetDecorationDefinitions()
This is nescessary if decoration objects should be used for processing more than once. *
public void visitStringNode(org.htmlparser.Text text)
I_CmsHtmlNodeVisitorvisitStringNode in interface I_CmsHtmlNodeVisitorvisitStringNode in class CmsHtmlParsertext - the text that is visited.NodeVisitor.visitStringNode(org.htmlparser.Text)public void visitTag(org.htmlparser.Tag tag)
I_CmsHtmlNodeVisitorvisitTag in interface I_CmsHtmlNodeVisitorvisitTag in class CmsHtmlParsertag - the tag that is visited.NodeVisitor.visitTag(org.htmlparser.Tag)