2.17.2: 2011-06-17

net.sf.basedb.plugins
Class BioAssaySetExporter

java.lang.Object
  extended by net.sf.basedb.core.plugin.AbstractPlugin
      extended by net.sf.basedb.core.plugin.AbstractExporterPlugin
          extended by net.sf.basedb.plugins.BioAssaySetExporter
All Implemented Interfaces:
ImmediateDownloadExporter, InteractivePlugin, Plugin, SignalTarget

Deprecated. In 2.12. Use: SerialBaseFileExporter or MatrixBaseFileExporter for BASEfile export and the extension package at http://baseplugins.thep.lu.se/wiki/net.sf.basedb.mev for MeV export

public class BioAssaySetExporter
extends AbstractExporterPlugin
implements InteractivePlugin, SignalTarget

Exporter for bioassay sets. Supported formats: - Tab Delimited, Multiple Sample Files (TDMS Format) for use in MeV (available from http://www.tm4.org). - BASEfile. - Plain Matrix, see documentation for exportPlainMatrix method for a description of the format.

Version:
2.1
Author:
enell, jari, peter
Last modified
$Date: 2010-08-13 10:50:27 +0200 (Fri, 13 Aug 2010) $

Nested Class Summary
static class BioAssaySetExporter.QueryItem
          Deprecated.  
private static class BioAssaySetExporter.QueryItemTitleComparator
          Deprecated.  
 
Nested classes/interfaces inherited from interface net.sf.basedb.core.plugin.Plugin
Plugin.MainType
 
Field Summary
private static About about
          Deprecated.  
private  BioAssaySet bas
          Deprecated.  
private  PluginParameter<BioAssaySet> bioAssaySetParameter
          Deprecated.  
private static String COMMAND_CONFIGURE_BASEFILE
          Deprecated.  
private  RequestInformation configureJob
          Deprecated.  
private  RequestInformation configureJobBasefile
          Deprecated.  
private  DbControl dc
          Deprecated.  
private static String FORMAT_BASEFILE_MATRIX
          Deprecated.  
private static String FORMAT_BASEFILE_SERIAL
          Deprecated.  
private static Set<String> FORMAT_BASEFILES
          Deprecated.  
private static String FORMAT_MEV_TDMS
          Deprecated.  
private static String FORMAT_PLAIN_MATRIX
          Deprecated.  
private  PluginParameter<String> formatParameter
          Deprecated.  
private  PluginParameter<Boolean> geneAveragesParameter
          Deprecated.  
private static Set<GuiContext> guiContexts
          Deprecated.  
private static Set<Permissions> permissions
          Deprecated.  
private  ThreadSignalHandler signalHandler
          Deprecated.  
private  PluginParameter<String> usedColumnsParameter
          Deprecated.  
private  PluginParameter<String> usedFieldsParameter
          Deprecated.  
 
Fields inherited from class net.sf.basedb.core.plugin.AbstractExporterPlugin
optionalSaveAsType, OVERWRITE, overwriteType, requiredSaveAsType, SAVE_AS
 
Fields inherited from class net.sf.basedb.core.plugin.AbstractPlugin
annotationSection, configuration, COPY_ANNOTATIONS, job, OVERWRITE_ANNOTATIONS, sc
 
Constructor Summary
BioAssaySetExporter()
          Deprecated.  
 
Method Summary
protected  void begin(DbControl dc)
          Deprecated. Called just before the export starts.
 void configure(GuiContext context, Request request, Response response)
          Deprecated. Configure the plugin.
protected  void end(boolean success)
          Deprecated. Called just after everything has been committed to the database, or immediately after an error has ocurred.
 void exportBaseFileMatrix(BioAssaySet bas, File file, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, Boolean mergeReporters)
          Deprecated. In 2.11 and 2.12, use MatrixBaseFileExporter instead
 void exportBaseFileMatrix(BioAssaySet bas, File file, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, Boolean mergeReporters, ProgressReporter progress)
          Deprecated. In 2.12, use MatrixBaseFileExporter instead
 void exportBaseFileMatrix(BioAssaySet bas, OutputStream os, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, boolean mergeReporters)
          Deprecated. In 2.11 and 2.12, use MatrixBaseFileExporter instead.
 void exportBaseFileMatrix(BioAssaySet bas, OutputStream os, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, boolean mergeReporters, ProgressReporter progress)
          Deprecated. In 2.11 and 2.12, use MatrixBaseFileExporter instead.
private  void exportBaseFileSectionAssays(PrintWriter out, DbControl dc, BioAssaySet bas)
          Deprecated.  
private  void exportBaseFileSectionHead(PrintWriter out, Map<String,String> parameters)
          Deprecated.  
private  void exportBaseFileSectionSpots(PrintWriter out, DbControl dc, BioAssaySet bas, DynamicSpotQuery query, List<String> reporterFields, List<String> spotFields, List<BioAssay> assays, Map<String,BioAssaySetExporter.QueryItem> qi, long count, boolean mergeOnReporters, Map<Integer,String> reporterLine, ProgressReporter progress)
          Deprecated.  
 void exportBaseFileSerial(BioAssaySet bas, File file, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, Boolean mergeReporters)
          Deprecated. In 2.11 and 2.12, use SerialBaseFileExporter instead.
 void exportBaseFileSerial(BioAssaySet bas, File file, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, Boolean mergeReporters, ProgressReporter progress)
          Deprecated. In 2.12, use SerialBaseFileExporter instead.
 void exportBaseFileSerial(BioAssaySet bas, OutputStream os, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, boolean mergeReporters)
          Deprecated. In 2.11 and 2.12, use SerialBaseFileExporter instead.
 void exportBaseFileSerial(BioAssaySet bas, OutputStream os, Map<String,String> parameters, List<String> reporterFields, List<String> spotFields, boolean mergeReporters, ProgressReporter progress)
          Deprecated. In 2.12, use SerialBaseFileExporter instead.
 void exportMeV(BioAssaySet bioassayset, OutputStream to, ProgressReporter progress)
          Deprecated. In 2.12, use extension package found at http://baseplugins.thep.lu.se/wiki/net.sf.basedb.mev instead
 void exportPlainMatrix(BioAssaySet bioassayset, OutputStream os, ProgressReporter progress)
          Deprecated. In 2.12, no direct replacement, write a subclass of AbstractBioAssaySetExporter instead
 About getAbout()
          Deprecated. Get information about the plugin, such as name, version, authors, etc.
private  List<BioAssaySetExporter.QueryItem> getBaseFileExtraQI(DbControl dc, BioAssaySet bas)
          Deprecated.  
private  List<BioAssaySetExporter.QueryItem> getBaseFileFormulaQI(DbControl dc, BioAssaySet bas)
          Deprecated.  
private  Map<String,BioAssaySetExporter.QueryItem> getBaseFileQIMap(DbControl dc, BioAssaySet bas)
          Deprecated.  
private  List<BioAssaySetExporter.QueryItem> getBaseFileRawQI(BioAssaySet bas)
          Deprecated.  
private  Map<Integer,String> getBaseFileReporterFields(DbControl dc, BioAssaySet bas, DynamicPositionQuery query, Map<String,BioAssaySetExporter.QueryItem> queryMap, List<String> reporterFields, boolean mergeOnReporters)
          Deprecated.  
private  List<BioAssaySetExporter.QueryItem> getBaseFileReporterQI()
          Deprecated.  
private  List<BioAssaySetExporter.QueryItem> getBaseFileSpotQI(BioAssaySet bas)
          Deprecated.  
private  long getBaseFileSpotSectionCount(DbControl dc, DynamicSpotQuery count, boolean mergeReporters)
          Deprecated.  
private  RequestInformation getConfigureBasefileParameters(GuiContext context)
          Deprecated.  
private  RequestInformation getConfigureJobParameters(GuiContext context, Boolean requireFile)
          Deprecated.  
 List<AnnotationType> getExperimentalFactors(DbControl dc, BioAssaySet bas)
          Deprecated.  
 Set<GuiContext> getGuiContexts()
          Deprecated. Get a set containing all items that the plugin handles.
 Plugin.MainType getMainType()
          Deprecated. Get the type of the plugin.
 Collection<Permissions> getPermissions()
          Deprecated. Request create and write access to File:s and Directory:s and read access to Experiment:s and User:s.
 RequestInformation getRequestInformation(GuiContext context, String command)
          Deprecated. This method will return the RequestInformation for a given command, i.e.
 SignalHandler getSignalHandler()
          Deprecated. Get the signal handler that is handling signals on behalf of this object.
protected  String getSuccessMessage()
          Deprecated. Called if the export was successful to let the subclass generate a simple message that is sent back to the core and user interface.
 String isInContext(GuiContext context, Object item)
          Deprecated. Check if the plugin can be used on the specified object.
protected  void performExport(ExportOutputStream out, ProgressReporter progress)
          Deprecated. Perform the export.
 boolean requiresConfiguration()
          Deprecated. Returns FALSE, since that is how the plugins used to work before this method was introduced.
 boolean supportsConfigurations()
          Deprecated. Returns TRUE, since that is how the plugins used to work before this method was introduced.
 
Methods inherited from class net.sf.basedb.core.plugin.AbstractExporterPlugin
doExport, getOverwrite, getOverwriteParameter, getSaveAsParameter, getSaveAsPath, getSaveTo, pathCanBeUsed, run
 
Methods inherited from class net.sf.basedb.core.plugin.AbstractPlugin
checkInterrupted, cloneParameterWithDefaultValue, closeLogFile, createLogFile, done, getCopyAnnotationsParmeter, getCurrentConfiguration, getCurrentJob, getJobOrConfigurationValue, getOverwriteAnnotationsParameters, 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, init, run
 

Field Detail

signalHandler

private ThreadSignalHandler signalHandler
Deprecated. 

dc

private DbControl dc
Deprecated. 

bas

private BioAssaySet bas
Deprecated. 

about

private static final About about
Deprecated. 

configureJob

private RequestInformation configureJob
Deprecated. 

configureJobBasefile

private RequestInformation configureJobBasefile
Deprecated. 

guiContexts

private static final Set<GuiContext> guiContexts
Deprecated. 

permissions

private static final Set<Permissions> permissions
Deprecated. 

bioAssaySetParameter

private PluginParameter<BioAssaySet> bioAssaySetParameter
Deprecated. 

formatParameter

private PluginParameter<String> formatParameter
Deprecated. 

geneAveragesParameter

private PluginParameter<Boolean> geneAveragesParameter
Deprecated. 

usedFieldsParameter

private PluginParameter<String> usedFieldsParameter
Deprecated. 

usedColumnsParameter

private PluginParameter<String> usedColumnsParameter
Deprecated. 

COMMAND_CONFIGURE_BASEFILE

private static final String COMMAND_CONFIGURE_BASEFILE
Deprecated. 
See Also:
Constant Field Values

FORMAT_BASEFILE_SERIAL

private static final String FORMAT_BASEFILE_SERIAL
Deprecated. 
See Also:
Constant Field Values

FORMAT_BASEFILE_MATRIX

private static final String FORMAT_BASEFILE_MATRIX
Deprecated. 
See Also:
Constant Field Values

FORMAT_MEV_TDMS

private static final String FORMAT_MEV_TDMS
Deprecated. 
See Also:
Constant Field Values

FORMAT_PLAIN_MATRIX

private static final String FORMAT_PLAIN_MATRIX
Deprecated. 
See Also:
Constant Field Values

FORMAT_BASEFILES

private static final Set<String> FORMAT_BASEFILES
Deprecated. 
Constructor Detail

BioAssaySetExporter

public BioAssaySetExporter()
Deprecated. 
Method Detail

configure

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

Specified by:
configure in interface InteractivePlugin
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

getSignalHandler

public SignalHandler getSignalHandler()
Deprecated. 
Description copied from interface: SignalTarget
Get the signal handler that is handling signals on behalf of this object. Multiple invokations of this method may receive the same or different objects. Null may be returned if, for some reason, the current object instance doesn't want to receive signals. Returning null is the same as not implementing this interface.

Specified by:
getSignalHandler in interface SignalTarget
Returns:
A SignalHandler object, or null if the current instance doesn't support signals

exportBaseFileMatrix

public void exportBaseFileMatrix(BioAssaySet bas,
                                 File file,
                                 Map<String,String> parameters,
                                 List<String> reporterFields,
                                 List<String> spotFields,
                                 Boolean mergeReporters)
                          throws IOException,
                                 SQLException
Deprecated. In 2.11 and 2.12, use MatrixBaseFileExporter instead

Throws:
IOException
SQLException

exportBaseFileMatrix

public void exportBaseFileMatrix(BioAssaySet bas,
                                 File file,
                                 Map<String,String> parameters,
                                 List<String> reporterFields,
                                 List<String> spotFields,
                                 Boolean mergeReporters,
                                 ProgressReporter progress)
                          throws IOException,
                                 SQLException
Deprecated. In 2.12, use MatrixBaseFileExporter instead

Export the data from a bioassayset as a serial BASEfile. The reporterFields and spotFields parameter must identify the data to export.

The reporterFields parameter supports the following:

rep.<property> The reporter property with the specified name, for example: rep.externalId, rep.symbol or a property defined in the extended properties file.
The spotFields parameter supports the following:
intensityN The intensity in channel N
position The position number for this spot in the data matrix
raw.<property> The raw data property with the specified name, for example: raw.x, raw.row or a property defined by the raw data type.
frm.<id> The value of the formula with the specified ID.
xtra.<externalId> The value of the extra value with the specified external ID.

Parameters:
bas - The bioassayset to export
file - The file to export to
parameters - Header information that should go at the top of the BASEfile
reporterFields - The reporter fields that should be exportered
spotFields - The spot fields that should be exported
mergeReporters - TRUE to merge spot data having the same reporter (currently not supported)
progress - An optional progress reporter
Throws:
IOException - If there is an IO error
SQLException - If there is an error reading from the database
Since:
2.11

exportBaseFileMatrix

public void exportBaseFileMatrix(BioAssaySet bas,
                                 OutputStream os,
                                 Map<String,String> parameters,
                                 List<String> reporterFields,
                                 List<String> spotFields,
                                 boolean mergeReporters)
                          throws IOException,
                                 SQLException
Deprecated. In 2.11 and 2.12, use MatrixBaseFileExporter instead.

Throws:
IOException
SQLException

exportBaseFileMatrix

public void exportBaseFileMatrix(BioAssaySet bas,
                                 OutputStream os,
                                 Map<String,String> parameters,
                                 List<String> reporterFields,
                                 List<String> spotFields,
                                 boolean mergeReporters,
                                 ProgressReporter progress)
                          throws IOException,
                                 SQLException
Deprecated. In 2.11 and 2.12, use MatrixBaseFileExporter instead.

Throws:
IOException
SQLException
Since:
2.11

exportBaseFileSectionAssays

private void exportBaseFileSectionAssays(PrintWriter out,
                                         DbControl dc,
                                         BioAssaySet bas)
Deprecated. 

exportBaseFileSectionHead

private void exportBaseFileSectionHead(PrintWriter out,
                                       Map<String,String> parameters)
Deprecated. 

exportBaseFileSerial

public void exportBaseFileSerial(BioAssaySet bas,
                                 File file,
                                 Map<String,String> parameters,
                                 List<String> reporterFields,
                                 List<String> spotFields,
                                 Boolean mergeReporters)
                          throws IOException,
                                 SQLException
Deprecated. In 2.11 and 2.12, use SerialBaseFileExporter instead.

Throws:
IOException
SQLException

exportBaseFileSerial

public void exportBaseFileSerial(BioAssaySet bas,
                                 File file,
                                 Map<String,String> parameters,
                                 List<String> reporterFields,
                                 List<String> spotFields,
                                 Boolean mergeReporters,
                                 ProgressReporter progress)
                          throws IOException,
                                 SQLException
Deprecated. In 2.12, use SerialBaseFileExporter instead.

Export the data from a bioassayset as a serial BASEfile. See exportBaseFileMatrix(BioAssaySet, File, Map, List, List, Boolean) for information about the naming of parameters.

Parameters:
bas - The bioassayset to export
file - The file to export to
parameters - Header information that should go at the top of the BASEfile
reporterFields - The reporter fields that should be exportered
spotFields - The spot fields that should be exported
mergeReporters - TRUE to merge spot data having the same reporter (currently not supported)
progress - An optional progress reporter
Throws:
IOException - If there is an IO error
SQLException - If there is an error reading from the database
Since:
2.11

exportBaseFileSerial

public void exportBaseFileSerial(BioAssaySet bas,
                                 OutputStream os,
                                 Map<String,String> parameters,
                                 List<String> reporterFields,
                                 List<String> spotFields,
                                 boolean mergeReporters)
                          throws IOException,
                                 SQLException
Deprecated. In 2.11 and 2.12, use SerialBaseFileExporter instead.

Throws:
IOException
SQLException

exportBaseFileSerial

public void exportBaseFileSerial(BioAssaySet bas,
                                 OutputStream os,
                                 Map<String,String> parameters,
                                 List<String> reporterFields,
                                 List<String> spotFields,
                                 boolean mergeReporters,
                                 ProgressReporter progress)
                          throws IOException,
                                 SQLException
Deprecated. In 2.12, use SerialBaseFileExporter instead.

Throws:
IOException
SQLException
Since:
2.11

exportBaseFileSectionSpots

private void exportBaseFileSectionSpots(PrintWriter out,
                                        DbControl dc,
                                        BioAssaySet bas,
                                        DynamicSpotQuery query,
                                        List<String> reporterFields,
                                        List<String> spotFields,
                                        List<BioAssay> assays,
                                        Map<String,BioAssaySetExporter.QueryItem> qi,
                                        long count,
                                        boolean mergeOnReporters,
                                        Map<Integer,String> reporterLine,
                                        ProgressReporter progress)
                                 throws SQLException
Deprecated. 
Throws:
SQLException

exportMeV

public void exportMeV(BioAssaySet bioassayset,
                      OutputStream to,
                      ProgressReporter progress)
               throws IOException,
                      SQLException
Deprecated. In 2.12, use extension package found at http://baseplugins.thep.lu.se/wiki/net.sf.basedb.mev instead

Export bioassayset data in MeV format. The export includes all reporter information and all experimental factor information. If the expriment is a two-channel experiment the ch1/ch2 ratio (non-log value!) is exported as the expression value otherwise the raw intensity of channel 1 is exported.

Parameters:
bioassayset - The bioassayset to export
to - The stream to write the exported data to
progress - An optional progress reporter
Throws:
IOException - If there is an IO error
SQLException - If there is an error reading from the database

exportPlainMatrix

public void exportPlainMatrix(BioAssaySet bioassayset,
                              OutputStream os,
                              ProgressReporter progress)
                       throws IOException,
                              SQLException
Deprecated. In 2.12, no direct replacement, write a subclass of AbstractBioAssaySetExporter instead

Export bioassayset data in plain matrix format. Plain matrix format is simply a matrix with no header nor reporter information. Each column in the matrix corresponds to an assay, and each row corresponds to a reporter. Missing values are reported as entries with no number and 'NaN' is reported for undefined values (such as division with zero). Note, reporters with no measurement within a bioassay set are not reported at all, i.e., a row is not exported with misssing values only. To be clear, we state this once more: Rows (reporters) are only exported if one or more columns (assays) have a value. The value can be 'NaN'. The data exported depends on the underlying microarray platform; - 1-channel: raw ch1 intensity - 2-channel: the fraction ch1/ch2, note! non-log value The justification for exporting non-log values for 2-channel data is to follow the MeV export format where non-log data is exported for 2-channel data. 'NaN' is returned for zero ch2 values. The plug-in or user that uses this method must keep track of the row and column information themselves. The row is sorted in ascending position order, the columns are sorted in ascending column order.

Parameters:
bioassayset - The bioassayset to export
os - The stream to write the exported data to
progress - An optional progress reporter
Throws:
IOException - If there is an IO error
SQLException - If there is an error reading from the database

getAbout

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

Specified by:
getAbout in interface Plugin
Returns:
An About object

getBaseFileSpotSectionCount

private long getBaseFileSpotSectionCount(DbControl dc,
                                         DynamicSpotQuery count,
                                         boolean mergeReporters)
Deprecated. 

getBaseFileReporterFields

private Map<Integer,String> getBaseFileReporterFields(DbControl dc,
                                                      BioAssaySet bas,
                                                      DynamicPositionQuery query,
                                                      Map<String,BioAssaySetExporter.QueryItem> queryMap,
                                                      List<String> reporterFields,
                                                      boolean mergeOnReporters)
                                               throws SQLException
Deprecated. 
Throws:
SQLException

getBaseFileExtraQI

private List<BioAssaySetExporter.QueryItem> getBaseFileExtraQI(DbControl dc,
                                                               BioAssaySet bas)
Deprecated. 

getBaseFileFormulaQI

private List<BioAssaySetExporter.QueryItem> getBaseFileFormulaQI(DbControl dc,
                                                                 BioAssaySet bas)
Deprecated. 

getBaseFileQIMap

private Map<String,BioAssaySetExporter.QueryItem> getBaseFileQIMap(DbControl dc,
                                                                   BioAssaySet bas)
Deprecated. 

getBaseFileRawQI

private List<BioAssaySetExporter.QueryItem> getBaseFileRawQI(BioAssaySet bas)
Deprecated. 

getBaseFileReporterQI

private List<BioAssaySetExporter.QueryItem> getBaseFileReporterQI()
Deprecated. 

getBaseFileSpotQI

private List<BioAssaySetExporter.QueryItem> getBaseFileSpotQI(BioAssaySet bas)
Deprecated. 

getConfigureBasefileParameters

private RequestInformation getConfigureBasefileParameters(GuiContext context)
Deprecated. 

getConfigureJobParameters

private RequestInformation getConfigureJobParameters(GuiContext context,
                                                     Boolean requireFile)
Deprecated. 

getExperimentalFactors

public List<AnnotationType> getExperimentalFactors(DbControl dc,
                                                   BioAssaySet bas)
Deprecated. 

getGuiContexts

public Set<GuiContext> getGuiContexts()
Deprecated. 
Description copied from interface: InteractivePlugin
Get a set containing all items that the plugin handles. Ie. if the plugin imports reporters, return a set containing Item.REPORTER. This information is used by client applications to put the plugin in the proper place in the user interface.

Specified by:
getGuiContexts in interface InteractivePlugin
Returns:
A Set containing Item:s, or null if the plugin is not concerned about items

getMainType

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

Specified by:
getMainType in interface Plugin
Overrides:
getMainType in class AbstractExporterPlugin
Returns:
MainType.EXPORT

getPermissions

public Collection<Permissions> getPermissions()
Deprecated. 
Request create and write access to File:s and Directory:s and read access to Experiment:s and User:s.

Specified by:
getPermissions in interface Plugin
Overrides:
getPermissions in class AbstractPlugin
Returns:
A collection of permissions or null to not use permissions

getRequestInformation

public RequestInformation getRequestInformation(GuiContext context,
                                                String command)
                                         throws BaseException
Deprecated. 
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.

Specified by:
getRequestInformation in interface InteractivePlugin
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

isInContext

public String isInContext(GuiContext context,
                          Object item)
Deprecated. 
Description copied from interface: InteractivePlugin
Check if the plugin can be used on the specified object. The item is either a BasicItem or BasicData object, or null if called from a list context. A client application should only call this method for contexts matching one of the contexts in the set returned by the InteractivePlugin.getGuiContexts() method. For GuiContext.Type.ITEM contexts an item of the correct type should be passed as a parameter.

The plug-in can response with a null value indicating success, a warning-level message or throw an exception to indicate an error-level message. Client application should normally only show error-level messages to users, unless the user has requested to see warning messages.

NOTE! Before BASE 2.4 all messages were treated as error-level messages.

Specified by:
isInContext in interface InteractivePlugin
Parameters:
context - The current context of the client application, it is one of the values found in set returned by InteractivePlugin.getGuiContexts()
item - The currently active item, it's type should match the GuiContext.getItem() type, or null if the context is a list context
Returns:
Null if the plugin can use that item, or a warning-level message explaining why the plugin can't be used

requiresConfiguration

public boolean requiresConfiguration()
Deprecated. 
Description copied from class: AbstractPlugin
Returns FALSE, since that is how the plugins used to work before this method was introduced.

Specified by:
requiresConfiguration in interface Plugin
Overrides:
requiresConfiguration in class AbstractPlugin
Returns:
TRUE or FALSE

begin

protected void begin(DbControl dc)
Deprecated. 
Description copied from class: AbstractExporterPlugin
Called just before the export starts. A subclass may override this method if it needs to initialise some resources.

Overrides:
begin in class AbstractExporterPlugin
Parameters:
dc - The DbControl that is used to write to the database. A subclass may use this read from the database as well
See Also:
AbstractExporterPlugin.end(boolean)

performExport

protected void performExport(ExportOutputStream out,
                             ProgressReporter progress)
                      throws IOException
Deprecated. 
Description copied from class: AbstractExporterPlugin
Perform the export. This method replaces the ImmediateDownloadExporter.doExport(ExportOutputStream, ProgressReporter) method.

Specified by:
performExport in class AbstractExporterPlugin
Parameters:
out - Output stream to write the exported data to
progress - An optional progress reporter
Throws:
IOException

end

protected void end(boolean success)
Deprecated. 
Description copied from class: AbstractExporterPlugin
Called just after everything has been committed to the database, or immediately after an error has ocurred. A subclass should clean up any resources aquired in the AbstractExporterPlugin.begin(DbControl) method here.

Overrides:
end in class AbstractExporterPlugin
Parameters:
success - TRUE if the file was parsed successfully, FALSE otherwise
See Also:
AbstractExporterPlugin.begin(DbControl)

getSuccessMessage

protected String getSuccessMessage()
Deprecated. 
Description copied from class: AbstractExporterPlugin
Called if the export was successful to let the subclass generate a simple message that is sent back to the core and user interface. An example message might by: 178 reporters exported successfully. The default implementation always return null.

Overrides:
getSuccessMessage in class AbstractExporterPlugin

supportsConfigurations

public boolean supportsConfigurations()
Deprecated. 
Description copied from class: AbstractPlugin
Returns TRUE, since that is how the plugins used to work before this method was introduced.

Specified by:
supportsConfigurations in interface Plugin
Overrides:
supportsConfigurations in class AbstractPlugin
Returns:
TRUE or FALSE

2.17.2: 2011-06-17