|
Clearspace API (1.10.18) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.renderer.AbstractRenderFilter
public abstract class AbstractRenderFilter
An abstract implementation of the RenderFilter interface this class provides subclasses with built in support for documentation and splits apart the execute method into seperate methods depending on the render target specified in the render context.
| Constructor Summary | |
|---|---|
AbstractRenderFilter()
|
|
| Method Summary | |
|---|---|
java.lang.String |
execute(java.lang.String string,
RenderContext renderContext)
Applies the filter to the passed in string and returns the filtered string. |
protected abstract 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 abstract 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 abstract 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 abstract 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 abstract 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 abstract java.lang.String |
executeXMLTarget(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_XML. |
protected abstract java.lang.String[] |
getDefaultHelp()
Returns a String[section,title,body] for the default help for the filter. |
protected abstract java.util.Map<java.lang.String,java.lang.String[]> |
getDocumentationMap()
Returns a documentation Map keyed by languageCode -> String[section,title,body]. |
abstract java.lang.String |
getName()
Returns the unique name of the filter. |
java.lang.String[] |
getUserDocumentation(java.lang.String language)
Returns a string array of [section,title, body] of xml formatted documentation that is targetted for end user usage. |
boolean |
isDisplayable()
The default behavior is to display the filter/macro. |
boolean |
isEnabled()
Returns true if the filter is enabled, false otherwise. |
protected abstract boolean |
isEnabledByDefault()
Returns true if the filter should be enabled by default, false otherwise. |
void |
setEnabled(boolean enabled)
Sets whether the filter is enabled or disabled. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractRenderFilter()
| Method Detail |
|---|
public abstract java.lang.String getName()
RenderFilter
getName in interface RenderFilterpublic boolean isEnabled()
RenderFilter
isEnabled in interface RenderFilterpublic void setEnabled(boolean enabled)
RenderFilter
setEnabled in interface RenderFilterenabled - true if the filter should be enabled, false otherwise.public boolean isDisplayable()
isDisplayable in interface RenderFilterprotected abstract boolean isEnabledByDefault()
public java.lang.String execute(java.lang.String string,
RenderContext renderContext)
RenderFilterRenderStrategy denotes that links should not be filtered and
the current filter does nothing but change text to links, then the filter should
just return the input string.RenderTarget that the filter
should target the output towards.RenderedTextStore to store text snippets if no further rendering of the
all or portions of the returned content should not be performed.
execute in interface RenderFilterstring - the String to filterrenderContext - the context the filter is being executed within
public java.lang.String[] getUserDocumentation(java.lang.String language)
RenderFilter
getUserDocumentation in interface RenderFilterlanguage - the language as an ISO-639 language code to return the documentation in.
protected abstract java.lang.String executePlainTextTarget(java.lang.String string,
RenderContext renderContext)
RenderTarget.TARGET_PLAIN_TEXT. Each implementation is responsible figuring out
whether the content passed to it needs to be filtered.
string - the String to filterrenderContext - the context the filter is being executed within
protected abstract java.lang.String executePlainEmailTarget(java.lang.String string,
RenderContext renderContext)
RenderTarget.TARGET_PLAIN_EMAIL. Each implementation is responsible for figuring out
whether the content passed to it needs to be preserved.
string - the String to filterrenderContext - the context the filter is being executed within
protected abstract java.lang.String executeHtmlTarget(java.lang.String string,
RenderContext renderContext)
RenderTarget.TARGET_HTML. Each implementation is responsible for figuring out
whether the content passed to it needs to be preserved.
string - the String to filterrenderContext - the context the filter is being executed within
protected abstract java.lang.String executeWysiwygEditorTarget(java.lang.String string,
RenderContext renderContext)
RenderTarget.TARGET_WYSIWYG_EDITOR. Each implementation is responsible for figuring out
whether the content passed to it needs to be preserved.
string - the String to filterrenderContext - the context the filter is being executed within
protected abstract java.lang.String executeXMLTarget(java.lang.String string,
RenderContext renderContext)
RenderTarget.TARGET_XML. Each implementation is responsible for figuring out
whether the content passed to it needs to be preserved.
string - the String to filterrenderContext - the context the filter is being executed within
protected abstract java.lang.String executeNoMarkupTarget(java.lang.String string,
RenderContext renderContext)
RenderTarget.TARGET_NO_MARKUP. Each implementation is responsible for figuring out
whether the content passed to it needs to be preserved.
string - the String to filterrenderContext - the context the filter is being executed within
protected abstract java.util.Map<java.lang.String,java.lang.String[]> getDocumentationMap()
protected abstract java.lang.String[] getDefaultHelp()
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||