|
||||||||||
| 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_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 | |
|---|---|
static String |
doDecoration(String html,
CmsDecoratorConfiguration config,
String encoding)
Processes a HTML string and adds text decorations according to the decoration configuration. |
static String |
doDecoration(String html,
CmsHtmlDecorator processor,
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 List |
splitAsList(String source,
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(Text text)
Visitor method (callback) invoked when a remark Tag (HTML comment) is encountered. |
| Methods inherited from class org.opencms.util.CmsHtmlParser |
|---|
collapse, getConfiguration, getResult, getTagHtml, process, process, setConfiguration, visitEndTag, visitRemarkNode, visitTag |
| 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 CmsObject| Method Detail |
|---|
public static String doDecoration(String html,
CmsDecoratorConfiguration config,
String encoding)
throws Exception
html - a string holding the HTML code that should be added with text decorationsconfig - the decoration configurationencoding - the encoding to be used
Exception - if something goes wrong
public static String doDecoration(String html,
CmsHtmlDecorator processor,
String encoding)
throws Exception
html - a string holding the HTML code that should be added with text decorationsprocessor - an already configuredencoding - the encoding to be used
Exception - if something goes wrong
public static List splitAsList(String source,
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 void resetDecorationDefinitions()
This is nescessary if decoration objects should be used for processing more than once. *
public void visitStringNode(Text text)
I_CmsHtmlNodeVisitor
visitStringNode in interface I_CmsHtmlNodeVisitorvisitStringNode in class CmsHtmlParsertext - the text that is visited.NodeVisitor.visitStringNode(org.htmlparser.Text)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||