001: /*
002: * Copyright (c) 2002-2003 by OpenSymphony
003: * All rights reserved.
004: */
005: package com.opensymphony.workflow.spi;
006:
007: import java.io.Serializable;
008:
009: import java.util.Date;
010:
011: /**
012: * Simple implementation
013: *
014: * @author <a href="mailto:plightbo@hotmail.com">Pat Lightbody</a>
015: */
016: public class SimpleStep implements Step, Serializable {
017: //~ Static fields/initializers /////////////////////////////////////////////
018:
019: private static final long serialVersionUID = 1093783480189853982L;
020:
021: //~ Instance fields ////////////////////////////////////////////////////////
022:
023: private Date dueDate;
024: private Date finishDate;
025: private Date startDate;
026: private String caller;
027: private String owner;
028: private String status;
029: private long[] previousStepIds;
030: private int actionId;
031: private int stepId;
032: private long entryId;
033: private long id;
034:
035: //~ Constructors ///////////////////////////////////////////////////////////
036:
037: public SimpleStep() {
038: }
039:
040: public SimpleStep(long id, long entryId, int stepId, int actionId,
041: String owner, Date startDate, Date dueDate,
042: Date finishDate, String status, long[] previousStepIds,
043: String caller) {
044: this .id = id;
045: this .entryId = entryId;
046: this .stepId = stepId;
047: this .actionId = actionId;
048: this .owner = owner;
049: this .startDate = startDate;
050: this .finishDate = finishDate;
051: this .dueDate = dueDate;
052: this .status = status;
053: this .previousStepIds = previousStepIds;
054: this .caller = caller;
055: }
056:
057: //~ Methods ////////////////////////////////////////////////////////////////
058:
059: public void setActionId(int actionId) {
060: this .actionId = actionId;
061: }
062:
063: public int getActionId() {
064: return actionId;
065: }
066:
067: public void setCaller(String caller) {
068: this .caller = caller;
069: }
070:
071: public String getCaller() {
072: return caller;
073: }
074:
075: public Date getDueDate() {
076: return dueDate;
077: }
078:
079: public void setEntryId(long entryId) {
080: this .entryId = entryId;
081: }
082:
083: public long getEntryId() {
084: return entryId;
085: }
086:
087: public void setFinishDate(Date finishDate) {
088: this .finishDate = finishDate;
089: }
090:
091: public Date getFinishDate() {
092: return finishDate;
093: }
094:
095: public void setId(long id) {
096: this .id = id;
097: }
098:
099: public long getId() {
100: return id;
101: }
102:
103: public void setOwner(String owner) {
104: this .owner = owner;
105: }
106:
107: public String getOwner() {
108: return owner;
109: }
110:
111: public void setPreviousStepIds(long[] previousStepIds) {
112: this .previousStepIds = previousStepIds;
113: }
114:
115: public long[] getPreviousStepIds() {
116: return previousStepIds;
117: }
118:
119: public void setStartDate(Date startDate) {
120: this .startDate = startDate;
121: }
122:
123: public Date getStartDate() {
124: return startDate;
125: }
126:
127: public void setStatus(String status) {
128: this .status = status;
129: }
130:
131: public String getStatus() {
132: return status;
133: }
134:
135: public void setStepId(int stepId) {
136: this .stepId = stepId;
137: }
138:
139: public int getStepId() {
140: return stepId;
141: }
142:
143: public String toString() {
144: return "SimpleStep@" + stepId + "[owner=" + owner
145: + ", actionId=" + actionId + ", status=" + status + "]";
146: }
147: }
|