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 void
checkRemoteAdminEnabled()
void
disablePlugins(Set<String> names)
void
enablePlugins(Set<String> names)
Plugin
get(String name)
String
getGerritPluginName(Path srcPath)
String
getPluginName(Path srcPath)
Iterable<Plugin>
getPlugins(boolean all)
String
installPluginFromStream(String originalName, InputStream in)
boolean
isRemoteAdminEnabled()
com.google.common.collect.SetMultimap<String,Path>
prunePlugins(Path pluginsDir)
void
reload(List<String> names)
void
rescan()
void
start()
Invoked when the server is starting.void
stop()
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:
IOException
PluginInstallException
-
enablePlugins
public void enablePlugins(Set<String> names) throws PluginInstallException
- Throws:
PluginInstallException
-
start
public void start()
Description copied from interface:LifecycleListener
Invoked when the server is starting.- Specified by:
start
in interfaceLifecycleListener
-
stop
public void stop()
Description copied from interface:LifecycleListener
Invoked when the server is stopping.- Specified by:
stop
in 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)
-
-