public final class PluginResponse extends 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 |
dryRun |
private List<? extends Throwable> |
errorList |
private Job.ExecutionTime |
estimatedExecutionTime |
private String |
message |
private String |
nextCommand |
private PluginConfigurationRequest |
request |
private Response |
response |
private Response.Status |
status |
private 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) |
List<? extends 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) |
String |
getMessage()
Get the return message from the plugin.
|
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.
|
Response.Status |
getStatus()
Get the status of the response.
|
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(String message,
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 String message
private boolean dryRun
private String suggestedJobName
private String nextCommand
PluginResponse(PluginConfigurationRequest request, boolean allowImmediateExection, boolean allowImmediateDownload, boolean dryRun)
public Response.Status getStatus()
public boolean isDryRun()
public String getSuggestedJobName()
public String getMessage()
public Job.ExecutionTime getEstimatedExecutionTime()
public List<? extends Throwable> getErrorList()
Response.Status.ERROR
.getMessage()
public String getNextCommand()
Response.Status.CONTINUE
.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 IOException
IOException
Response getResponseImpl()
PluginRequest.invoke()
method.private void reset(Response.Status status)