Class DefaultMacroMetadataProvider<T extends com.atlassian.plugin.ModuleDescriptor<Macro> & MacroMetadataSource>
- java.lang.Object
-
- com.atlassian.confluence.macro.browser.DefaultMacroMetadataProvider<T>
-
- All Implemented Interfaces:
MacroMetadataProvider
public class DefaultMacroMetadataProvider<T extends com.atlassian.plugin.ModuleDescriptor<Macro> & MacroMetadataSource> extends Object implements MacroMetadataProvider
-
-
Constructor Summary
Constructors Constructor Description DefaultMacroMetadataProvider(AllMacroMetadataProvider<T> macroMetadataCache, Class<T> descriptorClass)DefaultMacroMetadataProvider(AllMacroMetadataProvider<T> allMacroMetadataProvider, Class<T> descriptorClass, com.atlassian.plugin.predicate.ModuleDescriptorPredicate<Macro> descriptorPredicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MacroMetadatagetByMacroName(String macroName)Returns the metadata for the named macro if it is known to this provider.@Nullable MacroMetadatagetByMacroNameAndId(String macroName, String alternateId)Returns the metadata for the named macro if it is known to this provider.Collection<MacroMetadata>getData()Returns a collection ofMacroMetadatafor use in the Macro Browser.Collection<MacroSummary>getSummaries()Returns a collection ofMacroMetadatafor use in the Macro Browser.
-
-
-
Constructor Detail
-
DefaultMacroMetadataProvider
public DefaultMacroMetadataProvider(AllMacroMetadataProvider<T> macroMetadataCache, Class<T> descriptorClass)
-
DefaultMacroMetadataProvider
public DefaultMacroMetadataProvider(AllMacroMetadataProvider<T> allMacroMetadataProvider, Class<T> descriptorClass, com.atlassian.plugin.predicate.ModuleDescriptorPredicate<Macro> descriptorPredicate)
-
-
Method Detail
-
getData
public Collection<MacroMetadata> getData()
Description copied from interface:MacroMetadataProviderReturns a collection ofMacroMetadatafor use in the Macro Browser. This collection need not necessarily be unique.- Specified by:
getDatain interfaceMacroMetadataProvider
-
getSummaries
public Collection<MacroSummary> getSummaries()
Description copied from interface:MacroMetadataProviderReturns a collection ofMacroMetadatafor use in the Macro Browser. This collection need not necessarily be unique. It's just the summaries.- Specified by:
getSummariesin interfaceMacroMetadataProvider
-
getByMacroName
public MacroMetadata getByMacroName(String macroName)
Description copied from interface:MacroMetadataProviderReturns the metadata for the named macro if it is known to this provider. Otherwise returns null.- Specified by:
getByMacroNamein 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 @Nullable MacroMetadata getByMacroNameAndId(String macroName, String alternateId)
Description copied from interface:MacroMetadataProviderReturns the metadata for the named macro if it is known to this provider. Otherwise returns null.- Specified by:
getByMacroNameAndIdin 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.
-
-