|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.plugin.ModuleDescriptorCache<T>
public class ModuleDescriptorCache<T extends com.atlassian.plugin.ModuleDescriptor<?>>
Caches module descriptors of a given module descriptor class and its
subclasses. This is useful in cases where you would otherwise frequently call
PluginAccessor.getEnabledModuleDescriptorsByClass(Class)
.
Nested Class Summary | |
---|---|
static interface |
ModuleDescriptorCache.Initializer<T>
Implementations of this interface are used to initialize a ModuleDescriptorCache |
Constructor Summary | |
---|---|
ModuleDescriptorCache(java.lang.Class<? extends T> moduleDescriptorClass)
|
Method Summary | |
---|---|
java.util.Collection<T> |
getDescriptors()
Returns the module descriptors currently in the cache. |
void |
initialize(ModuleDescriptorCache.Initializer<T> initializer)
Initialize the cache with the module descriptors returned by the initializer. |
void |
pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
Removes module descriptors from the cache when plugin modules are disabled. |
void |
pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
Adds module descriptors to the cache when plugin modules are enabled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModuleDescriptorCache(java.lang.Class<? extends T> moduleDescriptorClass)
Method Detail |
---|
public void pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
public void pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
public java.util.Collection<T> getDescriptors()
public void initialize(ModuleDescriptorCache.Initializer<T> initializer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |