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 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 interface BiFunction<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)