|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.plugin.DefaultPluginInstallationManager
public final class DefaultPluginInstallationManager
An implementation of the InstallablePluginManager that uses a property set to store the information about which plugins should be installed/upgraded/removed during the next restart.
Constructor Summary | |
---|---|
DefaultPluginInstallationManager(ApplicationProperties appProperties,
JiraPropertySetFactory propertySetFactory,
com.atlassian.plugin.PluginStateStore store)
|
Method Summary | |
---|---|
void |
cancelPluginUpdate(String key)
Cancel any scheduled changes - install, upgrade or uninstall - for the plugin identified by the key . |
void |
configurePluginPath(String pluginsPath)
Configure the manager to store installed, pending, and uninstalled plugins under the given path. |
com.atlassian.plugin.loaders.PluginLoader |
getInstalledPluginsLoader()
|
String |
installPlugin(com.atlassian.plugin.PluginJar pluginJar,
com.atlassian.plugin.PluginAccessor pluginAccessor)
Schedule the plugin to be installed or upgraded, if it is a newer version of a plugin that is already installed, during the next startup cycle. |
boolean |
isConfigured()
|
boolean |
isStarted()
|
void |
processUpdates()
This method is to be called during the JIRA startup process. |
protected void |
removeStateFromStore(com.atlassian.plugin.PluginStateStore stateStore,
String key)
|
void |
uninstall(com.atlassian.plugin.Plugin plugin)
Schedule the plugin to be uninstalled during the next startup cycle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPluginInstallationManager(ApplicationProperties appProperties, JiraPropertySetFactory propertySetFactory, com.atlassian.plugin.PluginStateStore store)
Method Detail |
---|
public boolean isStarted()
public final boolean isConfigured()
isConfigured
in interface PluginInstallationManager
true
if the manager has been configured with a plugin path, false
otherwise.
The manager can be configured by calling the configurePluginPath()
method.public void configurePluginPath(String pluginsPath)
PluginInstallationManager
configurePluginPath
in interface PluginInstallationManager
pluginsPath
- path to store plugin jars underpublic com.atlassian.plugin.loaders.PluginLoader getInstalledPluginsLoader()
getInstalledPluginsLoader
in interface PluginInstallationManager
public String installPlugin(com.atlassian.plugin.PluginJar pluginJar, com.atlassian.plugin.PluginAccessor pluginAccessor) throws com.atlassian.plugin.PluginParseException
PluginInstallationManager
installPlugin
in interface PluginInstallationManager
pluginJar
- Plugin jar to be installed.pluginAccessor
- Plugin accessor to determine if the pluginJar is a newer version of an already installed
plugin
com.atlassian.plugin.PluginParseException
- Thrown if the pluginJar cannot be opened or if it does not contain plugin metadata
or the plugin metadata is in an invalid format.public void uninstall(com.atlassian.plugin.Plugin plugin) throws com.atlassian.plugin.PluginException
PluginInstallationManager
uninstall
in interface PluginInstallationManager
plugin
- Plugin to be uninstalled
com.atlassian.plugin.PluginException
- if the plugin cannot be uninstalledpublic void cancelPluginUpdate(String key)
PluginInstallationManager
key
.
cancelPluginUpdate
in interface PluginInstallationManager
key
- Key of the plugin for which updates should be cancelled.public void processUpdates() throws com.atlassian.plugin.PluginException
PluginInstallationManager
processUpdates
in interface PluginInstallationManager
com.atlassian.plugin.PluginException
- Thrown if there is a problem with installing/upgrading/uninstalling one of the pluginsprotected void removeStateFromStore(com.atlassian.plugin.PluginStateStore stateStore, String key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |