Package org.syncany.operations.plugin
Class PluginOperation
- java.lang.Object
-
- org.syncany.operations.Operation
-
- org.syncany.operations.plugin.PluginOperation
-
public class PluginOperation extends Operation
The plugin operation installs, removes and lists storagePlugin
s.The plugin implements these three functionalities as different
PluginOperationAction
:INSTALL
: Installation means copying a file to the user plugin directory as specified byUserConfig.getUserPluginLibDir()
. A plugin can be installed from a local JAR file, a URL (the operation downloads a JAR file), or the API host (the operation find the plugin using the 'list' action and downloads the JAR file).REMOVE
: Removal means deleting a JAR file from the user plugin directoryThis action. This action simply finds the responsible plugin JAR file and deletes it. Only JAR files inside the user plugin direcory can be deleted.LIST
: Listing refers to a local and a remote list. The locally installed plugins can be queried byPlugins.list()
. These plugins' JAR files must be in the application's class path. Remotely available plugins are queried through the API.
-
-
Constructor Summary
Constructors Constructor Description PluginOperation(Config config, PluginOperationOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PluginOperationResult
execute()
Executes the operation synchronously and returns a result when the operation exits.
-
-
-
Constructor Detail
-
PluginOperation
public PluginOperation(Config config, PluginOperationOptions options)
-
-
Method Detail
-
execute
public PluginOperationResult execute() throws java.lang.Exception
Description copied from class:Operation
Executes the operation synchronously and returns a result when the operation exits. Using covariance is recommend, that is OperationFoo should override execute so as to return a OperationFooResult rather than OperationResult.
-
-