Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.renderer.filter
Class ForumFilter

java.lang.Object
  extended by com.jivesoftware.forum.renderer.AbstractRenderFilter
      extended by com.jivesoftware.forum.renderer.filter.AbstractRegexTokenRenderFilter
          extended by com.jivesoftware.forum.renderer.impl.AbstractClassicRegexTokenRenderFilter
              extended by com.jivesoftware.forum.renderer.filter.ForumFilter
All Implemented Interfaces:
com.jivesoftware.forum.renderer.impl.JiveClassicRenderFilter, com.jivesoftware.forum.renderer.impl.JiveSystemRenderFilter, RenderFilter, TagFilter

public class ForumFilter
extends AbstractClassicRegexTokenRenderFilter
implements TagFilter, com.jivesoftware.forum.renderer.impl.JiveClassicRenderFilter

A filter that converts [forum]123[/forum] tags into urls.


Field Summary
 
Fields inherited from class com.jivesoftware.forum.renderer.filter.AbstractRegexTokenRenderFilter
MULTILINE, SINGLELINE
 
Constructor Summary
ForumFilter()
           
 
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 getEndTag()
           
 java.lang.String getForumMatch()
           
 java.lang.String getMidTag()
           
 java.lang.String getName()
          Returns the unique name of the filter.
 java.lang.String getStartTag()
           
 java.lang.String[] getTags()
          Returns an array of string for the tag names a filter uses.
 void handleMatch(java.lang.StringBuffer buffer, JdkMatchResult result, RenderContext renderContext)
          Method is called for every occurance of a regular expression.
protected  boolean isEnabledByDefault()
          Returns true if the filter should be enabled by default, false otherwise.
 void setEndTag(java.lang.String endTag)
           
 void setForumMatch(java.lang.String match)
           
 void setMidTag(java.lang.String midTag)
           
 void setStartTag(java.lang.String startTag)
           
 
Methods inherited from class com.jivesoftware.forum.renderer.impl.AbstractClassicRegexTokenRenderFilter
isDisplayable, isTest, setTest
 
Methods inherited from class com.jivesoftware.forum.renderer.filter.AbstractRegexTokenRenderFilter
addRegex, addRegex, addRegex, clearRegex, filter
 
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
 
Methods inherited from interface com.jivesoftware.forum.renderer.RenderFilter
execute, getUserDocumentation, isEnabled, setEnabled
 
Methods inherited from interface com.jivesoftware.forum.renderer.impl.JiveClassicRenderFilter
isDisplayable
 

Constructor Detail

ForumFilter

public ForumFilter()
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.

getTags

public java.lang.String[] getTags()
Description copied from interface: TagFilter
Returns an array of string for the tag names a filter uses. For example, a filter which filters upon the tags [url] and [ftp] should return a two element array of "url", "ftp"

Specified by:
getTags in interface TagFilter
Returns:
an array of string for the tag names a filter uses.

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

handleMatch

public void handleMatch(java.lang.StringBuffer buffer,
                        JdkMatchResult result,
                        RenderContext renderContext)
Description copied from class: AbstractRegexTokenRenderFilter
Method is called for every occurance of a regular expression. Subclasses have to implement this method.

Specified by:
handleMatch in class AbstractRegexTokenRenderFilter
Parameters:
buffer - Buffer to write replacement string to
result - Hit with the found regular expression
renderContext - RenderContext for filters
See Also:
RegexTokenFilter.handleMatch(StringBuffer, com.jivesoftware.forum.renderer.filter.regex.jdk.JdkMatchResult, com.jivesoftware.forum.renderer.RenderContext)

getStartTag

public java.lang.String getStartTag()

setStartTag

public void setStartTag(java.lang.String startTag)

getMidTag

public java.lang.String getMidTag()

setMidTag

public void setMidTag(java.lang.String midTag)

getEndTag

public java.lang.String getEndTag()

setEndTag

public void setEndTag(java.lang.String endTag)

getForumMatch

public java.lang.String getForumMatch()

setForumMatch

public void setForumMatch(java.lang.String match)

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.