com.atlassian.confluence.it.plugin
Interface PluginHelper

All Known Implementing Classes:
RpcPluginHelper

public interface PluginHelper

Provides methods for administering Confluence plugins via the web interface for testing purposes.


Method Summary
 void disablePlugin(Plugin plugin)
          Disable the plugin.
 void disablePluginModule(Plugin plugin, String moduleKey)
           
 void disablePluginWithoutPersisting(Plugin plugin)
          Disable the plugin without persisting.
 void enablePlugin(Plugin plugin)
          Enable the plugin.
 void enablePluginModule(Plugin plugin, String moduleKey)
           
 void installPlugin(UploadablePlugin plugin)
          Install the plugin as the currently logged in User.
 void installPluginIfNotInstalled(UploadablePlugin plugin)
          Equivalent of calling isPluginInstalled(Plugin) and installPlugin(UploadablePlugin).
 boolean isPluginEnabled(Plugin plugin)
          Returns true if the given plugin is currently enabled, otherwise false.
 boolean isPluginInstalled(Plugin plugin)
          Returns true if the given plugin is currently installed, otherwise false.
 boolean isPluginModuleEnabled(Plugin plugin, String moduleKey)
           
 void resetPluginEnablementState()
           
 void uninstallPlugin(Plugin plugin)
          Uninstall the plugin as the currently logged in User.
 

Method Detail

installPluginIfNotInstalled

void installPluginIfNotInstalled(UploadablePlugin plugin)
                                 throws IOException
Equivalent of calling isPluginInstalled(Plugin) and installPlugin(UploadablePlugin).

Throws:
IOException

installPlugin

void installPlugin(UploadablePlugin plugin)
                   throws IOException
Install the plugin as the currently logged in User.

Throws:
RuntimeException - if the plugin is already installed.
FileNotFoundException - if the plugin file does not exist locally
IOException
See Also:
isPluginInstalled(Plugin)

uninstallPlugin

void uninstallPlugin(Plugin plugin)
Uninstall the plugin as the currently logged in User.

Throws:
RuntimeException - if the plugin is not installed.
See Also:
isPluginInstalled(Plugin)

isPluginInstalled

boolean isPluginInstalled(Plugin plugin)
Returns true if the given plugin is currently installed, otherwise false. Requires the logged in user to have admin access.


enablePlugin

void enablePlugin(Plugin plugin)
Enable the plugin. Requires the logged in user to have admin access.

Throws:
RuntimeException - if the plugin is already enabled.
See Also:
isPluginEnabled(Plugin)

resetPluginEnablementState

void resetPluginEnablementState()

disablePlugin

void disablePlugin(Plugin plugin)
Disable the plugin. Requires the logged in user to have admin access.

Throws:
RuntimeException - if the plugin is not enabled.
See Also:
isPluginEnabled(Plugin)

disablePluginWithoutPersisting

void disablePluginWithoutPersisting(Plugin plugin)
Disable the plugin without persisting. Requires the logged in user to have admin access.

Throws:
RuntimeException - if the plugin is not enabled.
See Also:
isPluginEnabled(Plugin)

isPluginEnabled

boolean isPluginEnabled(Plugin plugin)
Returns true if the given plugin is currently enabled, otherwise false. May throw an exception if the plugin is not installed, see implementations for details.


enablePluginModule

void enablePluginModule(Plugin plugin,
                        String moduleKey)

disablePluginModule

void disablePluginModule(Plugin plugin,
                         String moduleKey)

isPluginModuleEnabled

boolean isPluginModuleEnabled(Plugin plugin,
                              String moduleKey)


Copyright © 2003–2015 Atlassian. All rights reserved.