public interface IOSupport extends InteractivePlugin
The communication between the external executor and the importer/exporter
uses the regular plug-in API. Eg.
InteractivePlugin.getRequestInformation(GuiContext, String)
,
InteractivePlugin.configure(GuiContext, Request, Response)
and Plugin.run(Request, Response, ProgressReporter)
.
But we use a different set of commands than what is used in the
normal plug-in execution sequence, so it is possible for the import/export
plug-ins to know if they are invoked by the executor or by the
regular plug-in execution sequence.
Note! The external executor doesn't check the return values of methods such
as Plugin.supportsConfigurations()
, Plugin.requiresConfiguration()
,
InteractivePlugin.getGuiContexts()
, etc. By implementing this interface
a plug-in is assumed to work with the external executor. This also means that
a plug-in may use the above mentioned methods to "hide" itself as a regular
plug-in (eg. if the getGuiContexts()
returns null it will never
show up in the interface). See AbstractIOSupport
which can be used as
a base class for such plug-ins.
The external program executor has a three-step configuration sequence.
COMMAND_CONFIGURE_IO_PLUGIN
. The
configuration parameters are proxied from the external executor
which means that the exporter/importer has access to the
options selected in the first step. The import/export plug-ins
may only respond with Response.Status.DONE
or Response.Status.ERROR
.
Other responses are treated as an error. Configuration settings
that are stored by the importer and exporter are merged with the
external executors configuration and stored in the database.
ExternalProgramExecutor
Plugin.MainType
Modifier and Type | Field and Description |
---|---|
static String |
COMMAND_CONFIGURE_IO_JOB
This command is sent to import and export plug-ins in the job
configuration sequence:
InteractivePlugin.getRequestInformation(GuiContext, String)
and InteractivePlugin.configure(GuiContext, Request, Response) |
static String |
COMMAND_CONFIGURE_IO_PLUGIN
This command is sent to import and export plug-ins in the plug-in
configuration sequence:
InteractivePlugin.getRequestInformation(GuiContext, String)
and InteractivePlugin.configure(GuiContext, Request, Response) |
static String |
COMMAND_EXECUTE_IO_JOB
This command is sent to import and export plug-ins in the job
execution sequence:
Plugin.run(Request, Response, ProgressReporter) |
Modifier and Type | Method and Description |
---|---|
String |
getShortName()
Get a short name of the plug-in.
|
void |
init(SessionControl sc,
ParameterValues configuration,
ParameterValues job,
ExternalProgramExecutor executor)
Replaces the regular plug-in initialisation method.
|
configure, getGuiContexts, getRequestInformation, isInContext
done, getMainType, getPermissions, init, requiresConfiguration, run, supportsConfigurations
static final String COMMAND_CONFIGURE_IO_PLUGIN
InteractivePlugin.getRequestInformation(GuiContext, String)
and InteractivePlugin.configure(GuiContext, Request, Response)
static final String COMMAND_CONFIGURE_IO_JOB
InteractivePlugin.getRequestInformation(GuiContext, String)
and InteractivePlugin.configure(GuiContext, Request, Response)
static final String COMMAND_EXECUTE_IO_JOB
Plugin.run(Request, Response, ProgressReporter)
String getShortName()
void init(SessionControl sc, ParameterValues configuration, ParameterValues job, ExternalProgramExecutor executor)
Plugin.init(SessionControl, ParameterValues, ParameterValues)
.executor
- The external executor plug-in