Interface Plugin

    • Method Detail

      • getMainType

        Plugin.MainType getMainType()
        Get the type of the plugin. This method must always return the same value.
        Returns:
        One of the defined types
      • supportsConfigurations

        boolean supportsConfigurations()
        Return TRUE if the plugin supports different configurations when executing a job.
        Returns:
        TRUE or FALSE
      • requiresConfiguration

        boolean requiresConfiguration()
        Return TRUE if the plugin requires a configuration when executing a job. The core will not start a job without a configuration if this method returns TRUE. Note! If the supportsConfigurations() method returns FALSE, the return value of this method is expected to also be FALSE.
        Returns:
        TRUE or FALSE
      • getPermissions

        Collection<Permissions> getPermissions()
        Get the permissions this plugin requires to function as expected. The plugin may specify permissions that is always granted to the plugin even if the logged in user doesn't have that permission and permissions that are only granted if the logged in user has the required permission. Permissions that are not specified are always denied. If null or an empty collection is returned, the permissions are not used and the plugin will always get the same permissions as the logged in user.
        Returns:
        A collection of permissions or null to not use permissions
      • init

        void init​(SessionControl sc,
                  ParameterValues configuration,
                  ParameterValues job)
           throws BaseException
        This method is called right after the plugin object has been constructed to pass the configuration and job parameters to the plugin. The ParameterValues parameters can be null if no parameters exists.
        Parameters:
        sc - A SessionControl object that the plugin can use to communicate with the core.
        configuration - The configuration parameters for the plugin
        job - The job parameters for the plugin
        Throws:
        BaseException - if there is an error.
      • run

        void run​(Request request,
                 Response response,
                 ProgressReporter progress)
        Run the plugin. If a progress reporter object is passed it is recommended that the plugin makes use of it.
        Parameters:
        request - Request object with the command and parameters
        response - Response object in for the plugin to response through
        progress - A ProgressReporter where the plugin can report its progess, can be null
      • done

        void done()
        This method is called when the core is finished with the plugin object. The plugin should clean up and close any resources it has aquired.