public interface Plugin
When a plugin is installed into BASE the core will use the following sequence to store all meta-information about the plugin in the database:
getMainType()
method
InteractivePlugin
and if it does, call the InteractivePlugin.getGuiContexts()
method.
PluginType
as appropriate
When a plugin is executed using a the request/response scheme the core will use the following sequence:
init(SessionControl, ParameterValues, ParameterValues)
method
which gives the plugin access to it's configuration and job-specific parameters
run(Request, Response, ProgressReporter)
method to let
the plugin do it's work
done()
to let the plugin clean up after itself
done
has been called, the plugin instance is not
reused again
Modifier and Type | Interface and Description |
---|---|
static class |
Plugin.MainType |
Modifier and Type | Method and Description |
---|---|
void |
done()
This method is called when the core is finished
with the plugin object.
|
Plugin.MainType |
getMainType()
Get the type of the plugin.
|
java.util.Collection<Permissions> |
getPermissions()
Get the permissions this plugin requires to function as expected.
|
void |
init(SessionControl sc,
ParameterValues configuration,
ParameterValues job)
This method is called right after the plugin object has been constructed
to pass the configuration and job parameters to the plugin.
|
boolean |
requiresConfiguration()
Return TRUE if the plugin requires a configuration when executing
a job.
|
void |
run(Request request,
Response response,
ProgressReporter progress)
Run the plugin.
|
boolean |
supportsConfigurations()
Return TRUE if the plugin supports different configurations when
executing a job.
|
Plugin.MainType getMainType()
boolean supportsConfigurations()
boolean requiresConfiguration()
supportsConfigurations()
method returns FALSE, the return value of this method is expected
to also be FALSE.java.util.Collection<Permissions> getPermissions()
void init(SessionControl sc, ParameterValues configuration, ParameterValues job) throws BaseException
ParameterValues
parameters can be null if no parameters exists.sc
- A SessionControl
object that the plugin
can use to communicate with the core.configuration
- The configuration parameters for the pluginjob
- The job parameters for the pluginBaseException
- if there is an error.void run(Request request, Response response, ProgressReporter progress)
request
- Request object with the command and parametersresponse
- Response object in for the plugin to response
throughprogress
- A ProgressReporter
where the plugin can report
its progess, can be nullvoid done()