Class MacroParameter
java.lang.Object
com.atlassian.confluence.macro.browser.beans.MacroParameter
- All Implemented Interfaces:
Serializable
Represents parameter metadata for a macro.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMacroParameter(String pluginKey, String macroName, String name, MacroParameterType type, boolean required, boolean multiple, String defaultValue, boolean hidden) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an alias name for the parameter.voidaddEnumValue(String value) Adds an enum value to the paramter.voidAdds an option key/value pair for this parameter.voidaddOptions(Map<String, String> options) Returns the default value of the parameter.Deprecated.since 6.7.3.Returns a map of enum values with it alias.Returns a list of enum values.getName()getType()booleanisHidden()Whether or not to hide the macro parameter from display in the macro browser.booleanbooleanvoidsetDescription(String description) voidsetDisplayName(String displayName) toString()
-
Field Details
-
DELIMITER_OPTION
- See Also:
-
DELIMITER_DEFAULT
- See Also:
-
-
Constructor Details
-
MacroParameter
public MacroParameter(String pluginKey, String macroName, String name, MacroParameterType type, boolean required, boolean multiple, String defaultValue, boolean hidden)
-
-
Method Details
-
isHidden
public boolean isHidden()Whether or not to hide the macro parameter from display in the macro browser. -
addAlias
Adds an alias name for the parameter. -
addEnumValue
Adds an enum value to the paramter.If the parameter is not of type enum, it is ignored.
-
addOptions
-
addOption
Adds an option key/value pair for this parameter. -
getName
-
getType
-
getDefaultValue
Returns the default value of the parameter. Null is returned if there is no default value defined except forMacroParameterType.BOOLEANtype 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
- Returns:
- a Set of Strings that are aliases for this macro parameter name.
-
getEnumValues
Returns a list of enum values.Null is returned if the parameter is not of type enum.
-
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
Returns a map of enum values with it alias. Null is returned if the parameter is not of type enum. -
getOptions
-
getDisplayName
-
getDescription
-
toString
-
setDisplayName
-
setDescription
-