Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.renderer.filter
Class JIRAFilter

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

public class JIRAFilter
extends AbstractRenderFilter
implements com.jivesoftware.forum.renderer.impl.JiveSystemRenderFilter

A filter for transforming JIRA issue numbers into more detailed issue information as well as a link to the actual issue. The filter looks for properly formed issue ID's, such as FORUMS-123.


Constructor Summary
JIRAFilter()
           
 
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 getJiraInstance()
          Returns the base URL for the JIRA instance.
 java.lang.String getName()
          Returns the unique name of the filter.
 java.lang.String getPassword()
          Returns the password used to connect to the JIRA instance or null if no password is used.
 java.lang.String getProjectNames()
          Returns the list of comma-delimited project names to be looked for.
 java.lang.String getUsername()
          Returns the username used to connect to the JIRA instance or null if no username is used.
protected  boolean isEnabledByDefault()
          Returns true if the filter should be enabled by default, false otherwise.
 boolean isOpenWindow()
          Returns true if link clicks should pen a new window.
 boolean isTrackbackEnabled()
          Returns true if trackabck information is sent to the JIRA instance.
 boolean isUseNewStyle()
          Returns true if the filter should use the new RSS feeds available in Jira 3.7.
 void setJiraInstance(java.lang.String jiraInstance)
          Sets the base URL for the JIRA instance.
 void setOpenWindow(boolean openWindow)
          Toggle for opening a new window when clicking an issue link.
 void setPassword(java.lang.String password)
          Sets the password used to connect to the JIRA instance or null if no password is used.
 void setProjectNames(java.lang.String projectNames)
          Sets the list of comma-delimited project names to be looked for.
 void setTrackbackEnabled(boolean trackbackEnabled)
          Sets whether trackabck information is sent to the JIRA instance.
 void setUseNewStyle(boolean useNewStyle)
          True to use new style, false to use RSS URL style from versions less than 3.7.
 void setUsername(java.lang.String username)
          Sets the username used to connect to the JIRA instance or null if no username is used.
 
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
 

Constructor Detail

JIRAFilter

public JIRAFilter()
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

getProjectNames

public java.lang.String getProjectNames()
Returns the list of comma-delimited project names to be looked for.

Returns:
The list of comma-delimited project names to be looked for.

setProjectNames

public void setProjectNames(java.lang.String projectNames)
Sets the list of comma-delimited project names to be looked for.

Parameters:
projectNames - the list of comma-delimited project names to look for.

getJiraInstance

public java.lang.String getJiraInstance()
Returns the base URL for the JIRA instance.

Returns:
the base URL for the JIRA intstance.

setJiraInstance

public void setJiraInstance(java.lang.String jiraInstance)
Sets the base URL for the JIRA instance.

Parameters:
jiraInstance - the base URL of the JIRA instance.

isOpenWindow

public boolean isOpenWindow()
Returns true if link clicks should pen a new window.

Returns:
flag for opening a new window.

setOpenWindow

public void setOpenWindow(boolean openWindow)
Toggle for opening a new window when clicking an issue link.

Parameters:
openWindow - toggle for opening a new window.

isUseNewStyle

public boolean isUseNewStyle()
Returns true if the filter should use the new RSS feeds available in Jira 3.7. Exists because of a bug with URL parameters not being included in HTTP redirects issued by Jira. See: Defaults to true.

Returns:
true if the filter should use the new RSS feeds available in Jira 3.7

setUseNewStyle

public void setUseNewStyle(boolean useNewStyle)
True to use new style, false to use RSS URL style from versions less than 3.7.

Parameters:
useNewStyle - true to use new style, false to use RSS URL style from versions less than 3.7.

getUsername

public java.lang.String getUsername()
Returns the username used to connect to the JIRA instance or null if no username is used.

Returns:
the username used to connect to JIRA or null if no username.

setUsername

public void setUsername(java.lang.String username)
Sets the username used to connect to the JIRA instance or null if no username is used.

Parameters:
username - the username used to connect to JIRA or null if no username.

getPassword

public java.lang.String getPassword()
Returns the password used to connect to the JIRA instance or null if no password is used.

Returns:
the password used to connect to JIRA or null if no password.

setPassword

public void setPassword(java.lang.String password)
Sets the password used to connect to the JIRA instance or null if no password is used.

Parameters:
password - the password used to connect to JIRA or null if no password.

isTrackbackEnabled

public boolean isTrackbackEnabled()
Returns true if trackabck information is sent to the JIRA instance. Trackbacks are used to link a forum thread to an issue.

Returns:
true if trackback is enabled.

setTrackbackEnabled

public void setTrackbackEnabled(boolean trackbackEnabled)
Sets whether trackabck information is sent to the JIRA instance. Trackbacks are used to link a forum thread to an issue.

Parameters:
trackbackEnabled - true if trackback is enabled.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.