com.atlassian.confluence.it.rpc
Class RpcPluginHelper

java.lang.Object
  extended by com.atlassian.confluence.it.rpc.RpcPluginHelper
All Implemented Interfaces:
PluginHelper

public class RpcPluginHelper
extends Object
implements PluginHelper

Uses a ConfluenceRpc to perform plugin operations. All operations are performed through the ConfluenceRpc and therefore are performed as the user currently logged into ConfluenceRpc. This relies on the Rpc Functest Plugin being installed, so it's not much good for that.


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 PluginHelper.isPluginInstalled(Plugin) and PluginHelper.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

installPluginIfNotInstalled

public void installPluginIfNotInstalled(UploadablePlugin plugin)
                                 throws IOException
Description copied from interface: PluginHelper
Equivalent of calling PluginHelper.isPluginInstalled(Plugin) and PluginHelper.installPlugin(UploadablePlugin).

Specified by:
installPluginIfNotInstalled in interface PluginHelper
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 interface PluginHelper
Throws:
FileNotFoundException - if the plugin file does not exist locally
IOException
See Also:
PluginHelper.isPluginInstalled(Plugin)

uninstallPlugin

public void uninstallPlugin(Plugin plugin)
Description copied from interface: PluginHelper
Uninstall the plugin as the currently logged in User.

Specified by:
uninstallPlugin in interface PluginHelper
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 interface PluginHelper

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 interface PluginHelper
See Also:
PluginHelper.isPluginEnabled(Plugin)

resetPluginEnablementState

public void resetPluginEnablementState()
Specified by:
resetPluginEnablementState in interface PluginHelper

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 interface PluginHelper
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 interface PluginHelper
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 interface PluginHelper
Returns:
true if the plugin is installed and enabled.

enablePluginModule

public void enablePluginModule(Plugin plugin,
                               String moduleKey)
Specified by:
enablePluginModule in interface PluginHelper

disablePluginModule

public void disablePluginModule(Plugin plugin,
                                String moduleKey)
Specified by:
disablePluginModule in interface PluginHelper

isPluginModuleEnabled

public boolean isPluginModuleEnabled(Plugin plugin,
                                     String moduleKey)
Specified by:
isPluginModuleEnabled in interface PluginHelper


Copyright © 2003–2015 Atlassian. All rights reserved.