1 5 package com.opensymphony.workflow.spi.ojb; 6 7 import com.opensymphony.workflow.spi.Step; 8 9 import java.util.Date ; 10 import java.util.Iterator ; 11 import java.util.List ; 12 13 14 18 public abstract class OJBStep implements Step { 19 21 Date dueDate; 22 Date finishDate; 23 Date startDate; 24 List previousSteps; 25 OJBWorkflowEntry entry; 26 String caller; 27 String owner; 28 String status; 29 int actionId; 30 int stepId; 31 long entryId; 32 long id; 33 34 36 public OJBStep() { 37 super(); 38 } 39 40 public OJBStep(OJBStep step) { 41 this.actionId = step.getActionId(); 42 this.caller = step.getCaller(); 43 this.finishDate = step.getFinishDate(); 44 this.dueDate = step.getDueDate(); 45 this.startDate = step.getStartDate(); 46 this.id = step.getId(); 47 this.owner = step.getOwner(); 48 this.status = step.getStatus(); 49 this.stepId = step.getStepId(); 50 this.previousSteps = step.getPreviousSteps(); 51 } 52 53 55 public void setActionId(int i) { 56 actionId = i; 57 } 58 59 public int getActionId() { 60 return actionId; 61 } 62 63 public void setCaller(String string) { 64 caller = string; 65 } 66 67 public String getCaller() { 68 return caller; 69 } 70 71 public void setDueDate(Date date) { 72 dueDate = date; 73 } 74 75 public Date getDueDate() { 76 return dueDate; 77 } 78 79 public void setEntry(OJBWorkflowEntry entry) { 80 this.entry = entry; 81 } 82 83 public OJBWorkflowEntry getEntry() { 84 return entry; 85 } 86 87 public void setEntryId(long l) { 88 entryId = l; 89 } 90 91 public long getEntryId() { 92 return entryId; 93 } 94 95 public void setFinishDate(Date date) { 96 finishDate = date; 97 } 98 99 public Date getFinishDate() { 100 return finishDate; 101 } 102 103 public void setId(long l) { 104 id = l; 105 } 106 107 public long getId() { 108 return id; 109 } 110 111 public void setOwner(String string) { 112 owner = string; 113 } 114 115 public String getOwner() { 116 return owner; 117 } 118 119 public long[] getPreviousStepIds() { 120 if (previousSteps == null) { 121 return new long[0]; 122 } 123 124 long[] previousStepIds = new long[previousSteps.size()]; 125 int i = 0; 126 127 for (Iterator iterator = previousSteps.iterator(); iterator.hasNext();) { 128 OJBStep ojbStep = (OJBStep) iterator.next(); 129 previousStepIds[i] = ojbStep.getId(); 130 i++; 131 } 132 133 return previousStepIds; 134 } 135 136 public void setPreviousSteps(List list) { 137 previousSteps = list; 138 } 139 140 public List getPreviousSteps() { 141 return previousSteps; 142 } 143 144 public void setStartDate(Date date) { 145 startDate = date; 146 } 147 148 public Date getStartDate() { 149 return startDate; 150 } 151 152 public void setStatus(String string) { 153 status = string; 154 } 155 156 public String getStatus() { 157 return status; 158 } 159 160 public void setStepId(int i) { 161 stepId = i; 162 } 163 164 public int getStepId() { 165 return stepId; 166 } 167 } 168 | Popular Tags |