|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.htmlparser.visitors.NodeVisitor
org.opencms.util.CmsHtmlParser
org.opencms.jsp.decorator.CmsHtmlDecorator
The CmsHtmlDecorator is the main object for processing the text decorations.
It uses the information of a
to process the
text decorations.
CmsDecoratorConfiguration
Field Summary |
Fields inherited from class org.opencms.util.CmsHtmlParser |
m_echo, m_noAutoCloseTags, m_result, TAG_ARRAY, TAG_LIST |
Constructor Summary | |
CmsHtmlDecorator(CmsDecoratorConfiguration config)
Constructor, creates a new CmsHtmlDecorator with a given configuration. |
|
CmsHtmlDecorator(CmsObject cms)
Constructor, creates a new, empty CmsHtmlDecorator. |
Method Summary | |
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 |
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. |
Methods inherited from class org.opencms.util.CmsHtmlParser |
collapse, configureNoAutoCorrectionTags, getConfiguration, getNoAutoCloseTags, getResult, getTagHtml, process, setConfiguration, setNoAutoCloseTags, visitEndTag, visitRemarkNode |
Methods inherited from class org.htmlparser.visitors.NodeVisitor |
beginParsing, finishedParsing, shouldRecurseChildren, shouldRecurseSelf |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CmsHtmlDecorator(CmsDecoratorConfiguration config)
config
- the configuration to be usedpublic CmsHtmlDecorator(CmsObject cms)
cms
- the CmsObjectMethod Detail |
public static java.util.List 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 well
public 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 used
java.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_CmsHtmlNodeVisitor
visitStringNode
in interface I_CmsHtmlNodeVisitor
visitStringNode
in class CmsHtmlParser
NodeVisitor.visitStringNode(org.htmlparser.Text)
public void visitTag(org.htmlparser.Tag tag)
I_CmsHtmlNodeVisitor
visitTag
in interface I_CmsHtmlNodeVisitor
visitTag
in class CmsHtmlParser
NodeVisitor.visitTag(org.htmlparser.Tag)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |