|
||||||||
| 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
public class 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(CmsObject cms)
Constructor, creates a new, empty CmsHtmlDecorator. |
|
CmsHtmlDecorator(CmsObject cms,
I_CmsDecoratorConfiguration config)
Constructor, creates a new CmsHtmlDecorator with a given configuration. |
|
| 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<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. |
| 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(CmsObject cms)
throws CmsException
cms - the CmsObject
CmsException - if something goes wrong
public CmsHtmlDecorator(CmsObject cms,
I_CmsDecoratorConfiguration config)
cms - the CmsObjectconfig - the configuration to be used| Method Detail |
|---|
public 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 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_CmsHtmlNodeVisitorvisitStringNode in class CmsHtmlParsertext - the text that is visited.NodeVisitor.visitStringNode(org.htmlparser.Text)public void visitTag(org.htmlparser.Tag tag)
I_CmsHtmlNodeVisitor
visitTag in interface I_CmsHtmlNodeVisitorvisitTag in class CmsHtmlParsertag - the tag that is visited.NodeVisitor.visitTag(org.htmlparser.Tag)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||