public class

MacroMetadata

extends Object
java.lang.Object
   ↳ com.atlassian.confluence.macro.browser.beans.MacroMetadata
Known Direct Subclasses

Class Overview

A Bean that encapsulates the 'metadata' of the macro. Its purpose is to provide an overview of the macro for the Macro Browser's list of available macros, and to include information about how the macro should be displayed in the list (e.g. "hidden"). More detailed macro metadata including parameter details is encapsulated by the MacroFormDetails class.

Summary

Public Constructors
MacroMetadata(String macroName, String pluginKey, String title, MacroIcon icon, String description, Set<String> aliases, Set<String> categories, boolean isBodyDeprecated, boolean hidden, MacroFormDetails formDetails, String alternateId, List<MacroPropertyPanelButton> buttons)
Public Methods
Set<String> getAliases()
Returns aliases for this macro.
String getAlternateId()
Returns an alternative id for the macro.
List<MacroPropertyPanelButton> getButtons()
Set<String> getCategories()
Returns categories this macro should be displayed within in the Macro Browser.
Message getDescription()
MacroFormDetails getFormDetails()
MacroIcon getIcon()
String getMacroName()
String getPluginKey()
Message getTitle()
boolean isBodyDeprecated()
boolean isHidden()
static MacroMetadata makeFreeformSummary(String macroName, String pluginKey, String title, String description, MacroFormDetails formDetails)
This method is deprecated. Freeform macros are no longer supported
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MacroMetadata (String macroName, String pluginKey, String title, MacroIcon icon, String description, Set<String> aliases, Set<String> categories, boolean isBodyDeprecated, boolean hidden, MacroFormDetails formDetails, String alternateId, List<MacroPropertyPanelButton> buttons)

Public Methods

public Set<String> getAliases ()

Returns aliases for this macro. Aliases are other macro names that can be substituted for the "main" macro name. For example "web-widget" can be used instead of "widget" for the "Widget Connector" macro. Only the "main" name is used by the macro-browser, so we use the Strings returned by this method to edit in the macro-browser those macros with an alias in their markup.

Returns
  • a set of strings that are aliases of the macro name.

public String getAlternateId ()

Returns an alternative id for the macro. This is necessary as the macro name may not necessary be unique.

public List<MacroPropertyPanelButton> getButtons ()

public Set<String> getCategories ()

Returns categories this macro should be displayed within in the Macro Browser. Categories allow macros to be browsed instead of searched. The Macro Browser has a list view where all macros for a given category are displayed, and adding the category name to the set returned from this method displays this macro in that category list.

Returns
  • a set of strings that are names of MacroCategory enum objects.

public Message getDescription ()

public MacroFormDetails getFormDetails ()

public MacroIcon getIcon ()

Returns
  • the MacroIcon , containing the url string to the macro icon and whether or not the URL is relative. Can return null.

public String getMacroName ()

public String getPluginKey ()

public Message getTitle ()

public boolean isBodyDeprecated ()

Returns
  • true if the body of the macro is deprecated (defined the macro configuration). Use this method to take precedence over the hasBody() implementation.

public boolean isHidden ()

Returns
  • true if this metadata should not appear in the Macro Browser.

public static MacroMetadata makeFreeformSummary (String macroName, String pluginKey, String title, String description, MacroFormDetails formDetails)

This method is deprecated.
Freeform macros are no longer supported

public String toString ()