Class MacroParameter
- java.lang.Object
-
- com.atlassian.confluence.macro.browser.beans.MacroParameter
-
- All Implemented Interfaces:
Serializable
public class MacroParameter extends Object implements Serializable
Represents parameter metadata for a macro.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DELIMITER_DEFAULT
static String
DELIMITER_OPTION
-
Constructor Summary
Constructors Constructor Description MacroParameter(String pluginKey, String macroName, String name, MacroParameterType type, boolean required, boolean multiple, String defaultValue, boolean hidden)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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.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()
-
-
-
Field Detail
-
DELIMITER_OPTION
public static final String DELIMITER_OPTION
- See Also:
- Constant Field Values
-
DELIMITER_DEFAULT
public static final String DELIMITER_DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MacroParameter
public MacroParameter(String pluginKey, String macroName, String name, MacroParameterType type, boolean required, boolean multiple, String defaultValue, boolean hidden)
-
-
Method Detail
-
isHidden
public boolean isHidden()
Whether or not to hide the macro parameter from display in the macro browser.
-
addAlias
public void addAlias(String alias)
Adds an alias name for the parameter.
-
addEnumValue
public void addEnumValue(String value)
Adds an enum value to the paramter.If the parameter is not of type enum, it is ignored.
-
addOption
public void addOption(String key, String value)
Adds an option key/value pair for this parameter.
-
getName
public String getName()
-
getType
public MacroParameterType getType()
-
getDefaultValue
public String getDefaultValue()
Returns the default value of the parameter. Null is returned if there is no default value defined except forMacroParameterType.BOOLEAN
type parameters; in which case "false" is returned.
-
isRequired
public boolean isRequired()
- Returns:
- true if the parameter is required for the macro.
-
isMultiple
public boolean isMultiple()
- Returns:
- true if the parameter allows multiple values.
-
getAliases
public Set<String> getAliases()
- Returns:
- a Set of Strings that are aliases for this macro parameter name.
-
getEnumValues
public List<String> getEnumValues()
Returns a list of enum values.Null is returned if the parameter is not of type enum.
-
getEnumMapValueName
@Deprecated public Map<String,Message> getEnumMapValueName()
Deprecated.since 6.7.3. UsegetEnumToI18nKeyMapping()
instead.Returns a map of enum values with it alias. Null is returned if the parameter is not of type enum.
-
getEnumToI18nKeyMapping
public Map<String,Message> getEnumToI18nKeyMapping()
Returns a map of enum values with it alias. Null is returned if the parameter is not of type enum.
-
getOptions
public Properties getOptions()
-
getDisplayName
public Message getDisplayName()
-
getDescription
public Message getDescription()
-
setDisplayName
public void setDisplayName(String displayName)
-
setDescription
public void setDescription(String description)
-
-