com.atlassian.confluence.macro.browser.beans
Enum MacroParameterType

java.lang.Object
  extended by java.lang.Enum<MacroParameterType>
      extended by com.atlassian.confluence.macro.browser.beans.MacroParameterType
All Implemented Interfaces:
Serializable, Comparable<MacroParameterType>

public enum MacroParameterType
extends Enum<MacroParameterType>

The type of a macro parameter that will appear in the Macro Browser. Matches enum values in the macro_fallback.xml DTD.


Enum Constant Summary
ATTACHMENT
          An attachment name (optionally qualified by container content title, space key and/or publication date).
BOOLEAN
          A boolean value.
COLOR
          A colour in CSS format.
CONFLUENCE_CONTENT
          A content entity title (optionally qualified by space key and/or publication date).
CQL
          A CQL expression, generally for macros that perform content searches.
DATE
          A blog publication date (optionally qualified by space key).
ENUM
          A string, chosen from a limited set of values.
FULL_ATTACHMENT
          An attachment name (param with that type will be stored in storage format as below) When convert from storage format above to macro definition.
GROUP
          A group.
INT
          An integer.
LABEL
          A label.
PERCENTAGE
          A number, including a percent sign.
RELATIVE_DATE
          A date range, specified by one or two time offsets (e.g.
SPACE_KEY
          A space key.
STRING
          A raw string, or some other type not handled by confluence.
URL
          A URL.
USERNAME
          A user.
 
Method Summary
static MacroParameterType get(String name)
           
 String getName()
           
 String toString()
           
static MacroParameterType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MacroParameterType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

STRING

public static final MacroParameterType STRING
A raw string, or some other type not handled by confluence.


BOOLEAN

public static final MacroParameterType BOOLEAN
A boolean value.


USERNAME

public static final MacroParameterType USERNAME
A user. Stored as a username string. Converted to a user object when returned.


ENUM

public static final MacroParameterType ENUM
A string, chosen from a limited set of values.


INT

public static final MacroParameterType INT
An integer.


SPACE_KEY

public static final MacroParameterType SPACE_KEY
A space key.


RELATIVE_DATE

public static final MacroParameterType RELATIVE_DATE
A date range, specified by one or two time offsets (e.g. 1d or 1d,2d).


PERCENTAGE

public static final MacroParameterType PERCENTAGE
A number, including a percent sign. Stored as a string.


CONFLUENCE_CONTENT

public static final MacroParameterType CONFLUENCE_CONTENT
A content entity title (optionally qualified by space key and/or publication date).


URL

public static final MacroParameterType URL
A URL.


COLOR

public static final MacroParameterType COLOR
A colour in CSS format. Stored as a string.


ATTACHMENT

public static final MacroParameterType ATTACHMENT
An attachment name (optionally qualified by container content title, space key and/or publication date). TODO When does this ever get qualified?


FULL_ATTACHMENT

public static final MacroParameterType FULL_ATTACHMENT
An attachment name (param with that type will be stored in storage format as below) When convert from storage format above to macro definition. This param will be converted to 4 params(attachment name, page,space,date)


LABEL

public static final MacroParameterType LABEL
A label.


DATE

public static final MacroParameterType DATE
A blog publication date (optionally qualified by space key). TODO When does this ever get qualified?


GROUP

public static final MacroParameterType GROUP
A group.


CQL

public static final MacroParameterType CQL
A CQL expression, generally for macros that perform content searches.

Method Detail

values

public static MacroParameterType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MacroParameterType c : MacroParameterType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MacroParameterType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getName

public String getName()

get

public static MacroParameterType get(String name)

toString

public String toString()
Overrides:
toString in class Enum<MacroParameterType>


Copyright © 2003–2015 Atlassian. All rights reserved.