|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.core.PluginConfigurationRequest
public final class PluginConfigurationRequest
Configures a plugin or job. You will get an instance of this class when:
PluginConfiguration.configure()
Job.configure(GuiContext)
getRequestInformation() method
to find out which parameters the plugin or job wants.
setParameterValue(String, Object)
or 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 done() method in this class.
| Method Summary | |
|---|---|
void |
done()
Aborts the execution of the plugin. |
String |
getCommand()
Get the command this request will issue to the plugin when invoke() is called. |
List<?> |
getCurrentConfigurationParameterValues(String name)
|
List<?> |
getCurrentJobParameterValues(String name)
|
List<?> |
getCurrentParameterValues(String name)
|
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. |
void |
setParameterValue(String name,
Object value)
Set the value of a request parameter to a single value. |
void |
setParameterValues(String name,
List<?> values)
Set the value of a request parameter to a list of values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public PluginResponse invoke()
Response.Status.ERROR and
the error messages will be available in the
PluginResponse.getMessage() and
PluginResponse.getErrorList() methods.
PluginResponse objectpublic RequestInformation getRequestInformation() throws BaseException
RequestInformation object
BaseException - If there is an errorpublic GuiContext getGuiContext()
public String getCommand()
invoke() is called.
public void setParameterValue(String name, Object value)
RequestInformation object.
name - The name of the parametervalue - The value of the parametergetRequestInformation()public void setParameterValues(String name, List<?> values)
RequestInformation object.
name - The name of the parametervalues - The values of the parametergetRequestInformation()public List<?> getCurrentParameterValues(String name)
public List<?> getCurrentConfigurationParameterValues(String name)
public List<?> getCurrentJobParameterValues(String name)
public void done()
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||