com.jivesoftware.community.renderer
Class BaseMacro
java.lang.Object
com.jivesoftware.community.renderer.AbstractRenderFilter
com.jivesoftware.community.renderer.BaseFilter
com.jivesoftware.community.renderer.BaseMacro
- All Implemented Interfaces:
- RenderFilter, RenderMacro
public abstract class BaseMacro
- extends BaseFilter
- implements RenderMacro
A Base class to be used to create macros.
-
Name : Used to change the name of the macro. If not used getClass().getShortName() is used.
-
Description : A description of the macro. No description by default.
Subclasses of this macro can be configured by using annotions:
-
EnableByDefault : Whether this macro is enabled or disabled by default. The default value is true.
-
SingleTagMacro : Whether this macro is a single tag, or has two tags and body content. The default value is true.
-
RenderTypes : RenderTypes this macro works for. Default is RenderType.BODY
- See Also:
Name,
Description,
EnableByDefault,
SingleTagMacro,
RenderType
|
Method Summary |
java.lang.String |
getMacroTagName()
Returns the name of the macro tag Defined by the MacroTagName annotation if defined,
otherwise the value of getClass().getShortName() will be used. |
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Returns the parameters passed into this tag. |
boolean |
isSingleTagMacro()
Returns the value of the SingleTagMacro annotation if it is defined, other wise true. |
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 class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseMacro
public BaseMacro()
getMacroTagName
public java.lang.String getMacroTagName()
- Returns the name of the macro tag Defined by the MacroTagName annotation if defined,
otherwise the value of getClass().getShortName() will be used.
- Specified by:
getMacroTagName in interface RenderMacro
- Returns:
- The name of the tag for the macro.
isSingleTagMacro
public boolean isSingleTagMacro()
- Returns the value of the SingleTagMacro annotation if it is defined, other wise true.
- Specified by:
isSingleTagMacro in interface RenderMacro
- Returns:
- Whether or not this tag is a single tag.
getParameters
public java.util.Map<java.lang.String,java.lang.String> getParameters()
- Returns the parameters passed into this tag.
- Specified by:
getParameters in interface RenderMacro
- Returns:
- The parameters passed into this tag.
setParameters
public void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
- Description copied from interface:
RenderMacro
- Sets a map of user provided parameters for the macro to use.
- Specified by:
setParameters in interface RenderMacro
- Parameters:
parameters - a map of user provided parameters
Copyright © 1999-2007 Jive Software.