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

java.lang.Object
  extended by com.atlassian.confluence.macro.browser.beans.MacroParameter

public class MacroParameter
extends java.lang.Object

Represents parameter metadata for a macro.


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)
           
 
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.
 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()
           
 MacroParameterType getType()
           
 boolean isMultiple()
           
 boolean isRequired()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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)
Method Detail

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.


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.


getDisplayName

public Message getDisplayName()

getDescription

public Message getDescription()

toString

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


Copyright © 2003-2009 Atlassian Pty Ltd. All Rights Reserved.