Package jetbrains.buildServer
Class MockPluginManager
- java.lang.Object
-
- jetbrains.buildServer.MockPluginManager
-
- All Implemented Interfaces:
PluginClassesLoader,PluginInfoLoader,PluginManager
public class MockPluginManager extends Object implements PluginManager
-
-
Constructor Summary
Constructors Constructor Description MockPluginManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPluginClassesLoadedListener(PluginClassesLoadedListener listener)voidaddPluginInfoLoadedListener(PluginInfoLoadedListener listener)Collection<PluginInfo>getDetectedPlugins()Enumerates all loaded plugins.Collection<NotLoadedPlugin>getNotLoadedPlugins()Enumerates plugins that were not loaded.EventDispatcher<PluginManagerListener>getPluginLifecycleEventDispatcher()voidloadPlugin(PluginInfo pluginInfo)Tries to load a plugin in runtimevoidloadPlugins()Scan plugins folders for plugins.voidloadPlugins(Collection<PluginInfo> pluginsToLoad)load specified collection of plugins.voidloadPlugins(Collection<PluginInfo> pluginsToLoad, Function<LoadPluginException,Boolean> shouldStop)The same asPluginManager.loadPlugins(Collection)but allows to stop loading plugins if exception occursList<PluginInfo>unloadPlugin(PluginInfo pluginInfo)Tries to unload a plugin in runtime.
-
-
-
Method Detail
-
getPluginLifecycleEventDispatcher
public EventDispatcher<PluginManagerListener> getPluginLifecycleEventDispatcher()
- Specified by:
getPluginLifecycleEventDispatcherin interfacePluginManager- Returns:
- PluginLifecycleListener events dispatcher. Could not exist in the spring context.
-
loadPlugin
public void loadPlugin(@NotNull PluginInfo pluginInfo)Description copied from interface:PluginManagerTries to load a plugin in runtime- Specified by:
loadPluginin interfacePluginManager
-
unloadPlugin
public List<PluginInfo> unloadPlugin(@NotNull PluginInfo pluginInfo)
Description copied from interface:PluginManagerTries to unload a plugin in runtime. Also unloads dependent plugins if any- Specified by:
unloadPluginin interfacePluginManager- Parameters:
pluginInfo- plugin to be unloaded- Returns:
- list of unloaded plugins (including dependent on current). The list is topo-sorted (dependent plugins placed before dependency in the list)
-
loadPlugins
public void loadPlugins()
Description copied from interface:PluginManagerScan plugins folders for plugins. Plugin is detected by registeredPluginFileSystemLookupimplementations. If plugin with same name is found again, it will override the first occurrence of the plugin. Warning message will be shown no that case. Plugins with names specified in .BuildServer/config/disabled_plugins.txt are treated as disabled and ignored- Specified by:
loadPluginsin interfacePluginManager
-
loadPlugins
public void loadPlugins(Collection<PluginInfo> pluginsToLoad)
Description copied from interface:PluginManagerload specified collection of plugins. The same as invocationPluginManager.loadPlugin(PluginInfo)for each plugin in topological order.- Specified by:
loadPluginsin interfacePluginManager
-
loadPlugins
public void loadPlugins(Collection<PluginInfo> pluginsToLoad, Function<LoadPluginException,Boolean> shouldStop)
Description copied from interface:PluginManagerThe same asPluginManager.loadPlugins(Collection)but allows to stop loading plugins if exception occurs- Specified by:
loadPluginsin interfacePluginManager
-
getDetectedPlugins
@NotNull public Collection<PluginInfo> getDetectedPlugins()
Description copied from interface:PluginManagerEnumerates all loaded plugins. This function may return empty collection if called while plugins are loading.- Specified by:
getDetectedPluginsin interfacePluginManager- Returns:
- collection of loaded plugin infos
-
getNotLoadedPlugins
@NotNull public Collection<NotLoadedPlugin> getNotLoadedPlugins()
Description copied from interface:PluginManagerEnumerates plugins that were not loaded. This function may return empty collection if called while plugins are loading.- Specified by:
getNotLoadedPluginsin interfacePluginManager
-
addPluginClassesLoadedListener
public void addPluginClassesLoadedListener(@NotNull PluginClassesLoadedListener listener)- Specified by:
addPluginClassesLoadedListenerin interfacePluginClassesLoader
-
addPluginInfoLoadedListener
public void addPluginInfoLoadedListener(@NotNull PluginInfoLoadedListener listener)- Specified by:
addPluginInfoLoadedListenerin interfacePluginInfoLoader
-
-