Class PluginConfigurationRequest

java.lang.Object
net.sf.basedb.core.PluginRequest<InteractivePlugin>
net.sf.basedb.core.PluginConfigurationRequest

public final class PluginConfigurationRequest extends PluginRequest<InteractivePlugin>
Configures a plugin or job. You will get an instance of this class when:
  1. You want to configure a plugin: PluginConfiguration.configure()
  2. You want to configure a job: Job.configure(GuiContext)
You should use the following protocol:
  1. Call the getRequestInformation() method to find out which parameters the plugin or job wants.
  2. Display a user interface for entering the parameter values or get the parameters from somewhere else.
  3. Set the parameter values with the PluginRequest.setParameterValue(String, Object) or PluginRequest.setParameterValues(String, List) methods.
  4. Call invoke() to let the plugin check the parameters and store them in the database.
  5. Check the 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.
  6. Commit the changes using 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.

Version:
2.0
Author:
Nicklas
Last modified
$Date: 2015-04-21 09:59:42 +0200 (ti, 21 apr 2015) $