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