public final class PluginResponse
extends java.lang.Object
getStatus()
to find out the status of the last invokation.
See PluginRequest
for more information.Modifier and Type | Class and Description |
---|---|
private class |
PluginResponse.ResponseImpl
An implementation of the Response interface used by the plugin
to return information to the client.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
allowImmediateDownload |
private boolean |
allowImmediateExecution |
private boolean |
clearState |
private boolean |
dryRun |
private java.util.List<? extends java.lang.Throwable> |
errorList |
private Job.ExecutionTime |
estimatedExecutionTime |
private java.lang.String |
message |
private java.lang.String |
nextCommand |
private PluginConfigurationRequest |
request |
private Response |
response |
private java.io.Serializable |
state |
private Response.Status |
status |
private java.lang.String |
suggestedJobName |
Constructor and Description |
---|
PluginResponse(PluginConfigurationRequest request,
boolean allowImmediateExection,
boolean allowImmediateDownload,
boolean dryRun) |
Modifier and Type | Method and Description |
---|---|
void |
downloadImmediately(ExportOutputStream out,
ProgressReporter progress) |
boolean |
getClearState()
If set after a job configuration sequence, the saved state should
be cleared before starting the job.
|
java.util.List<? extends java.lang.Throwable> |
getErrorList()
Get a list containing detailed error messages if the status is
Response.Status.ERROR . |
Job.ExecutionTime |
getEstimatedExecutionTime()
Get the estimated execution time of the job.
|
PluginExecutionRequest |
getExecutionRequest(ProgressReporter progress) |
java.lang.String |
getMessage()
Get the return message from the plugin.
|
java.lang.String |
getNextCommand()
Get the next command sent via
Response.Status.CONTINUE . |
PluginConfigurationRequest |
getNextRequest()
Get a
PluginRequest object that handles the next request,
if status is Response.Status.CONTINUE . |
(package private) Response |
getResponseImpl()
Get a new reponse object.
|
java.io.Serializable |
getState()
Get the state information that the plug-in wants to save
until it is restarted again.
|
Response.Status |
getStatus()
Get the status of the response.
|
java.lang.String |
getSuggestedJobName()
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 |
saveParameters(DbControl dc)
Save all parameters that has been configured during the configuration sequence to
the database.
|
(package private) void |
setError(java.lang.String message,
java.lang.Throwable t)
Set a singe error message.
|
private final PluginConfigurationRequest request
private final Response response
private final boolean allowImmediateExecution
private final boolean allowImmediateDownload
private Response.Status status
private Job.ExecutionTime estimatedExecutionTime
private java.lang.String message
private boolean dryRun
private java.lang.String suggestedJobName
private java.util.List<? extends java.lang.Throwable> errorList
private boolean clearState
private java.lang.String nextCommand
private java.io.Serializable state
PluginResponse(PluginConfigurationRequest request, boolean allowImmediateExection, boolean allowImmediateDownload, boolean dryRun)
public Response.Status getStatus()
public boolean isDryRun()
public java.lang.String getSuggestedJobName()
public java.lang.String getMessage()
public Job.ExecutionTime getEstimatedExecutionTime()
public java.util.List<? extends java.lang.Throwable> getErrorList()
Response.Status.ERROR
.getMessage()
public java.lang.String getNextCommand()
Response.Status.CONTINUE
.public java.io.Serializable getState()
public boolean getClearState()
public PluginConfigurationRequest getNextRequest()
PluginRequest
object that handles the next request,
if status is Response.Status.CONTINUE
.public PluginExecutionRequest getExecutionRequest(ProgressReporter progress) throws PermissionDeniedException
PermissionDeniedException
public void saveParameters(DbControl dc)
dc
- An open DbControl to use when accessing the database.public void downloadImmediately(ExportOutputStream out, ProgressReporter progress) throws java.io.IOException
java.io.IOException
Response getResponseImpl()
PluginRequest.invoke()
method.void setError(java.lang.String message, java.lang.Throwable t)
private void reset(Response.Status status)