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

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

Represents parameter metadata for a macro.

See Also:
Serialized Form

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

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


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-2010 Atlassian. All Rights Reserved.