org.liquidsite.core.text
Class TaggedFormatter

java.lang.Object
  extended byorg.liquidsite.core.text.TaggedFormatter

public class TaggedFormatter
extends java.lang.Object

A tagged text formatter. This class contains static methods for processing tagged text.


Constructor Summary
TaggedFormatter()
           
 
Method Summary
static java.lang.String clean(java.lang.String text)
          Cleans a tagged text string.
static java.lang.String formatHtml(java.lang.String text, FormattingContext context)
          Formats a tagged text string in HTML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaggedFormatter

public TaggedFormatter()
Method Detail

clean

public static java.lang.String clean(java.lang.String text)
Cleans a tagged text string. Unneeded line feeds and space characters will be removed.

Parameters:
text - the tagged text string
Returns:
the cleaned tagged text string

formatHtml

public static java.lang.String formatHtml(java.lang.String text,
                                          FormattingContext context)
Formats a tagged text string in HTML. This method will resolve any links in the tagged text and convert the tags to valid HTML tags.

Parameters:
text - the tagged text string
context - the formatting context
Returns:
the HTML encoded text