|
Clearspace API (1.7.0) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RenderMacro
The RenderMacro interface is an extension to the RenderFilter interface, the main difference being that it will not execute over the whole page, rather it will be provided with just the text between the macro tags, if it exists.
Macros have 0 or more properties that can be configured by an administrator. Each property may control any aspect of how the macro works -- for example, a property named "color" could control which color to format text in. All properties are configurable through the standard JavaBeans conventions. You should specify exactly which properties can be controlled by an administrator by using theBeanInfo interface and
JiveBeanInfo class described above.
RenderFilter,
JiveBeanInfo| Method Summary | |
|---|---|
java.lang.String |
execute(java.lang.String string,
RenderContext renderContext)
Executes the render macro against the provided string and render context. |
java.lang.String |
getMacroTagName()
Returns the tag name of the macro. |
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Returns a Map of user provided parameters to the macro. |
boolean |
isSingleTagMacro()
Returns true is the macro has only a single tag such as {testMacro}, false if the macro should have both an opening and closing tag ({testMacro}text here{testMacro}) |
void |
setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Sets a map of user provided parameters for the macro to use. |
| Methods inherited from interface com.jivesoftware.community.renderer.RenderFilter |
|---|
getName, getUserDocumentation, isEnabled, setEnabled |
| Method Detail |
|---|
java.lang.String getMacroTagName()
boolean isSingleTagMacro()
java.lang.String execute(java.lang.String string,
RenderContext renderContext)
RenderStrategy denotes that macros should not run or that links
should not be filtered and the current macro does nothing but insert links,
then the macro should just return the input string.RenderTarget that the macro
should target the output towards.RenderTarget.TARGET_WYSIWYG_EDITOR
must support being 'unrendered' using a render target of RenderTarget.TARGET_PLAIN_TEXT
if they are to output html. Otherwise, macros should just output the wiki macro syntax when
called with a strategy that uses the RenderTarget.TARGET_WYSIWYG_EDITOR target.
Macros should expect that further processing of the returned text will be done. Use the
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 body of the macro if this macro has both opening and closing tags, null otherwiserenderContext - the context the macro is being executed within
RenderFilter.execute(String, RenderContext)java.util.Map<java.lang.String,java.lang.String> getParameters()
void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
parameters - a map of user provided parameters
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||