Package com.atlassian.confluence.it.rpc
Class RpcPluginHelper
- java.lang.Object
-
- com.atlassian.confluence.it.rpc.RpcPluginHelper
-
- All Implemented Interfaces:
PluginHelper
public class RpcPluginHelper extends Object implements PluginHelper
Uses aConfluenceRpc
to perform plugin operations. All operations are performed through theConfluenceRpc
and therefore are performed as the user currently logged intoConfluenceRpc
. This relies on the Rpc Functest Plugin being installed, so it's not much good for that.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 callingPluginHelper.isPluginInstalled(Plugin)
andPluginHelper.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.void
uninstallPluginIfInstalled(Plugin plugin)
Equivalent of callingPluginHelper.isPluginInstalled(Plugin)
andPluginHelper.uninstallPlugin(Plugin)
.
-
-
-
Method Detail
-
installPluginIfNotInstalled
public void installPluginIfNotInstalled(UploadablePlugin plugin) throws IOException
Description copied from interface:PluginHelper
Equivalent of callingPluginHelper.isPluginInstalled(Plugin)
andPluginHelper.installPlugin(UploadablePlugin)
.- Specified by:
installPluginIfNotInstalled
in interfacePluginHelper
- Throws:
IOException
-
installPlugin
public void installPlugin(UploadablePlugin plugin) throws IOException
Description copied from interface:PluginHelper
Install the plugin as the currently logged in User.- Specified by:
installPlugin
in interfacePluginHelper
- Throws:
FileNotFoundException
- if the plugin file does not exist locallyIOException
- See Also:
PluginHelper.isPluginInstalled(Plugin)
-
uninstallPluginIfInstalled
public void uninstallPluginIfInstalled(Plugin plugin) throws IOException
Description copied from interface:PluginHelper
Equivalent of callingPluginHelper.isPluginInstalled(Plugin)
andPluginHelper.uninstallPlugin(Plugin)
.- Specified by:
uninstallPluginIfInstalled
in interfacePluginHelper
- Throws:
IOException
-
uninstallPlugin
public void uninstallPlugin(Plugin plugin)
Description copied from interface:PluginHelper
Uninstall the plugin as the currently logged in User.- Specified by:
uninstallPlugin
in interfacePluginHelper
- See Also:
PluginHelper.isPluginInstalled(Plugin)
-
isPluginInstalled
public boolean isPluginInstalled(Plugin plugin)
Description copied from interface:PluginHelper
Returns true if the given plugin is currently installed, otherwise false. Requires the logged in user to have admin access.- Specified by:
isPluginInstalled
in interfacePluginHelper
-
enablePlugin
public void enablePlugin(Plugin plugin)
Description copied from interface:PluginHelper
Enable the plugin. Requires the logged in user to have admin access.- Specified by:
enablePlugin
in interfacePluginHelper
- See Also:
PluginHelper.isPluginEnabled(Plugin)
-
resetPluginEnablementState
public void resetPluginEnablementState()
- Specified by:
resetPluginEnablementState
in interfacePluginHelper
-
disablePlugin
public void disablePlugin(Plugin plugin)
Description copied from interface:PluginHelper
Disable the plugin. Requires the logged in user to have admin access.- Specified by:
disablePlugin
in interfacePluginHelper
- See Also:
PluginHelper.isPluginEnabled(Plugin)
-
disablePluginWithoutPersisting
public void disablePluginWithoutPersisting(Plugin plugin)
Description copied from interface:PluginHelper
Disable the plugin without persisting. Requires the logged in user to have admin access.- Specified by:
disablePluginWithoutPersisting
in interfacePluginHelper
- See Also:
PluginHelper.isPluginEnabled(Plugin)
-
isPluginEnabled
public boolean isPluginEnabled(Plugin plugin)
Description copied from interface:PluginHelper
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.- Specified by:
isPluginEnabled
in interfacePluginHelper
- Returns:
- true if the plugin is installed and enabled.
-
enablePluginModule
public void enablePluginModule(Plugin plugin, String moduleKey)
- Specified by:
enablePluginModule
in interfacePluginHelper
-
disablePluginModule
public void disablePluginModule(Plugin plugin, String moduleKey)
- Specified by:
disablePluginModule
in interfacePluginHelper
-
isPluginModuleEnabled
public boolean isPluginModuleEnabled(Plugin plugin, String moduleKey)
- Specified by:
isPluginModuleEnabled
in interfacePluginHelper
-
-