2.17.2: 2011-06-17

net.sf.basedb.plugins.executor
Class FileOnlyImporterSupport

java.lang.Object
  extended by net.sf.basedb.core.plugin.AbstractPlugin
      extended by net.sf.basedb.plugins.executor.AbstractIOSupport
          extended by net.sf.basedb.plugins.executor.FileOnlyImporterSupport
All Implemented Interfaces:
InteractivePlugin, Plugin, IOSupport

public class FileOnlyImporterSupport
extends AbstractIOSupport

Importer implementation for the external program executor that uploads all created files to BASE and attaches them to a child bioassay set.

Since:
2.16
Author:
nicklas
Last modified
$Date $

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sf.basedb.core.plugin.Plugin
Plugin.MainType
 
Field Summary
private static About about
           
private  RequestInformation configureJob
           
 
Fields inherited from class net.sf.basedb.core.plugin.AbstractPlugin
annotationSection, configuration, COPY_ANNOTATIONS, job, OVERWRITE_ANNOTATIONS, sc
 
Fields inherited from interface net.sf.basedb.plugins.executor.IOSupport
COMMAND_CONFIGURE_IO_JOB, COMMAND_CONFIGURE_IO_PLUGIN, COMMAND_EXECUTE_IO_JOB
 
Constructor Summary
FileOnlyImporterSupport()
           
 
Method Summary
 void configure(GuiContext context, Request request, Response response)
          Configure the plugin.
 About getAbout()
          Get information about the plugin, such as name, version, authors, etc.
private  RequestInformation getConfigureExecutorParameters(String command)
           
private  RequestInformation getConfigureJobParameters(String command)
           
private  Directory getExtraFilesDirectory(DbControl dc, String pathName)
           
 Plugin.MainType getMainType()
          Get the type of the plugin.
 RequestInformation getRequestInformation(GuiContext context, String command)
          This method will return the RequestInformation for a given command, i.e.
 String getShortName()
          A default implementation to maintain backwards compatibility.
protected  String performIO(DbControl dc, ProgressReporter progress)
          Perform the IO operation.
 
Methods inherited from class net.sf.basedb.plugins.executor.AbstractIOSupport
getExecutor, getGuiContexts, init, isInContext, requiresConfiguration, run, supportsConfigurations
 
Methods inherited from class net.sf.basedb.core.plugin.AbstractPlugin
checkInterrupted, cloneParameterWithDefaultValue, closeLogFile, createLogFile, done, getCopyAnnotationsParmeter, getCurrentConfiguration, getCurrentJob, getJobOrConfigurationValue, getOverwriteAnnotationsParameters, getPermissions, init, log, log, storeValue, storeValue, storeValues, validateRequestParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.basedb.core.plugin.Plugin
done, getPermissions, init
 

Field Detail

about

private static final About about

configureJob

private RequestInformation configureJob
Constructor Detail

FileOnlyImporterSupport

public FileOnlyImporterSupport()
Method Detail

getAbout

public About getAbout()
Description copied from interface: Plugin
Get information about the plugin, such as name, version, authors, etc.

Returns:
An About object

getMainType

public Plugin.MainType getMainType()
Description copied from interface: Plugin
Get the type of the plugin. This method must always return the same value.

Returns:
One of the defined types

configure

public void configure(GuiContext context,
                      Request request,
                      Response response)
Description copied from interface: InteractivePlugin
Configure the plugin. Hopefully the client is supplying values for the parameters specified by InteractivePlugin.getRequestInformation(GuiContext, String).

Parameters:
context - The current context of the client application, it is one of the values found in set returned by InteractivePlugin.getGuiContexts()
request - Request object with the command and parameters
response - Response object in for the plugin to response through

getRequestInformation

public RequestInformation getRequestInformation(GuiContext context,
                                                String command)
                                         throws BaseException
Description copied from interface: InteractivePlugin
This method will return the RequestInformation for a given command, i.e. the list of parameters and some nice help text.

Parameters:
context - The current context of the client application, it is one of the values found in set returned by InteractivePlugin.getGuiContexts()
command - The command
Returns:
The RequestInformation for the command
Throws:
BaseException - if there is an error

getShortName

public String getShortName()
Description copied from class: AbstractIOSupport
A default implementation to maintain backwards compatibility. Plug-ins that want to return a different short name should override this method.

Specified by:
getShortName in interface IOSupport
Overrides:
getShortName in class AbstractIOSupport
Returns:
The name of the plugin (eg. getAbout().getName())

performIO

protected String performIO(DbControl dc,
                           ProgressReporter progress)
                    throws IOException
Description copied from class: AbstractIOSupport
Perform the IO operation.

Specified by:
performIO in class AbstractIOSupport
Parameters:
dc - A DbControl that can be used by the subclass
progress - An optional progress reporter
Returns:
A message that is returned as to the external program executor
Throws:
IOException

getConfigureExecutorParameters

private RequestInformation getConfigureExecutorParameters(String command)

getConfigureJobParameters

private RequestInformation getConfigureJobParameters(String command)

getExtraFilesDirectory

private Directory getExtraFilesDirectory(DbControl dc,
                                         String pathName)

2.17.2: 2011-06-17