public interface PluginsTracker
CopyOnWriteArraySet
under the covers to ensure that the list is as safe as
possible. The assumption is that the reads and writes will be of low volume and the total number of plugins tracked
will be smallish. In other words its anticipated that it will just work!Modifier and Type | Interface and Description |
---|---|
static class |
PluginsTracker.PluginInfo
A simple class that contains plugin key and pluginVersion.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the underlying set of tracked plugins
|
Set<PluginsTracker.PluginInfo> |
getInvolvedPluginKeys() |
String |
getStateHashCode()
Return a hash that represents all the plugins in this tracker.
|
boolean |
isPluginInvolved(com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
Returns true if the plugin that this ModuleDescriptor belongs to is being tracked
|
boolean |
isPluginInvolved(com.atlassian.plugin.Plugin plugin)
Returns true if the plugin is being tracked
|
boolean |
isPluginWithModuleDescriptor(com.atlassian.plugin.ModuleDescriptor moduleDescriptor,
Class<? extends com.atlassian.plugin.ModuleDescriptor> targetModuleClass)
Returns true if the plugin pointed to by the moduleDescriptor contains in it a 1 or modules with the target
module descriptor class.
|
boolean |
isPluginWithModuleDescriptor(com.atlassian.plugin.Plugin plugin,
Class<? extends com.atlassian.plugin.ModuleDescriptor> targetModuleClass)
Returns true if the plugin pointed to by the moduleDescriptor contains in it a 1 or module descriptors with the
target module descriptor class.
|
boolean |
isPluginWithResourceType(com.atlassian.plugin.ModuleDescriptor moduleDescriptor,
String pluginResourceType)
Returns true if the underlying plugin contains resources of the specified type, for example "i18n" resource
types
|
boolean |
isPluginWithResourceType(com.atlassian.plugin.Plugin plugin,
String pluginResourceType)
Returns true if the plugin contains resources of the specified type, for example "i18n" resource types
|
void |
trackInvolvedPlugin(com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
Tracks a plugin as being involved via it's
ModuleDescriptor |
void |
trackInvolvedPlugin(com.atlassian.plugin.Plugin plugin)
Tracks a plugin as being involved
|
void trackInvolvedPlugin(com.atlassian.plugin.Plugin plugin)
plugin
- the plugin in playvoid trackInvolvedPlugin(com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
ModuleDescriptor
moduleDescriptor
- the ModuleDescriptor of the plugin in playboolean isPluginInvolved(com.atlassian.plugin.Plugin plugin)
plugin
- the plugin in playboolean isPluginInvolved(com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
moduleDescriptor
- the ModuleDescriptor of the plugin in playboolean isPluginWithModuleDescriptor(com.atlassian.plugin.ModuleDescriptor moduleDescriptor, Class<? extends com.atlassian.plugin.ModuleDescriptor> targetModuleClass)
moduleDescriptor
- the module descriptor in play (typically from a plugin event)targetModuleClass
- the target capabilities you want to testboolean isPluginWithModuleDescriptor(com.atlassian.plugin.Plugin plugin, Class<? extends com.atlassian.plugin.ModuleDescriptor> targetModuleClass)
plugin
- the plugin play (typically from a plugin event)targetModuleClass
- the target capabilities you want to testboolean isPluginWithResourceType(com.atlassian.plugin.Plugin plugin, String pluginResourceType)
plugin
- the plugin play (typically from a plugin event)pluginResourceType
- the descriptive name of the resource type (for example "i18n")boolean isPluginWithResourceType(com.atlassian.plugin.ModuleDescriptor moduleDescriptor, String pluginResourceType)
moduleDescriptor
- the module descriptor of the plugin play (typically from a plugin event)pluginResourceType
- the descriptive name of the resource type (for example "i18n")Set<PluginsTracker.PluginInfo> getInvolvedPluginKeys()
void clear()
String getStateHashCode()
Copyright © 2002-2016 Atlassian. All Rights Reserved.