All Packages Class Hierarchy This Package Previous Next Index
Class com.sgi.sysadm.ui.event.TaskResult
java.lang.Object
|
+----java.util.EventObject
|
+----com.sgi.sysadm.ui.event.TaskResult
- public class TaskResult
- extends EventObject
An event that provides information about whether a task succeeded or
was cancelled by the User. If a task fails, the Task interface
remains displayed so that the User may make changes to the data
entered and try again. Ultimately the User will cancel the task if
it cannot be performed for some reason.
-
CANCELLED
- Results of type TaskResult.CANCELLED are generated when a task
is cancelled by the user.
-
SUCCEEDED
- Results of type TaskResult.SUCCEEDED are generated when the task
privileged command(s) complete(s) successfully.
-
TaskResult(Task, int)
- Constructor.
-
getErrorText()
- Get the error text associated with a SUCCEEDED result.
-
getOutputText()
- Get the output text associated with a SUCCEEDED result.
-
getResultType()
- Get the type of this result.
-
getTask()
- Get the Task that generated this result.
-
setErrorText(String)
- Set the error text associated with a SUCCEEDED result.
-
setOutputText(String)
- Set the output text associated with a SUCCEEDED result.
SUCCEEDED
public static final int SUCCEEDED
- Results of type TaskResult.SUCCEEDED are generated when the task
privileged command(s) complete(s) successfully. Even if the
task is successful, there may
be warnings or other text sent either to stdout or stderr. Use
TaskResult.getOutputText() and TaskResult.getErrorText() to get the
output and error data from the privileged command(s).
CANCELLED
public static final int CANCELLED
- Results of type TaskResult.CANCELLED are generated when a task
is cancelled by the user.
TaskResult
public TaskResult(Task task,
int resultType)
- Constructor.
- Parameters:
- task - The Task that generated this result.
- type - The type of result generated. One of:
TaskResult.SUCCEEDED or TaskResult.CANCELLED.
getTask
public Task getTask()
- Get the Task that generated this result.
- Returns:
- The Task that generated this result.
getResultType
public int getResultType()
- Get the type of this result.
- Returns:
- The type of this result. One of: TaskResult.SUCCEEDED or
TaskResult.CANCELLED.
setOutputText
public void setOutputText(String outputText)
- Set the output text associated with a SUCCEEDED result.
- Parameters:
- outputText - The output data generated by the privileged command(s).
getOutputText
public String getOutputText()
- Get the output text associated with a SUCCEEDED result.
- Returns:
- The output data generated by the privileged command(s).
setErrorText
public void setErrorText(String errorText)
- Set the error text associated with a SUCCEEDED result.
- Parameters:
- errorText - The error data generated by the privileged command(s).
getErrorText
public String getErrorText()
- Get the error text associated with a SUCCEEDED result.
- Returns:
- The error data generated by the privileged command(s).
All Packages Class Hierarchy This Package Previous Next Index