|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.basedb.plugins.executor.ExternalProgramExecutor.ResponseWrapper
static class ExternalProgramExecutor.ResponseWrapper
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.sf.basedb.core.plugin.Response |
|---|
Response.Status |
| Field Summary | |
|---|---|
private List<Throwable> |
errors
|
private boolean |
hasError
|
private String |
message
|
| Constructor Summary | |
|---|---|
ExternalProgramExecutor.ResponseWrapper()
|
|
| Method Summary | |
|---|---|
(package private) List<Throwable> |
getErrors()
|
(package private) String |
getMessage()
|
(package private) String |
getMessage(String defaultMessage)
|
(package private) boolean |
hasError()
|
void |
setContinue(String nextCommand)
This method will continue the configuration or execution of the job with a new command to the plugin. |
void |
setDone(String message)
This will end the job execution and report it as a success. |
void |
setDone(String message,
Job.ExecutionTime estimatedExecutionTime)
This will end the configuration of a job and set the estimated execution time for it. |
void |
setDownloadImmediately(String message,
Job.ExecutionTime estimatedExecutionTime,
boolean failIfDenied)
This will end the configuration of a export job, and start to execute it for immediate download. |
void |
setDryRun(boolean dryRun)
A plug-in may call this method in it's configuration phase or after it has been executed to indicate that the job should be or was executed as a dry-run job. |
void |
setError(String message,
List<? extends Throwable> errorList)
This will end the job execution or configuration and report it as a failure. |
void |
setExecuteImmediately(String message,
Job.ExecutionTime estimatedExecutionTime,
boolean failIfDenied)
This will end the configuration of a job, and start to execute it immediately if the plugin is permitted to do so. |
void |
setSuggestedJobName(String jobName)
A plug-in may call this method on it's job configuration phase to suggest a name for the job. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private String message
private List<Throwable> errors
private boolean hasError
| Constructor Detail |
|---|
ExternalProgramExecutor.ResponseWrapper()
| Method Detail |
|---|
boolean hasError()
List<Throwable> getErrors()
String getMessage()
String getMessage(String defaultMessage)
public void setContinue(String nextCommand)
throws PermissionDeniedException
ResponseSignal.SHUTDOWN signal.
setContinue in interface ResponsenextCommand - The next command to the plugin
PermissionDeniedException - If another command isn't allowed
public void setDone(String message,
Job.ExecutionTime estimatedExecutionTime)
Response
setDone in interface Responsemessage - An optional messageestimatedExecutionTime - An estimated execution time for the job,
null is the same as ExecutionTime.LONGpublic void setDone(String message)
Response
setDone in interface Responsemessage - A message containing any relevant information about
what the plugin did, or null
public void setDownloadImmediately(String message,
Job.ExecutionTime estimatedExecutionTime,
boolean failIfDenied)
throws PermissionDeniedException
ResponseResponse.setExecuteImmediately(String, Job.ExecutionTime, boolean) but:
ImmediateDownloadExporter interface.
ImmediateDownloadExporter.doExport(ExportOutputStream, ProgressReporter)
instead of the Plugin.run(Request, Response, ProgressReporter) method.
setDownloadImmediately in interface Responsemessage - An optional messageestimatedExecutionTime - An estimated execution time for the job,
null is the same as ExecutionTime.LONG. This value is only used
if immediate execution isn't possible and the job has to be added to the
job queue.failIfDenied - TRUE if a PermissionDeniedException should be thrown if
immediate exection isn't possible, FALSE to add the job to the job queue
for later exection
PermissionDeniedException - If the logged in user doesn't have write permission to the job.public void setDryRun(boolean dryRun)
Response
NOTE! Setting this value to true doesn't change the behaviour
of the core. It is the responsibility of the plug-in to check
this value(eg. Job.isDryRun() and take appropriate action.
setDryRun in interface ResponsedryRun - TRUE to indicate that the job should be or was
executed as a dry-runpublic void setSuggestedJobName(String jobName)
Response
setSuggestedJobName in interface Response
public void setError(String message,
List<? extends Throwable> errorList)
Response
setError in interface Responsemessage - Information about the reason for the errorerrorList - Detailed information about the error
public void setExecuteImmediately(String message,
Job.ExecutionTime estimatedExecutionTime,
boolean failIfDenied)
throws PermissionDeniedException
ResponsefailIfDenied flag is set to true,
in which case an exception will be thrown.
If immediate execution is possible the client application must continue to use the same instance of the plugin object. This means that immediate execution always happens in the same virtual machine. Plugins should be aware of this and avoid excessive use of resources such as memory and CPU time.
The client application may execute the job in another thread.
setExecuteImmediately in interface Responsemessage - An optional messageestimatedExecutionTime - An estimated execution time for the job,
null is the same as ExecutionTime.LONG. This value is only used
if immediate execution isn't possible and the job has to be added to the
job queue.failIfDenied - TRUE if a PermissionDeniedException should be thrown if
immediate exection isn't possible, FALSE to add the job to the job queue
for later exection
PermissionDeniedException - If logged in user doesn't have write permission on the job.
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||