Class AllMacroMetadataCache<T extends com.atlassian.plugin.ModuleDescriptor<Macro> & MacroMetadataSource>
java.lang.Object
com.atlassian.confluence.impl.macro.metadata.AllMacroMetadataCache<T>
- Type Parameters:
T
- macro module descriptor
- All Implemented Interfaces:
AllMacroMetadataProvider<T>
,BiFunction<Class<T>,
com.atlassian.plugin.predicate.ModuleDescriptorPredicate<Macro>, Map<String, MacroMetadata>>
public class AllMacroMetadataCache<T extends com.atlassian.plugin.ModuleDescriptor<Macro> & MacroMetadataSource>
extends Object
implements AllMacroMetadataProvider<T>
Caches a map of macro metadata by macro names loaded using the given a macro module descriptor class and a macro
module descriptor predicate.
- Since:
- 5.8
-
Constructor Summary
ConstructorDescriptionAllMacroMetadataCache
(com.atlassian.cache.CacheFactory cacheFactory, AllMacroMetadataProvider<T> allMacroMetadataProvider, com.atlassian.event.api.EventListenerRegistrar eventListenerRegistrar, ApplicationStatusService applicationStatusService) -
Method Summary
Modifier and TypeMethodDescription@NonNull Map<String,
MacroMetadata> apply
(Class<T> descriptorClass, com.atlassian.plugin.predicate.ModuleDescriptorPredicate<Macro> descriptorPredicate) void
onPluginModuleDisabled
(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event) void
onPluginModuleEnabled
(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event) void
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
-
Constructor Details
-
AllMacroMetadataCache
public AllMacroMetadataCache(com.atlassian.cache.CacheFactory cacheFactory, AllMacroMetadataProvider<T> allMacroMetadataProvider, com.atlassian.event.api.EventListenerRegistrar eventListenerRegistrar, ApplicationStatusService applicationStatusService)
-
-
Method Details
-
registerForEvents
@PostConstruct public void registerForEvents() -
unregisterForEvents
@PreDestroy public void unregisterForEvents() -
apply
public @NonNull Map<String,MacroMetadata> apply(Class<T> descriptorClass, com.atlassian.plugin.predicate.ModuleDescriptorPredicate<Macro> descriptorPredicate) - Specified by:
apply
in interfaceBiFunction<Class<T extends com.atlassian.plugin.ModuleDescriptor<Macro> & MacroMetadataSource>,
com.atlassian.plugin.predicate.ModuleDescriptorPredicate<Macro>, Map<String, MacroMetadata>>
-
onPluginModuleEnabled
public void onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event) -
onPluginModuleDisabled
public void onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
-