com.atlassian.confluence.xhtml.api
Class MacroDefinition
java.lang.Object
com.atlassian.confluence.xhtml.api.MacroDefinition
public class MacroDefinition
- extends java.lang.Object
An object that encapsulates the state for a macro.
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
MacroDefinition
public MacroDefinition()
MacroDefinition
public MacroDefinition(MacroDefinition macroDefinition)
- Copy constructor.
- Parameters:
macroDefinition - copy the state of this macro definition into this new instance
MacroDefinition
public MacroDefinition(java.lang.String name,
MacroBody body,
java.lang.String defaultParameterValue,
java.util.Map<java.lang.String,java.lang.String> parameters)
- Construct a macro definition.
- Parameters:
name - the name of the macrobody - the macro body. Should be set to null if the macro does not have a body. Also see PlainTextMacroBody and RichTextMacroBody.defaultParameterValue - the default macro parameter value. This value is not assigned an actual parameter name.parameters - the macro parameters
getName
public java.lang.String getName()
getDefaultParameterValue
public java.lang.String getDefaultParameterValue()
getBodyText
public java.lang.String getBodyText()
getBodyStream
public Streamable getBodyStream()
getBody
public MacroBody getBody()
hasBody
public boolean hasBody()
getParameters
public java.util.Map<java.lang.String,java.lang.String> getParameters()
setName
public void setName(java.lang.String name)
setDefaultParameterValue
public void setDefaultParameterValue(java.lang.String defaultParameterValue)
setBody
public void setBody(MacroBody body)
setParameters
public void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
isValid
public boolean isValid()
- Returns:
- true if there is at least a name on this MacroDefinition.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
Copyright © 2003-2013 Atlassian. All Rights Reserved.