X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=runtime%2Forg.argeo.slc.specs%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fprocess%2FSlcExecutionStep.java;h=cc1dc7f2d6bbca134185db92116d5a51019727d9;hb=0e2ff188c2e8ffac85739cccc3925e8bd82d7be9;hp=553845154bf35c5af5848230959b745c2c52347a;hpb=b811ec0603b1e596f26eee8a5378c6294cba495d;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/SlcExecutionStep.java b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/SlcExecutionStep.java index 553845154..cc1dc7f2d 100644 --- a/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/SlcExecutionStep.java +++ b/runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/process/SlcExecutionStep.java @@ -22,26 +22,22 @@ import java.util.List; import java.util.StringTokenizer; import java.util.UUID; -public class SlcExecutionStep { - public final static String START = "START"; - public final static String END = "END"; - public final static String PHASE_START = "PHASE_START"; - public final static String PHASE_END = "PHASE_END"; - public final static String ERROR = "ERROR"; - public final static String WARNING = "WARNING"; - public final static String INFO = "INFO"; - public final static String DEBUG = "DEBUG"; - public final static String TRACE = "TRACE"; +import org.argeo.slc.execution.ExecutionStep; + +/** + * An atomic step to be notified in during an {@link SlcExecution}. Can be a log + * or the start/end of a phase, etc. + * + * @deprecated use {@link ExecutionStep} instead + */ +public class SlcExecutionStep extends ExecutionStep { + private static final long serialVersionUID = -7308643628104726471L; private String uuid = UUID.randomUUID().toString(); - private String type; - private String thread; - private Date timestamp = new Date(); private List logLines = new ArrayList(); /** Empty constructor */ public SlcExecutionStep() { - thread = Thread.currentThread().getName(); } /** Creates a step at the current date of type INFO */ @@ -61,10 +57,7 @@ public class SlcExecutionStep { public SlcExecutionStep(Date timestamp, String type, String log, String thread) { - this.type = type; - this.timestamp = timestamp; - this.thread = thread; - addLog(log); + super(timestamp, type, log, thread); } public String getUuid() { @@ -75,26 +68,14 @@ public class SlcExecutionStep { this.uuid = uuid; } - public String getType() { - return type; - } - public void setType(String type) { this.type = type; } - public Date getTimestamp() { - return timestamp; - } - public void setTimestamp(Date begin) { this.timestamp = begin; } - public String getThread() { - return thread; - } - public void setThread(String thread) { this.thread = thread; } @@ -107,13 +88,17 @@ public class SlcExecutionStep { this.logLines = logLines; } - public void addLog(String log) { + protected String addLog(String log) { + if (logLines == null) + logLines = new ArrayList(); + if (log == null) - return; + return null; StringTokenizer st = new StringTokenizer(log, "\n"); while (st.hasMoreTokens()) logLines.add(removeNonXmlChars(st.nextToken())); + return null; } /**