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:
  • Field Details

  • Constructor Details

  • Method Details

    • 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.

    • addOptions

      public void addOptions(Map<String,String> options)
    • 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 for MacroParameterType.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. Use getEnumToI18nKeyMapping() 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()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setDisplayName

      public void setDisplayName(String displayName)
    • setDescription

      public void setDescription(String description)