2.17.2: 2011-06-17

net.sf.basedb.plugins.executor
Interface IOSupport

All Superinterfaces:
InteractivePlugin, Plugin
All Known Implementing Classes:
AbstractIOSupport, BaseFileExporterSupport, BaseFileImporterSupport, BfsExporterSupport, BfsImporterSupport, FileOnlyImporterSupport

public interface IOSupport
extends InteractivePlugin

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.

  1. Select external program, exporter and importer and specify pre-conditions for the bioassay set such as raw data type, number of channels etc.
  2. Configure the exporter and importer. This step is forwarded to the importer/exporter plug-ins selected in the first step with the command 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.
  3. Define parameters for the external program.
The job configuration sequence .... TODO

Since:
2.15
Author:
nicklas
See Also:
ExternalProgramExecutor
Last modified
$Date $

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

COMMAND_CONFIGURE_IO_PLUGIN

static final 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)

See Also:
Constant Field Values

COMMAND_CONFIGURE_IO_JOB

static final 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)

See Also:
Constant Field Values

COMMAND_EXECUTE_IO_JOB

static final 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)

See Also:
Constant Field Values
Method Detail

getShortName

String getShortName()
Get a short name of the plug-in. This is used by the external program executor in the plug-in selection lists during the configuration phase.

Since:
2.16

init

void init(SessionControl sc,
          ParameterValues configuration,
          ParameterValues job,
          ExternalProgramExecutor executor)
Replaces the regular plug-in initialisation method. When the plug-in is used as part of the external executor this method is used instead of Plugin.init(SessionControl, ParameterValues, ParameterValues).

Parameters:
executor - The external executor plug-in
Throws:
BaseException

2.17.2: 2011-06-17