public class MacroDefinition extends Object
Modifier and Type | Field and Description |
---|---|
static String |
STORAGE_VERSION_1 |
static String |
STORAGE_VERSION_2 |
Constructor and Description |
---|
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. |
public static final String STORAGE_VERSION_1
public static final String STORAGE_VERSION_2
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 typespublic String getName()
public String getDefaultParameterValue()
getParameter(java.lang.String)
or getTypedParameter(java.lang.String, java.lang.Class<T>)
with ""public String getBodyText()
getStorageBodyStream()
,
getTransformedBodyStream()
,
RequiresFormat
public Streamable getBodyStream()
getStorageBodyStream()
,
getTransformedBodyStream()
,
RequiresFormat
public Streamable getStorageBodyStream()
public Streamable getTransformedBodyStream()
public MacroBody getBody()
public boolean hasBody()
public void setName(String name)
public void setDefaultParameterValue(String defaultParameterValue)
public void setBody(MacroBody body)
public String getStorageVersion()
public void setStorageVersion(String storageVersion)
public boolean isValid()
public String macroHash()
Copyright © 2003–2016 Atlassian. All rights reserved.