public class DefaultMacroMetadataProvider<T extends com.atlassian.plugin.ModuleDescriptor<Macro> & MacroMetadataSource> extends Object implements MacroMetadataProvider
Constructor and Description |
---|
DefaultMacroMetadataProvider(AllMacroMetadataProvider<T> macroMetadataCache,
Class<T> descriptorClass) |
DefaultMacroMetadataProvider(AllMacroMetadataProvider<T> allMacroMetadataProvider,
Class<T> descriptorClass,
com.atlassian.plugin.predicate.ModuleDescriptorPredicate<Macro> descriptorPredicate) |
Modifier and Type | Method and Description |
---|---|
MacroMetadata |
getByMacroName(String macroName)
Returns the metadata for the named macro if it is known to this provider.
|
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 of
MacroMetadata for use in the Macro Browser. |
Collection<MacroSummary> |
getSummaries()
Returns a collection of
MacroMetadata for use in the Macro Browser. |
public DefaultMacroMetadataProvider(AllMacroMetadataProvider<T> macroMetadataCache, Class<T> descriptorClass)
public DefaultMacroMetadataProvider(AllMacroMetadataProvider<T> allMacroMetadataProvider, Class<T> descriptorClass, com.atlassian.plugin.predicate.ModuleDescriptorPredicate<Macro> descriptorPredicate)
public Collection<MacroMetadata> getData()
MacroMetadataProvider
MacroMetadata
for use in the Macro Browser.
This collection need not necessarily be unique.getData
in interface MacroMetadataProvider
public Collection<MacroSummary> getSummaries()
MacroMetadataProvider
MacroMetadata
for use in the Macro Browser.
This collection need not necessarily be unique. It's just the summaries.getSummaries
in interface MacroMetadataProvider
public MacroMetadata getByMacroName(String macroName)
MacroMetadataProvider
getByMacroName
in interface MacroMetadataProvider
macroName
- the (simple, unfriendly) name of the macro.@Nullable public MacroMetadata getByMacroNameAndId(String macroName, String alternateId)
MacroMetadataProvider
getByMacroNameAndId
in interface MacroMetadataProvider
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.Copyright © 2003–2016 Atlassian. All rights reserved.