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 aConfluenceRpcto perform plugin operations. All operations are performed through theConfluenceRpcand 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 voiddisablePlugin(Plugin plugin)Disable the plugin.voiddisablePluginModule(Plugin plugin, String moduleKey)voiddisablePluginWithoutPersisting(Plugin plugin)Disable the plugin without persisting.voidenablePlugin(Plugin plugin)Enable the plugin.voidenablePluginModule(Plugin plugin, String moduleKey)voidinstallPlugin(UploadablePlugin plugin)Install the plugin as the currently logged in User.voidinstallPluginIfNotInstalled(UploadablePlugin plugin)Equivalent of callingPluginHelper.isPluginInstalled(Plugin)andPluginHelper.installPlugin(UploadablePlugin).booleanisPluginEnabled(Plugin plugin)Returns true if the given plugin is currently enabled, otherwise false.booleanisPluginInstalled(Plugin plugin)Returns true if the given plugin is currently installed, otherwise false.booleanisPluginModuleEnabled(Plugin plugin, String moduleKey)voidresetPluginEnablementState()voiduninstallPlugin(Plugin plugin)Uninstall the plugin as the currently logged in User.voiduninstallPluginIfInstalled(Plugin plugin)Equivalent of callingPluginHelper.isPluginInstalled(Plugin)andPluginHelper.uninstallPlugin(Plugin).
-
-
-
Method Detail
-
installPluginIfNotInstalled
public void installPluginIfNotInstalled(UploadablePlugin plugin) throws IOException
Description copied from interface:PluginHelperEquivalent of callingPluginHelper.isPluginInstalled(Plugin)andPluginHelper.installPlugin(UploadablePlugin).- Specified by:
installPluginIfNotInstalledin interfacePluginHelper- Throws:
IOException
-
installPlugin
public void installPlugin(UploadablePlugin plugin) throws IOException
Description copied from interface:PluginHelperInstall the plugin as the currently logged in User.- Specified by:
installPluginin 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:PluginHelperEquivalent of callingPluginHelper.isPluginInstalled(Plugin)andPluginHelper.uninstallPlugin(Plugin).- Specified by:
uninstallPluginIfInstalledin interfacePluginHelper- Throws:
IOException
-
uninstallPlugin
public void uninstallPlugin(Plugin plugin)
Description copied from interface:PluginHelperUninstall the plugin as the currently logged in User.- Specified by:
uninstallPluginin interfacePluginHelper- See Also:
PluginHelper.isPluginInstalled(Plugin)
-
isPluginInstalled
public boolean isPluginInstalled(Plugin plugin)
Description copied from interface:PluginHelperReturns true if the given plugin is currently installed, otherwise false. Requires the logged in user to have admin access.- Specified by:
isPluginInstalledin interfacePluginHelper
-
enablePlugin
public void enablePlugin(Plugin plugin)
Description copied from interface:PluginHelperEnable the plugin. Requires the logged in user to have admin access.- Specified by:
enablePluginin interfacePluginHelper- See Also:
PluginHelper.isPluginEnabled(Plugin)
-
resetPluginEnablementState
public void resetPluginEnablementState()
- Specified by:
resetPluginEnablementStatein interfacePluginHelper
-
disablePlugin
public void disablePlugin(Plugin plugin)
Description copied from interface:PluginHelperDisable the plugin. Requires the logged in user to have admin access.- Specified by:
disablePluginin interfacePluginHelper- See Also:
PluginHelper.isPluginEnabled(Plugin)
-
disablePluginWithoutPersisting
public void disablePluginWithoutPersisting(Plugin plugin)
Description copied from interface:PluginHelperDisable the plugin without persisting. Requires the logged in user to have admin access.- Specified by:
disablePluginWithoutPersistingin interfacePluginHelper- See Also:
PluginHelper.isPluginEnabled(Plugin)
-
isPluginEnabled
public boolean isPluginEnabled(Plugin plugin)
Description copied from interface:PluginHelperReturns 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:
isPluginEnabledin interfacePluginHelper- Returns:
- true if the plugin is installed and enabled.
-
enablePluginModule
public void enablePluginModule(Plugin plugin, String moduleKey)
- Specified by:
enablePluginModulein interfacePluginHelper
-
disablePluginModule
public void disablePluginModule(Plugin plugin, String moduleKey)
- Specified by:
disablePluginModulein interfacePluginHelper
-
isPluginModuleEnabled
public boolean isPluginModuleEnabled(Plugin plugin, String moduleKey)
- Specified by:
isPluginModuleEnabledin interfacePluginHelper
-
-