|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IOSupport
This interface is a tagging interface that should be implemented by export and import plug-ins that knows how to cooperate with the external program executor. The plug-ins may or may not be usable as standalone plug-ins. The cooperation with the external program executor is designed to not interfere (too much) with regular usage of the export plug-in.
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
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.sf.basedb.core.plugin.Plugin |
---|
Plugin.MainType |
Field Summary | |
---|---|
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) |
Method Summary | |
---|---|
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. |
Methods inherited from interface net.sf.basedb.core.plugin.InteractivePlugin |
---|
configure, getGuiContexts, getRequestInformation, isInContext |
Methods inherited from interface net.sf.basedb.core.plugin.Plugin |
---|
done, getAbout, getMainType, getPermissions, init, requiresConfiguration, run, supportsConfigurations |
Field Detail |
---|
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)
Method Detail |
---|
String getShortName()
void init(SessionControl sc, ParameterValues configuration, ParameterValues job, ExternalProgramExecutor executor)
Plugin.init(SessionControl, ParameterValues, ParameterValues)
.
executor
- The external executor plug-in
BaseException
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |