com.atlassian.confluence.macro.browser.beans
Class MacroParameter

java.lang.Object
  extended by com.atlassian.confluence.macro.browser.beans.MacroParameter
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GadgetMacroParameter

public class MacroParameter
extends java.lang.Object
implements java.io.Serializable

Represents parameter metadata for a macro.

See Also:
Serialized Form

Field Summary
static java.lang.String DELIMITER_DEFAULT
           
static java.lang.String DELIMITER_OPTION
           
 
Constructor Summary
MacroParameter(java.lang.String pluginKey, java.lang.String macroName, java.lang.String name, MacroParameterType type, boolean required, boolean multiple, java.lang.String defaultValue, boolean hidden)
           
MacroParameter(java.lang.String pluginKey, java.lang.String macroName, java.lang.String name, MacroParameterType type, boolean required, boolean multiple, java.lang.String defaultValue, boolean hidden, java.lang.String documentationUrl)
          Deprecated. Since 5.5 Use MacroParameter(String, String, String, MacroParameterType, boolean, boolean, String, boolean) instead.
 
Method Summary
 void addAlias(java.lang.String alias)
          Adds an alias name for the parameter.
 void addEnumValue(java.lang.String value)
          Adds an enum value to the paramter.
 void addOption(java.lang.String key, java.lang.String value)
          Adds an option key/value pair for this parameter.
 void addOptions(java.util.Map<java.lang.String,java.lang.String> options)
           
 java.util.Set<java.lang.String> getAliases()
           
 java.lang.String getDefaultValue()
          Returns the default value of the parameter.
 Message getDescription()
           
 Message getDisplayName()
           
 java.util.List<java.lang.String> getEnumValues()
          Returns a list of enum values.
 java.lang.String getName()
           
 java.util.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(java.lang.String description)
           
 void setDisplayName(java.lang.String displayName)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DELIMITER_OPTION

public static final java.lang.String DELIMITER_OPTION
See Also:
Constant Field Values

DELIMITER_DEFAULT

public static final java.lang.String DELIMITER_DEFAULT
See Also:
Constant Field Values
Constructor Detail

MacroParameter

public MacroParameter(java.lang.String pluginKey,
                      java.lang.String macroName,
                      java.lang.String name,
                      MacroParameterType type,
                      boolean required,
                      boolean multiple,
                      java.lang.String defaultValue,
                      boolean hidden)

MacroParameter

@Deprecated
public MacroParameter(java.lang.String pluginKey,
                                 java.lang.String macroName,
                                 java.lang.String name,
                                 MacroParameterType type,
                                 boolean required,
                                 boolean multiple,
                                 java.lang.String defaultValue,
                                 boolean hidden,
                                 java.lang.String documentationUrl)
Deprecated. Since 5.5 Use MacroParameter(String, String, String, MacroParameterType, boolean, boolean, String, boolean) instead.

Method Detail

isHidden

public boolean isHidden()
Whether or not to hide the macro parameter from display in the macro browser.


addAlias

public void addAlias(java.lang.String alias)
Adds an alias name for the parameter.


addEnumValue

public void addEnumValue(java.lang.String value)
Adds an enum value to the paramter. If the parameter is not of type enum, it is ignored.


addOptions

public void addOptions(java.util.Map<java.lang.String,java.lang.String> options)

addOption

public void addOption(java.lang.String key,
                      java.lang.String value)
Adds an option key/value pair for this parameter.


getName

public java.lang.String getName()

getType

public MacroParameterType getType()

getDefaultValue

public java.lang.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 java.util.Set<java.lang.String> getAliases()
Returns:
a Set of Strings that are aliases for this macro parameter name.

getEnumValues

public java.util.List<java.lang.String> getEnumValues()
Returns a list of enum values. Null is returned if the parameter is not of type enum.


getOptions

public java.util.Properties getOptions()

getDisplayName

public Message getDisplayName()

getDescription

public Message getDescription()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setDisplayName

public void setDisplayName(java.lang.String displayName)

setDescription

public void setDescription(java.lang.String description)


Copyright © 2003-2014 Atlassian. All Rights Reserved.