Package net.sf.basedb.core
Class PluginResponse
java.lang.Object
net.sf.basedb.core.PluginResponse
Get the response from a configuration step or execution of a plugin.
Use
getStatus()
to find out the status of the last invokation.
See PluginRequest
for more information.- Version:
- 2.0
- Author:
- Nicklas
- Last modified
- $Date$
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate class
An implementation of the Response interface used by the plugin to return information to the client. -
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private final boolean
private boolean
private boolean
private Job.ExecutionTime
private String
private String
private final PluginConfigurationRequest
private final Response
private Serializable
private Response.Status
private String
-
Constructor Summary
ConstructorDescriptionPluginResponse
(PluginConfigurationRequest request, boolean allowImmediateExection, boolean allowImmediateDownload, boolean dryRun) -
Method Summary
Modifier and TypeMethodDescriptionvoid
downloadImmediately
(ExportOutputStream out, ProgressReporter progress) boolean
If set after a job configuration sequence, the saved state should be cleared before starting the job.Get a list containing detailed error messages if the status isResponse.Status.ERROR
.Get the estimated execution time of the job.getExecutionRequest
(ProgressReporter progress) Get the return message from the plugin.Get the next command sent viaResponse.Status.CONTINUE
.Get aPluginRequest
object that handles the next request, if status isResponse.Status.CONTINUE
.(package private) Response
Get a new reponse object.getState()
Get the state information that the plug-in wants to save until it is restarted again.Get the status of the response.Get the job name that was suggested by the job.boolean
isDryRun()
Check if the job should be executed or was executed in dry-run mode.private void
reset
(Response.Status status) void
Save all parameters that has been configured during the configuration sequence to the database.(package private) void
Set a singe error message.
-
Field Details
-
request
-
response
-
allowImmediateExecution
private final boolean allowImmediateExecution -
allowImmediateDownload
private final boolean allowImmediateDownload -
status
-
estimatedExecutionTime
-
message
-
dryRun
private boolean dryRun -
suggestedJobName
-
errorList
-
clearState
private boolean clearState -
nextCommand
-
state
-
-
Constructor Details
-
PluginResponse
PluginResponse(PluginConfigurationRequest request, boolean allowImmediateExection, boolean allowImmediateDownload, boolean dryRun)
-
-
Method Details
-
getStatus
Get the status of the response. -
isDryRun
public boolean isDryRun()Check if the job should be executed or was executed in dry-run mode.- Since:
- 2.8
-
getSuggestedJobName
Get the job name that was suggested by the job.- Returns:
- A job name or null if no name has been suggested
- Since:
- 2.17
-
getMessage
Get the return message from the plugin. -
getEstimatedExecutionTime
Get the estimated execution time of the job. This value is only meaningful after a successful configuration sequence for a job. -
getErrorList
Get a list containing detailed error messages if the status isResponse.Status.ERROR
.- See Also:
-
getNextCommand
Get the next command sent viaResponse.Status.CONTINUE
.- Returns:
- The next command or null
- Since:
- 2.16
-
getState
Get the state information that the plug-in wants to save until it is restarted again.- Since:
- 3.11
-
getClearState
public boolean getClearState()If set after a job configuration sequence, the saved state should be cleared before starting the job.- Since:
- 3.11
-
getNextRequest
Get aPluginRequest
object that handles the next request, if status isResponse.Status.CONTINUE
. -
getExecutionRequest
public PluginExecutionRequest getExecutionRequest(ProgressReporter progress) throws PermissionDeniedException - Throws:
PermissionDeniedException
-
saveParameters
Save all parameters that has been configured during the configuration sequence to the database.- Parameters:
dc
- An open DbControl to use when accessing the database.
-
downloadImmediately
public void downloadImmediately(ExportOutputStream out, ProgressReporter progress) throws IOException - Throws:
IOException
-
getResponseImpl
Response getResponseImpl()Get a new reponse object. Used by thePluginRequest.invoke()
method. -
setError
Set a singe error message. -
reset
-