- Direct Known Subclasses:
public abstract class AbstractIOSupport extends AbstractPlugin implements IOSupport
IOSupportinterface and don't want to be visible as standalone plug-ins.
- See Also:
- Last modified
- $Date $
Nested Class Summary
Fields Modifier and Type Field Description
Fields inherited from class net.sf.basedb.core.plugin.AbstractPlugin
annotationSection, configuration, COPY_ANNOTATIONS, job, OVERWRITE_ANNOTATIONS, sc
Constructors Constructor Description
Modifier and Type Method Description
()Get the external program executor that invoked the plug-in.
()Get a set containing all items that the plugin handles.
()A default implementation to maintain backwards compatibility.
SessionControl sc, ParameterValues configuration, ParameterValues job, ExternalProgramExecutor executor)(Replaces the regular plug-in initialisation method.
GuiContext context, Object item)(Check if the plugin can be used on the specified object.
protected abstract String
DbControl dc, ProgressReporter progress)(Perform the IO operation.
()Returns FALSE, since that is how the plugins used to work before this method was introduced.
Request request, Response response, ProgressReporter progress)(Accepts the
()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.AbstractPlugin
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.InteractivePlugin
executorprivate ExternalProgramExecutor executor
supportsConfigurationspublic boolean supportsConfigurations()Description copied from class:
AbstractPluginReturns TRUE, since that is how the plugins used to work before this method was introduced.
requiresConfigurationpublic boolean requiresConfiguration()Description copied from class:
AbstractPluginReturns FALSE, since that is how the plugins used to work before this method was introduced.
getGuiContextsDescription copied from interface:
InteractivePluginGet 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.
isInContextDescription copied from interface:
InteractivePluginCheck if the plugin can be used on the specified object. The item is either a
BasicDataobject, 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
GuiContext.Type.ITEMcontexts 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:
context- The current context of the client application, it is one of the values found in set returned by
item- The currently active item, it's type should match the
GuiContext.getItem()type, or null if the context is a list context
- Always null
IOSupport.COMMAND_EXECUTE_IO_JOBcommand. The default implementation starts a new transaction and then calls
performIO(DbControl, ProgressReporter)which should be implemented by the subclass.
getShortNamepublic String getShortName()A default implementation to maintain backwards compatibility. Plug-ins that want to return a different short name should override this method.
initpublic void init(SessionControl sc, ParameterValues configuration, ParameterValues job, ExternalProgramExecutor executor)Description copied from interface:
IOSupportReplaces 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).
performIOPerform the IO operation.
dc- A DbControl that can be used by the subclass
progress- An optional progress reporter
- A message that is returned as to the external program executor
getExecutorprotected ExternalProgramExecutor getExecutor()Get the external program executor that invoked the plug-in.