]>
git.argeo.org Git - gpl/argeo-slc.git/blob - SlcExecutionStep.java
115ccf871693dd73a288f2dcc9a5ae05db395897
1 package org
.argeo
.slc
.process
;
3 import java
.util
.ArrayList
;
6 import java
.util
.StringTokenizer
;
9 public class SlcExecutionStep
{
10 public final static String TYPE_START
= "START";
11 public final static String TYPE_END
= "END";
12 public final static String TYPE_PHASE_START
= "PHASE_START";
13 public final static String TYPE_PHASE_END
= "PHASE_END";
14 public final static String TYPE_LOG
= "LOG";
16 private String uuid
= UUID
.randomUUID().toString();
18 private Date begin
= new Date();
19 private List
<String
> logLines
= new ArrayList
<String
>();
21 /** Empty constructor */
22 public SlcExecutionStep() {
25 /** Creates a step of type LOG. */
26 public SlcExecutionStep(String log
) {
30 /** Creates a step of the given type. */
31 public SlcExecutionStep(String type
, String log
) {
36 public String
getUuid() {
40 public void setUuid(String uuid
) {
44 public String
getType() {
48 public void setType(String type
) {
52 public Date
getBegin() {
56 public void setBegin(Date begin
) {
60 public List
<String
> getLogLines() {
64 public void setLogLines(List
<String
> logLines
) {
65 this.logLines
= logLines
;
68 public void addLog(String log
) {
72 StringTokenizer st
= new StringTokenizer(log
, "\n");
73 while (st
.hasMoreTokens())
74 logLines
.add(st
.nextToken());
78 public String
toString() {
79 return getClass().getSimpleName() + "#" + uuid
;