public final class PluginConfigurationRequest extends PluginRequest<InteractivePlugin>
PluginConfiguration.configure()
Job.configure(GuiContext)
getRequestInformation()
method
to find out which parameters the plugin or job wants.
PluginRequest.setParameterValue(String, Object)
or PluginRequest.setParameterValues(String, List)
methods.
invoke()
to let the plugin check the parameters and
store them in the database.
PluginResponse.getStatus()
method and repeat the
steps if needed, or display an error message. In case of an error
in the parameters, ask for new parameters and retry.
DbControl.commit()
.
Note 1! If the above procedure includes waiting for user input (which it normally does)
you should also use DbControl.disconnect()
and DbControl.reconnect()
to conserve database resources. You must not close or commit the DbControl
until the configuration is completed.
Note 2! If the returned status of a plugin is Response.Status.DONE
after
an invokation, the Plugin.done()
method is called to let the plugin
clean up resources. If a client application wants to abort earlier it should
use the PluginRequest.done()
method in this class.
PluginRequest.RequestImpl
Modifier and Type | Field and Description |
---|---|
private boolean |
allowImmediateExecution |
private GuiContext |
context |
private boolean |
dryRun |
private Job.ProgressReporterImpl |
progress |
Constructor and Description |
---|
PluginConfigurationRequest(SessionControl sc,
InteractivePlugin plugin,
String command,
PluginConfiguration pluginConfiguration,
ParameterValuesImpl configurationParameters,
Job job,
ParameterValuesImpl jobParameters,
GuiContext context,
PluginDefinition pluginDefinition,
boolean allowImmediateExecution) |
Modifier and Type | Method and Description |
---|---|
GuiContext |
getGuiContext()
Get the context of the client application when this configuration request
was created.
|
RequestInformation |
getRequestInformation()
Get the request information object containing
information about the parameters needed for the plugin.
|
PluginResponse |
invoke()
Invoke the plugin and let it do it's work.
|
(package private) void |
setProgressReporter(Job.ProgressReporterImpl progress) |
done, getCommand, getCurrentConfigurationParameterValues, getCurrentJobParameterValues, getCurrentParameterValue, getCurrentParameterValues, getJob, getPlugin, getSessionControl, registerParameters, saveParameters, setNextCommand, setParameterValue, setParameterValues
private GuiContext context
private Job.ProgressReporterImpl progress
private boolean allowImmediateExecution
private boolean dryRun
PluginConfigurationRequest(SessionControl sc, InteractivePlugin plugin, String command, PluginConfiguration pluginConfiguration, ParameterValuesImpl configurationParameters, Job job, ParameterValuesImpl jobParameters, GuiContext context, PluginDefinition pluginDefinition, boolean allowImmediateExecution)
public PluginResponse invoke()
PluginRequest
Response.Status.ERROR
and
the error messages will be available in the
PluginResponse.getMessage()
and
PluginResponse.getErrorList()
methods.invoke
in class PluginRequest<InteractivePlugin>
PluginResponse
objectpublic RequestInformation getRequestInformation() throws BaseException
RequestInformation
objectBaseException
- If there is an errorpublic GuiContext getGuiContext()
void setProgressReporter(Job.ProgressReporterImpl progress)