Class DefaultMacroMetadataManager
- java.lang.Object
-
- com.atlassian.confluence.macro.browser.DefaultMacroMetadataManager
-
- All Implemented Interfaces:
MacroMetadataManager
public class DefaultMacroMetadataManager extends Object implements MacroMetadataManager
Manager providingMacroMetadata
about theMacro
s in Confluence.
-
-
Constructor Summary
Constructors Constructor Description DefaultMacroMetadataManager(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.event.api.EventListenerRegistrar eventListenerRegistrar)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
@NonNull Set<MacroMetadata>
getAllMacroMetadata()
Retrieve all available metadata for macros in the system.@NonNull Set<MacroSummary>
getAllMacroSummaries()
Return summaries of all macros in the system.MacroMetadata
getMacroMetadataByName(String macroName)
Retrieve the metadata for a single macro.MacroMetadata
getMacroMetadataByNameAndId(String macroName, String alternateId)
Retrieve the metadata for a single macro.@NonNull Map<String,MacroParameter>
getParameters(String macroName)
Retrieve the parameter information for a single macro.@NonNull Map<String,MacroParameterType>
getParameterTypes(String macroName)
Retrieve the parameter type information for a single macro.void
init()
void
onPluginFrameworkStartedEvent(AsyncPluginFrameworkStartedEvent event)
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
destroy
@PreDestroy public void destroy()
-
onPluginFrameworkStartedEvent
@EventListener public void onPluginFrameworkStartedEvent(AsyncPluginFrameworkStartedEvent event)
-
getAllMacroMetadata
public @NonNull Set<MacroMetadata> getAllMacroMetadata()
Description copied from interface:MacroMetadataManager
Retrieve all available metadata for macros in the system.- Specified by:
getAllMacroMetadata
in interfaceMacroMetadataManager
-
getAllMacroSummaries
public @NonNull Set<MacroSummary> getAllMacroSummaries()
Description copied from interface:MacroMetadataManager
Return summaries of all macros in the system.- Specified by:
getAllMacroSummaries
in interfaceMacroMetadataManager
-
getMacroMetadataByName
public MacroMetadata getMacroMetadataByName(String macroName)
Description copied from interface:MacroMetadataManager
Retrieve the metadata for a single macro. This may not be very efficient internally.- Specified by:
getMacroMetadataByName
in interfaceMacroMetadataManager
- Parameters:
macroName
- the (simple, unfriendly) name of the macro, as will be returned byMacroMetadata.getMacroName()
orMacroDefinition.getName()
.
-
getMacroMetadataByNameAndId
public MacroMetadata getMacroMetadataByNameAndId(String macroName, String alternateId)
Description copied from interface:MacroMetadataManager
Retrieve the metadata for a single macro. This may not be very efficient internally.- Specified by:
getMacroMetadataByNameAndId
in interfaceMacroMetadataManager
- Parameters:
macroName
- the (simple, unfriendly) name of the macro, as will be returned byMacroMetadata.getMacroName()
orMacroDefinition.getName()
.alternateId
- additional identification for macros where the macroName is not sufficient. This will be ignored, if null.
-
getParameterTypes
public @NonNull Map<String,MacroParameterType> getParameterTypes(String macroName)
Description copied from interface:MacroMetadataManager
Retrieve the parameter type information for a single macro.- Specified by:
getParameterTypes
in interfaceMacroMetadataManager
- Parameters:
macroName
- the name of the macro, as will be returned byMacroMetadata.getMacroName()
orMacroDefinition.getName()
.- Returns:
- A map consisting of the parameter name and its corresponding type.
-
getParameters
public @NonNull Map<String,MacroParameter> getParameters(String macroName)
Description copied from interface:MacroMetadataManager
Retrieve the parameter information for a single macro.- Specified by:
getParameters
in interfaceMacroMetadataManager
- Parameters:
macroName
- the name of the macro, as will be returned byMacroMetadata.getMacroName()
orMacroDefinition.getName()
.- Returns:
- A map consisting of the parameter name and its corresponding metadata.
-
-