public class PluginConfigFactory extends java.lang.Object implements ReloadPluginListener
Modifier and Type | Method and Description |
---|---|
PluginConfig |
getFromGerritConfig(java.lang.String pluginName)
Returns the configuration for the specified plugin that is stored in the
'gerrit.config' file.
|
PluginConfig |
getFromGerritConfig(java.lang.String pluginName,
boolean refresh)
Returns the configuration for the specified plugin that is stored in the
'gerrit.config' file.
|
PluginConfig |
getFromProjectConfig(com.google.gerrit.reviewdb.client.Project.NameKey projectName,
java.lang.String pluginName)
Returns the configuration for the specified plugin that is stored in the
'project.config' file of the specified project.
|
PluginConfig |
getFromProjectConfig(ProjectState projectState,
java.lang.String pluginName)
Returns the configuration for the specified plugin that is stored in the
'project.config' file of the specified project.
|
PluginConfig |
getFromProjectConfigWithInheritance(com.google.gerrit.reviewdb.client.Project.NameKey projectName,
java.lang.String pluginName)
Returns the configuration for the specified plugin that is stored in the
'project.config' file of the specified project.
|
PluginConfig |
getFromProjectConfigWithInheritance(ProjectState projectState,
java.lang.String pluginName)
Returns the configuration for the specified plugin that is stored in the
'project.config' file of the specified project.
|
org.eclipse.jgit.lib.Config |
getGlobalPluginConfig(java.lang.String pluginName)
Returns the configuration for the specified plugin that is stored in the
plugin configuration file 'etc/
|
org.eclipse.jgit.lib.Config |
getProjectPluginConfig(com.google.gerrit.reviewdb.client.Project.NameKey projectName,
java.lang.String pluginName)
Returns the configuration for the specified plugin that is stored in the
'
|
org.eclipse.jgit.lib.Config |
getProjectPluginConfig(ProjectState projectState,
java.lang.String pluginName)
Returns the configuration for the specified plugin that is stored in the
'
|
org.eclipse.jgit.lib.Config |
getProjectPluginConfigWithInheritance(com.google.gerrit.reviewdb.client.Project.NameKey projectName,
java.lang.String pluginName)
Returns the configuration for the specified plugin that is stored in the
'
|
org.eclipse.jgit.lib.Config |
getProjectPluginConfigWithInheritance(ProjectState projectState,
java.lang.String pluginName)
Returns the configuration for the specified plugin that is stored in the
'
|
void |
onReloadPlugin(Plugin oldPlugin,
Plugin newPlugin) |
public PluginConfig getFromGerritConfig(java.lang.String pluginName)
pluginName
- the name of the plugin for which the configuration should
be returnedpublic PluginConfig getFromGerritConfig(java.lang.String pluginName, boolean refresh)
pluginName
- the name of the plugin for which the configuration should
be returnedrefresh
- if true
it is checked if the 'gerrit.config'
file was modified and if yes the Gerrit configuration is reloaded,
if false
the cached Gerrit configuration is usedpublic PluginConfig getFromProjectConfig(com.google.gerrit.reviewdb.client.Project.NameKey projectName, java.lang.String pluginName) throws NoSuchProjectException
projectName
- the name of the project for which the plugin
configuration should be returnedpluginName
- the name of the plugin for which the configuration should
be returnedNoSuchProjectException
- thrown if the specified project does not
existpublic PluginConfig getFromProjectConfig(ProjectState projectState, java.lang.String pluginName)
projectState
- the project for which the plugin configuration should
be returnedpluginName
- the name of the plugin for which the configuration should
be returnedpublic PluginConfig getFromProjectConfigWithInheritance(com.google.gerrit.reviewdb.client.Project.NameKey projectName, java.lang.String pluginName) throws NoSuchProjectException
projectName
- the name of the project for which the plugin
configuration should be returnedpluginName
- the name of the plugin for which the configuration should
be returnedNoSuchProjectException
- thrown if the specified project does not
existpublic PluginConfig getFromProjectConfigWithInheritance(ProjectState projectState, java.lang.String pluginName)
projectState
- the project for which the plugin configuration should
be returnedpluginName
- the name of the plugin for which the configuration should
be returnedpublic org.eclipse.jgit.lib.Config getGlobalPluginConfig(java.lang.String pluginName)
pluginName
- the name of the plugin for which the configuration should
be returnedpublic org.eclipse.jgit.lib.Config getProjectPluginConfig(com.google.gerrit.reviewdb.client.Project.NameKey projectName, java.lang.String pluginName) throws NoSuchProjectException
projectName
- the name of the project for which the plugin
configuration should be returnedpluginName
- the name of the plugin for which the configuration should
be returnedNoSuchProjectException
- thrown if the specified project does not
existpublic org.eclipse.jgit.lib.Config getProjectPluginConfig(ProjectState projectState, java.lang.String pluginName)
projectState
- the project for which the plugin configuration should
be returnedpluginName
- the name of the plugin for which the configuration should
be returnedpublic org.eclipse.jgit.lib.Config getProjectPluginConfigWithInheritance(com.google.gerrit.reviewdb.client.Project.NameKey projectName, java.lang.String pluginName) throws NoSuchProjectException
projectName
- the name of the project for which the plugin
configuration should be returnedpluginName
- the name of the plugin for which the configuration should
be returnedNoSuchProjectException
- thrown if the specified project does not
existpublic org.eclipse.jgit.lib.Config getProjectPluginConfigWithInheritance(ProjectState projectState, java.lang.String pluginName)
projectState
- the project for which the plugin configuration should
be returnedpluginName
- the name of the plugin for which the configuration should
be returnedpublic void onReloadPlugin(Plugin oldPlugin, Plugin newPlugin)
onReloadPlugin
in interface ReloadPluginListener