Class DelegatingMacroMetadataProvider
- java.lang.Object
-
- com.atlassian.confluence.macro.browser.DelegatingMacroMetadataProvider
-
- All Implemented Interfaces:
MacroMetadataProvider
public class DelegatingMacroMetadataProvider extends Object implements MacroMetadataProvider
Provides metadata about macros for use in the macro browser. This includes all xhtml macros and v2 that can be automatically converted to xhtml (where there is not an xhtml version).
-
-
Constructor Summary
Constructors Constructor Description DelegatingMacroMetadataProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MacroMetadata
getByMacroName(String macroName)
Returns matching metadata from the first of the providers that contains it.MacroMetadata
getByMacroNameAndId(String macroName, String alternateId)
Returns the metadata for the named macro if it is known to this provider.Collection<MacroMetadata>
getData()
Returns a collection ofMacroMetadata
for use in the Macro Browser.Collection<MacroSummary>
getSummaries()
Returns a collection ofMacroMetadata
for use in the Macro Browser.void
setMacroMetadataProviders(List<MacroMetadataProvider> macroMetadataProviders)
-
-
-
Method Detail
-
getData
public Collection<MacroMetadata> getData()
Description copied from interface:MacroMetadataProvider
Returns a collection ofMacroMetadata
for use in the Macro Browser. This collection need not necessarily be unique.- Specified by:
getData
in interfaceMacroMetadataProvider
-
getSummaries
public Collection<MacroSummary> getSummaries()
Description copied from interface:MacroMetadataProvider
Returns a collection ofMacroMetadata
for use in the Macro Browser. This collection need not necessarily be unique. It's just the summaries.- Specified by:
getSummaries
in interfaceMacroMetadataProvider
-
getByMacroName
public MacroMetadata getByMacroName(String macroName)
Returns matching metadata from the first of the providers that contains it.- Specified by:
getByMacroName
in interfaceMacroMetadataProvider
- Parameters:
macroName
- the (simple, unfriendly) name of the macro.- Returns:
- the macro's metadata or null if it is not known to this provider.
-
getByMacroNameAndId
public MacroMetadata getByMacroNameAndId(String macroName, String alternateId)
Description copied from interface:MacroMetadataProvider
Returns the metadata for the named macro if it is known to this provider. Otherwise returns null.- Specified by:
getByMacroNameAndId
in interfaceMacroMetadataProvider
- Parameters:
macroName
- the (simple, unfriendly) name of the macro.alternateId
- additional identification for macros where the macroName is not sufficient. If alternateId is null, then it should be ignored.- Returns:
- the macro's metadata or null if it is not known to this provider.
-
setMacroMetadataProviders
public void setMacroMetadataProviders(List<MacroMetadataProvider> macroMetadataProviders)
-
-