Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.renderer.filter
Class QuoteFilter

java.lang.Object
  extended by com.jivesoftware.forum.renderer.AbstractRenderFilter
      extended by com.jivesoftware.forum.renderer.filter.QuoteFilter
All Implemented Interfaces:
com.jivesoftware.forum.renderer.impl.JiveSystemRenderFilter, PreProcessingRenderFilter, RenderFilter

public class QuoteFilter
extends AbstractRenderFilter
implements com.jivesoftware.forum.renderer.impl.JiveSystemRenderFilter, PreProcessingRenderFilter

A Filter that can highlight quoted messages based upon the level of indentation - very similar to how groups.google.com highlights quotes. Quoted lines either can displayed with leading '>' characters or all the text at the same level of quote can be surrounded with a div tag with a css class 'jive-quote'.


Field Summary
static int DEFAULT_QUOTE_MODE
           
static int EMAIL_STYLE_QUOTES
           
static int WEB_STYLE_QUOTES
           
 
Constructor Summary
QuoteFilter()
           
 
Method Summary
protected  java.lang.String executeHtmlTarget(java.lang.String string, RenderContext renderContext)
          This method is called to execute the filter when the render target specified in the context is RenderTarget.TARGET_HTML.
protected  java.lang.String executeNoMarkupTarget(java.lang.String string, RenderContext renderContext)
          This method is called to execute the filter when the render target specified in the context is RenderTarget.TARGET_NO_MARKUP.
protected  java.lang.String executePlainEmailTarget(java.lang.String string, RenderContext renderContext)
          This method is called to execute the filter when the render target specified in the context is RenderTarget.TARGET_PLAIN_EMAIL.
protected  java.lang.String executePlainTextTarget(java.lang.String string, RenderContext renderContext)
          This method is called to execute the filter when the render target specified in the context is RenderTarget.TARGET_PLAIN_TEXT.
protected  java.lang.String executeWysiwygEditorTarget(java.lang.String string, RenderContext renderContext)
          This method is called to execute the filter when the render target specified in the context is RenderTarget.TARGET_WYSIWYG_EDITOR.
protected  java.lang.String[] getDefaultHelp()
          Returns a String[section,title,body] for the default help for the filter.
protected  java.util.Map getDocumentationMap()
          Returns a documentation Map keyed by languageCode -> String[section,title,body].
 java.lang.String getName()
          Returns the unique name of the filter.
 java.lang.String getQuoteChar()
           
 java.lang.String getQuoteColors()
           
 int getQuoteMode()
           
protected  boolean isEnabledByDefault()
          Returns true if the filter should be enabled by default, false otherwise.
 boolean isReformatTextEnabled()
           
 void setQuoteChar(java.lang.String c)
           
 void setQuoteColors(java.lang.String prefix)
           
 void setQuoteMode(int quoteMode)
           
 void setReformatTextEnabled(boolean enabled)
           
 
Methods inherited from class com.jivesoftware.forum.renderer.AbstractRenderFilter
execute, getUserDocumentation, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEB_STYLE_QUOTES

public static final int WEB_STYLE_QUOTES
See Also:
Constant Field Values

EMAIL_STYLE_QUOTES

public static final int EMAIL_STYLE_QUOTES
See Also:
Constant Field Values

DEFAULT_QUOTE_MODE

public static final int DEFAULT_QUOTE_MODE
See Also:
Constant Field Values
Constructor Detail

QuoteFilter

public QuoteFilter()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: RenderFilter
Returns the unique name of the filter.

Specified by:
getName in interface RenderFilter
Specified by:
getName in class AbstractRenderFilter
Returns:
the unique name of the filter.

isEnabledByDefault

protected boolean isEnabledByDefault()
Description copied from class: AbstractRenderFilter
Returns true if the filter should be enabled by default, false otherwise.

Specified by:
isEnabledByDefault in class AbstractRenderFilter
Returns:
true if the filter should be enabled by default, false otherwise.

executePlainTextTarget

protected java.lang.String executePlainTextTarget(java.lang.String string,
                                                  RenderContext renderContext)
Description copied from class: AbstractRenderFilter
This method is called to execute the filter when the render target specified in the context is RenderTarget.TARGET_PLAIN_TEXT.

Specified by:
executePlainTextTarget in class AbstractRenderFilter
Parameters:
string - the String to filter
renderContext - the context the filter is being executed within
Returns:
a filtered string

executePlainEmailTarget

protected java.lang.String executePlainEmailTarget(java.lang.String string,
                                                   RenderContext renderContext)
Description copied from class: AbstractRenderFilter
This method is called to execute the filter when the render target specified in the context is RenderTarget.TARGET_PLAIN_EMAIL.

Specified by:
executePlainEmailTarget in class AbstractRenderFilter
Parameters:
string - the String to filter
renderContext - the context the filter is being executed within
Returns:
a filtered string

executeHtmlTarget

protected java.lang.String executeHtmlTarget(java.lang.String string,
                                             RenderContext renderContext)
Description copied from class: AbstractRenderFilter
This method is called to execute the filter when the render target specified in the context is RenderTarget.TARGET_HTML.

Specified by:
executeHtmlTarget in class AbstractRenderFilter
Parameters:
string - the String to filter
renderContext - the context the filter is being executed within
Returns:
a filtered string

executeWysiwygEditorTarget

protected java.lang.String executeWysiwygEditorTarget(java.lang.String string,
                                                      RenderContext renderContext)
Description copied from class: AbstractRenderFilter
This method is called to execute the filter when the render target specified in the context is RenderTarget.TARGET_WYSIWYG_EDITOR.

Specified by:
executeWysiwygEditorTarget in class AbstractRenderFilter
Parameters:
string - the String to filter
renderContext - the context the filter is being executed within
Returns:
a filtered string

executeNoMarkupTarget

protected java.lang.String executeNoMarkupTarget(java.lang.String string,
                                                 RenderContext renderContext)
Description copied from class: AbstractRenderFilter
This method is called to execute the filter when the render target specified in the context is RenderTarget.TARGET_NO_MARKUP.

Specified by:
executeNoMarkupTarget in class AbstractRenderFilter
Parameters:
string - the String to filter
renderContext - the context the filter is being executed within
Returns:
a filtered string

getDocumentationMap

protected java.util.Map getDocumentationMap()
Description copied from class: AbstractRenderFilter
Returns a documentation Map keyed by languageCode -> String[section,title,body].

Specified by:
getDocumentationMap in class AbstractRenderFilter
Returns:
a documentation Map keyed by languageCode -> String[section,title,body]

getDefaultHelp

protected java.lang.String[] getDefaultHelp()
Description copied from class: AbstractRenderFilter
Returns a String[section,title,body] for the default help for the filter.

Specified by:
getDefaultHelp in class AbstractRenderFilter
Returns:
a String[section,title,body] for the default help for the filter

getQuoteColors

public java.lang.String getQuoteColors()

setQuoteColors

public void setQuoteColors(java.lang.String prefix)

isReformatTextEnabled

public boolean isReformatTextEnabled()

setReformatTextEnabled

public void setReformatTextEnabled(boolean enabled)

getQuoteMode

public int getQuoteMode()

setQuoteMode

public void setQuoteMode(int quoteMode)

getQuoteChar

public java.lang.String getQuoteChar()

setQuoteChar

public void setQuoteChar(java.lang.String c)

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.