|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.xhtml.api.MacroDefinition
public class MacroDefinition
An object that encapsulates the state for a macro.
Field Summary | |
---|---|
static java.lang.String |
STORAGE_VERSION_1
|
static java.lang.String |
STORAGE_VERSION_2
|
Constructor Summary | |
---|---|
MacroDefinition()
|
|
MacroDefinition(MacroDefinition macroDefinition)
Copy constructor. |
|
MacroDefinition(java.lang.String name,
MacroBody body,
java.util.Map<java.lang.String,java.lang.String> parameters,
java.util.Map<java.lang.String,java.lang.Object> typedParameters,
java.lang.String storageVersion)
Construct a macro definition. |
|
MacroDefinition(java.lang.String name,
MacroBody body,
java.lang.String defaultParameterValue,
java.util.Map<java.lang.String,java.lang.String> parameters)
Deprecated. since 5.2. Call MacroDefinition(String, MacroBody, Map, Map, String) instead and pass parsed parameter values. |
Method Summary | ||
---|---|---|
boolean |
equals(java.lang.Object o)
|
|
MacroBody |
getBody()
|
|
Streamable |
getBodyStream()
|
|
java.lang.String |
getBodyText()
|
|
java.lang.String |
getDefaultParameterValue()
Equivalent to getParameter(java.lang.String) or getTypedParameter(java.lang.String, java.lang.Class with "" |
|
java.lang.String |
getName()
|
|
java.lang.String |
getParameter(java.lang.String name)
|
|
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
|
|
java.lang.String |
getStorageVersion()
|
|
|
getTypedParameter(java.lang.String name,
java.lang.Class<T> type)
|
|
java.util.Map<java.lang.String,java.lang.Object> |
getTypedParameters()
|
|
boolean |
hasBody()
|
|
int |
hashCode()
|
|
boolean |
isValid()
|
|
void |
setBody(MacroBody body)
|
|
void |
setDefaultParameterValue(java.lang.String defaultParameterValue)
|
|
void |
setName(java.lang.String name)
|
|
void |
setParameter(java.lang.String name,
java.lang.String value)
|
|
void |
setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
|
|
void |
setStorageVersion(java.lang.String storageVersion)
|
|
void |
setTypedParameter(java.lang.String name,
java.lang.Object value)
|
|
void |
setTypedParameters(java.util.Map<java.lang.String,java.lang.Object> typedParameters)
|
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STORAGE_VERSION_1
public static final java.lang.String STORAGE_VERSION_2
Constructor Detail |
---|
public MacroDefinition()
public MacroDefinition(MacroDefinition macroDefinition)
macroDefinition
- copy the state of this macro definition into this new instance@Deprecated public MacroDefinition(java.lang.String name, MacroBody body, java.lang.String defaultParameterValue, java.util.Map<java.lang.String,java.lang.String> parameters)
MacroDefinition(String, MacroBody, Map, Map, String)
instead and pass parsed parameter values.
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 parameterspublic MacroDefinition(java.lang.String name, MacroBody body, java.util.Map<java.lang.String,java.lang.String> parameters, java.util.Map<java.lang.String,java.lang.Object> typedParameters, java.lang.String storageVersion)
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.parameters
- the macro parameterstypedParameters
- the macro parameters that are pre-parsed into their associated typesMethod Detail |
---|
public java.lang.String getName()
public java.lang.String getDefaultParameterValue()
getParameter(java.lang.String)
or getTypedParameter(java.lang.String, java.lang.Class)
with ""
public java.lang.String getBodyText()
public Streamable getBodyStream()
public MacroBody getBody()
public boolean hasBody()
public java.util.Map<java.lang.String,java.lang.String> getParameters()
public java.util.Map<java.lang.String,java.lang.Object> getTypedParameters()
public java.lang.String getParameter(java.lang.String name)
public <T> T getTypedParameter(java.lang.String name, java.lang.Class<T> type)
public void setName(java.lang.String name)
public void setDefaultParameterValue(java.lang.String defaultParameterValue)
public void setBody(MacroBody body)
public void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
public void setTypedParameters(java.util.Map<java.lang.String,java.lang.Object> typedParameters)
public void setParameter(java.lang.String name, java.lang.String value)
public void setTypedParameter(java.lang.String name, java.lang.Object value)
public java.lang.String getStorageVersion()
public void setStorageVersion(java.lang.String storageVersion)
public boolean isValid()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |