01: /*
02: * Created on Sep 19, 2004
03: * Author: Chris Taylor
04: */
05: package com.pk.script;
06:
07: /**
08: * @author Chris Taylor
09: *
10: */
11: public class ScriptCommand {
12: public static String STATUS_NOT_RUN = "NOTRUN";
13: public static String STATUS_SUCCESS = "SUCCESS";
14: public static String STATUS_FAILED = "FAILED";
15: private String command;
16: private String displayCommand;
17: private String status;
18: private String errorMessage;
19: private boolean run;
20:
21: /**
22: *
23: */
24: public ScriptCommand() {
25: super ();
26: status = STATUS_NOT_RUN;
27: run = true;
28: }
29:
30: /**
31: * @return Returns the command.
32: */
33: public String getCommand() {
34: return command;
35: }
36:
37: /**
38: * @param command The command to set.
39: */
40: public void setCommand(String command) {
41: this .command = command;
42: if (command != null) {
43: displayCommand = command.replaceAll("\n", " ");
44: }
45: }
46:
47: /**
48: * @return Returns the errorMessage.
49: */
50: public String getErrorMessage() {
51: return errorMessage;
52: }
53:
54: /**
55: * @param errorMessage The errorMessage to set.
56: */
57: public void setErrorMessage(String errorMessage) {
58: this .errorMessage = errorMessage;
59: }
60:
61: /**
62: * @return Returns the status.
63: */
64: public String getStatus() {
65: return status;
66: }
67:
68: /**
69: * @param status The status to set.
70: */
71: public void setStatus(String status) {
72: this .status = status;
73: }
74:
75: /**
76: * @return Returns the run.
77: */
78: public boolean isRun() {
79: return run;
80: }
81:
82: /**
83: * @param run The run to set.
84: */
85: public void setRun(boolean run) {
86: this .run = run;
87: }
88:
89: public String getDisplayCommand() {
90: return displayCommand;
91: }
92: }
|