Class CmsHtmlDecorator

    • Method Detail

      • splitAsList

        public 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.

        Parameters:
        source - the String to split
        delimiters - the delimiters to split at
        trim - flag to indicate if leading and trailing whitespaces should be omitted
        includeDelimiters - flag to indicate if the delimiters should be included as well
        Returns:
        the List of splitted Substrings
      • doDecoration

        public java.lang.String doDecoration​(java.lang.String html,
                                             java.lang.String encoding)
                                      throws java.lang.Exception
        Processes a HTML string and adds text decorations according to the decoration configuration.

        Parameters:
        html - a string holding the HTML code that should be added with text decorations
        encoding - the encoding to be used
        Returns:
        a HTML string with the decorations added.
        Throws:
        java.lang.Exception - if something goes wrong
      • resetDecorationDefinitions

        public void resetDecorationDefinitions()
        Resets the first occurance flags of all decoration objects.

        This is nescessary if decoration objects should be used for processing more than once. *

      • visitTag

        public void visitTag​(org.htmlparser.Tag tag)
        Description copied from interface: I_CmsHtmlNodeVisitor
        Visitor method (callback) invoked when a starting Tag (HTML comment) is encountered.

        Specified by:
        visitTag in interface I_CmsHtmlNodeVisitor
        Overrides:
        visitTag in class CmsHtmlParser
        Parameters:
        tag - the tag that is visited.
        See Also:
        NodeVisitor.visitTag(org.htmlparser.Tag)