public class MacroParameter extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
DELIMITER_DEFAULT |
static String |
DELIMITER_OPTION |
Constructor and Description |
---|
MacroParameter(String pluginKey,
String macroName,
String name,
MacroParameterType type,
boolean required,
boolean multiple,
String defaultValue,
boolean hidden) |
Modifier and Type | Method and Description |
---|---|
void |
addAlias(String alias)
Adds an alias name for the parameter.
|
void |
addEnumValue(String value)
Adds an enum value to the paramter.
|
void |
addOption(String key,
String value)
Adds an option key/value pair for this parameter.
|
void |
addOptions(Map<String,String> options) |
Set<String> |
getAliases() |
String |
getDefaultValue()
Returns the default value of the parameter.
|
Message |
getDescription() |
Message |
getDisplayName() |
Map<String,Message> |
getEnumMapValueName()
Deprecated.
since 6.7.3. Use
getEnumToI18nKeyMapping() instead. |
Map<String,Message> |
getEnumToI18nKeyMapping()
Returns a map of enum values with it alias.
|
List<String> |
getEnumValues()
Returns a list of enum values.
|
String |
getName() |
Properties |
getOptions() |
MacroParameterType |
getType() |
boolean |
isHidden()
Whether or not to hide the macro parameter from display in the macro browser.
|
boolean |
isMultiple() |
boolean |
isRequired() |
void |
setDescription(String description) |
void |
setDisplayName(String displayName) |
String |
toString() |
public static final String DELIMITER_OPTION
public static final String DELIMITER_DEFAULT
public MacroParameter(String pluginKey, String macroName, String name, MacroParameterType type, boolean required, boolean multiple, String defaultValue, boolean hidden)
public boolean isHidden()
public void addAlias(String alias)
public void addEnumValue(String value)
If the parameter is not of type enum, it is ignored.
public void addOption(String key, String value)
public String getName()
public MacroParameterType getType()
public String getDefaultValue()
MacroParameterType.BOOLEAN
type parameters; in which case "false" is returned.public boolean isRequired()
public boolean isMultiple()
public Set<String> getAliases()
public List<String> getEnumValues()
Null is returned if the parameter is not of type enum.
@Deprecated public Map<String,Message> getEnumMapValueName()
getEnumToI18nKeyMapping()
instead.public Map<String,Message> getEnumToI18nKeyMapping()
public Properties getOptions()
public Message getDisplayName()
public Message getDescription()
public void setDisplayName(String displayName)
public void setDescription(String description)
Copyright © 2003–2020 Atlassian. All rights reserved.