Package com.google.gerrit.server.plugins
Class PluginLoader
- java.lang.Object
-
- com.google.gerrit.server.plugins.PluginLoader
-
- All Implemented Interfaces:
LifecycleListener,EventListener
public class PluginLoader extends Object implements LifecycleListener
-
-
Constructor Summary
Constructors Constructor Description PluginLoader(SitePaths sitePaths, PluginGuiceEnvironment pe, ServerInformationImpl sii, PluginUser.Factory puf, com.google.inject.Provider<com.google.gerrit.server.plugins.PluginCleanerTask> pct, org.eclipse.jgit.lib.Config cfg, com.google.inject.Provider<String> provider, PersistentCacheFactory cacheFactory, com.google.gerrit.server.plugins.UniversalServerPluginProvider pluginFactory, MandatoryPluginsCollection mpc, GerritRuntime gerritRuntime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckRemoteAdminEnabled()voiddisablePlugins(Set<String> names)voidenablePlugins(Set<String> names)Pluginget(String name)StringgetGerritPluginName(Path srcPath)StringgetPluginName(Path srcPath)Iterable<Plugin>getPlugins(boolean all)StringinstallPluginFromStream(String originalName, InputStream in)booleanisRemoteAdminEnabled()com.google.common.collect.SetMultimap<String,Path>prunePlugins(Path pluginsDir)voidreload(List<String> names)voidrescan()voidstart()Invoked when the server is starting.voidstop()Invoked when the server is stopping.
-
-
-
Constructor Detail
-
PluginLoader
@Inject public PluginLoader(SitePaths sitePaths, PluginGuiceEnvironment pe, ServerInformationImpl sii, PluginUser.Factory puf, com.google.inject.Provider<com.google.gerrit.server.plugins.PluginCleanerTask> pct, org.eclipse.jgit.lib.Config cfg, com.google.inject.Provider<String> provider, PersistentCacheFactory cacheFactory, com.google.gerrit.server.plugins.UniversalServerPluginProvider pluginFactory, MandatoryPluginsCollection mpc, GerritRuntime gerritRuntime)
-
-
Method Detail
-
isRemoteAdminEnabled
public boolean isRemoteAdminEnabled()
-
checkRemoteAdminEnabled
public void checkRemoteAdminEnabled() throws MethodNotAllowedException- Throws:
MethodNotAllowedException
-
installPluginFromStream
public String installPluginFromStream(String originalName, InputStream in) throws IOException, PluginInstallException
- Throws:
IOExceptionPluginInstallException
-
enablePlugins
public void enablePlugins(Set<String> names) throws PluginInstallException
- Throws:
PluginInstallException
-
start
public void start()
Description copied from interface:LifecycleListenerInvoked when the server is starting.- Specified by:
startin interfaceLifecycleListener
-
stop
public void stop()
Description copied from interface:LifecycleListenerInvoked when the server is stopping.- Specified by:
stopin interfaceLifecycleListener
-
reload
public void reload(List<String> names) throws InvalidPluginException, PluginInstallException
-
rescan
public void rescan()
-
prunePlugins
public com.google.common.collect.SetMultimap<String,Path> prunePlugins(Path pluginsDir)
-
-