X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.api%2Fsrc%2Forg%2Fargeo%2Fslc%2Fexecution%2FExecutionStep.java;fp=org.argeo.slc.api%2Fsrc%2Forg%2Fargeo%2Fslc%2Fexecution%2FExecutionStep.java;h=0000000000000000000000000000000000000000;hb=09c9e5093fe1353aaac344ac8a8caf2e1dcc0778;hp=47c69180dae3a7181afef49169f4bf6fa953a1c2;hpb=8ff996a3380166be2ae9cf0ef0fa22c58e11746a;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStep.java b/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStep.java deleted file mode 100644 index 47c69180d..000000000 --- a/org.argeo.slc.api/src/org/argeo/slc/execution/ExecutionStep.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.argeo.slc.execution; - -import java.io.Serializable; -import java.util.Date; - -/** - * An atomic step to be notified in during an {@link ExecutionProcess}. Can be a - * log or the start/end of a phase, etc. - */ -public class ExecutionStep implements Serializable { - private static final long serialVersionUID = 798640526532912161L; - - 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"; - - /** @deprecated */ - public final static String START = "START"; - /** @deprecated */ - public final static String END = "END"; - - // TODO make the fields final and private when we don't need POJO support - // anymore (that - // is when SlcExecutionStep is removed) - protected String type; - protected String thread; - protected Date timestamp; - protected String log; - - private String location; - - /** Empty constructor */ - public ExecutionStep() { - Thread currentThread = Thread.currentThread(); - thread = currentThread.getName(); - } - - /** Creates a step at the current date */ - public ExecutionStep(String location, String type, String log) { - this(location, new Date(), type, log); - } - - /** Creates a step of the given type. */ - public ExecutionStep(String location, Date timestamp, String type, - String log) { - this(location, timestamp, type, log, Thread.currentThread().getName()); - } - - public ExecutionStep(String location, Date timestamp, String type, - String log, String thread) { - this.location = location; - this.type = type; - this.timestamp = timestamp; - this.thread = thread; - this.log = addLog(log); - } - - public String getType() { - return type; - } - - public Date getTimestamp() { - return timestamp; - } - - public String getThread() { - return thread; - } - - /** - * Return the string that should be stored in the log field. Can be null if - * another mechanism is used to store log lines. - */ - protected String addLog(String log) { - return log; - } - - public String getLog() { - return log; - } - - @Override - public String toString() { - return "Execution step, thread=" + thread + ", type=" + type; - } - - /** Typically the logging category */ - public String getLocation() { - return location; - } - -}