public class PluginModuleTrackerFactory extends Object
Creates instances of a PluginModuleTracker
using the DefaultPluginModuleTracker
implementation.
Instances of PluginModuleTracker keep a cached set of module descriptors that is updated when plugins and plugin modules are enabled or disabled in the plugins system.
IMPORTANT: The set of descriptors returned by the plugin module trackers is a live list that is updated as plugins and plugin modules are enabled or disabled, it is not necessary to further cache the results obtained from a plugin module tracker.
PluginModuleTracker
Constructor and Description |
---|
PluginModuleTrackerFactory(com.atlassian.plugin.PluginAccessor pluginAccessor,
com.atlassian.plugin.event.PluginEventManager pluginEventManager) |
Modifier and Type | Method and Description |
---|---|
<M,D extends com.atlassian.plugin.ModuleDescriptor<M>> |
create(Class<D> moduleDescriptorClass)
Creates an instance of a plugin module tracker for the specified module descriptor class.
|
<M,D extends com.atlassian.plugin.ModuleDescriptor<M>> |
create(Class<D> moduleDescriptorClass,
com.atlassian.plugin.tracker.PluginModuleTracker.Customizer<M,D> pluginModuleTrackerCustomizer)
Creates an instance of a plugin module tracker for the specified module descriptor class.
|
public PluginModuleTrackerFactory(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.plugin.event.PluginEventManager pluginEventManager)
public <M,D extends com.atlassian.plugin.ModuleDescriptor<M>> com.atlassian.plugin.tracker.PluginModuleTracker<M,D> create(Class<D> moduleDescriptorClass)
M
- The module described by D.D
- The class module descriptor to be tracked.moduleDescriptorClass
- The module descriptor class to track.public <M,D extends com.atlassian.plugin.ModuleDescriptor<M>> com.atlassian.plugin.tracker.PluginModuleTracker<M,D> create(Class<D> moduleDescriptorClass, com.atlassian.plugin.tracker.PluginModuleTracker.Customizer<M,D> pluginModuleTrackerCustomizer)
Creates an instance of a plugin module tracker for the specified module descriptor class.
It takes in a customizer
that enables the
calling code to perform additional operations when a plugin module is added or removed from the module tracker.
M
- The module described by D.D
- The module descriptor to be tracked.moduleDescriptorClass
- The module descriptor class to track.pluginModuleTrackerCustomizer
- The customizer to use when module descriptors are added or removed from the
module tracker.PluginModuleTracker.Customizer
Copyright © 2002-2018 Atlassian. All Rights Reserved.