|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Plugin
This interface must be implemented by all plugins to BASE. A plugin must also define a default public no-argument constructor.
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()
and getAbout()
methods
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
Nested Class Summary | |
---|---|
static class |
Plugin.MainType
|
Method Summary | |
---|---|
void |
done()
This method is called when the core is finished with the plugin object. |
About |
getAbout()
Get information about the plugin, such as name, version, authors, etc. |
Plugin.MainType |
getMainType()
Get the type of the plugin. |
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. |
Method Detail |
---|
Plugin.MainType getMainType()
About getAbout()
About
objectboolean supportsConfigurations()
boolean requiresConfiguration()
supportsConfigurations()
method returns FALSE, the return value of this method is expected
to also be FALSE.
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 plugin
BaseException
- 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()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |