com.atlassian.confluence.plugin.cached
Class ByModuleClassModuleTracker<M,T extends com.atlassian.plugin.ModuleDescriptor<M>>

java.lang.Object
  extended by com.atlassian.confluence.plugin.cached.ByModuleClassModuleTracker<M,T>
Type Parameters:
M - The module class we wish to track
T - Module descriptor class having M as the module class
All Implemented Interfaces:
com.atlassian.plugin.tracker.PluginModuleTracker<M,T>

public class ByModuleClassModuleTracker<M,T extends com.atlassian.plugin.ModuleDescriptor<M>>
extends java.lang.Object
implements com.atlassian.plugin.tracker.PluginModuleTracker<M,T>

This is a plugin module tracker that tracks module classes, rather than module descriptor classes. It listens for plugin events on modules that use the module class it's interested in. It must be populated with a list of initial descriptors since there is no nice way of getting that info from the pluginAccessor currently.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.plugin.tracker.PluginModuleTracker
com.atlassian.plugin.tracker.PluginModuleTracker.Customizer<M,T extends com.atlassian.plugin.ModuleDescriptor<M>>
 
Constructor Summary
ByModuleClassModuleTracker(com.atlassian.plugin.event.PluginEventManager pluginEventManager, java.lang.Class<M> moduleClass, java.util.Collection<? extends T> initialDescriptors, com.atlassian.plugin.PluginController pluginController)
           
 
Method Summary
 void close()
           
 java.lang.Iterable<T> getModuleDescriptors()
           
 java.lang.Iterable<M> getModules()
           
 void onPluginDisabled(com.atlassian.plugin.event.events.PluginDisabledEvent event)
           
 void onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
           
 void onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByModuleClassModuleTracker

public ByModuleClassModuleTracker(com.atlassian.plugin.event.PluginEventManager pluginEventManager,
                                  java.lang.Class<M> moduleClass,
                                  java.util.Collection<? extends T> initialDescriptors,
                                  com.atlassian.plugin.PluginController pluginController)
Method Detail

onPluginModuleEnabled

public void onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)

onPluginModuleDisabled

public void onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)

onPluginDisabled

public void onPluginDisabled(com.atlassian.plugin.event.events.PluginDisabledEvent event)

getModuleDescriptors

public java.lang.Iterable<T> getModuleDescriptors()
Specified by:
getModuleDescriptors in interface com.atlassian.plugin.tracker.PluginModuleTracker<M,T extends com.atlassian.plugin.ModuleDescriptor<M>>

getModules

public java.lang.Iterable<M> getModules()
Specified by:
getModules in interface com.atlassian.plugin.tracker.PluginModuleTracker<M,T extends com.atlassian.plugin.ModuleDescriptor<M>>

size

public int size()
Specified by:
size in interface com.atlassian.plugin.tracker.PluginModuleTracker<M,T extends com.atlassian.plugin.ModuleDescriptor<M>>

close

public void close()
Specified by:
close in interface com.atlassian.plugin.tracker.PluginModuleTracker<M,T extends com.atlassian.plugin.ModuleDescriptor<M>>


Copyright © 2003-2014 Atlassian. All Rights Reserved.