Class PluginOperation


  • public class PluginOperation
    extends Operation
    The plugin operation installs, removes and lists storage Plugins.

    The plugin implements these three functionalities as different PluginOperationAction:

    • INSTALL: Installation means copying a file to the user plugin directory as specified by UserConfig.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 by Plugins.list(). These plugins' JAR files must be in the application's class path. Remotely available plugins are queried through the API.
    • 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.
        Specified by:
        execute in class Operation
        Returns:
        Returns an operation-specific operation result
        Throws:
        java.lang.Exception - If the operation fails