1 19 package org.openharmonise.workfloweditor.model; 20 21 import java.util.ArrayList ; 22 import java.util.List ; 23 24 31 public class WorkflowStage { 32 33 36 private ArrayList m_dependancies = new ArrayList (); 37 38 41 private boolean m_bMandatory = false; 42 43 46 private boolean m_bInheritance = false; 47 48 51 private WorkflowModel m_model = null; 52 53 56 private ArrayList m_roles = new ArrayList (); 57 58 61 private WorkflowStageDefinition m_definition = null; 62 63 protected WorkflowStage() { 64 super(); 65 } 66 67 73 public WorkflowStage(WorkflowStageDefinition definition, WorkflowModel model) { 74 super(); 75 this.m_model = model; 76 this.m_definition = definition; 77 } 78 79 86 public WorkflowStage(WorkflowStageDefinition definition, List dependancies, WorkflowModel model) { 87 this(definition, model); 88 this.m_dependancies.addAll(dependancies); 89 } 90 91 96 public WorkflowStageDefinition getDefinition() { 97 return this.m_definition; 98 } 99 100 105 public void setDefinition(WorkflowStageDefinition definition) { 106 this.m_definition = definition; 107 } 108 109 114 public void addRole(Role role) { 115 this.m_roles.add(role); 116 } 117 118 123 public void removeRole(Role role) { 124 this.m_roles.remove(role); 125 } 126 127 132 public List getRoles() { 133 return (List ) this.m_roles.clone(); 134 } 135 136 141 public boolean isInheritable() { 142 return this.m_bInheritance; 143 } 144 145 150 public void setInheritable(boolean bInheritable) { 151 this.m_bInheritance = bInheritable; 152 } 153 154 159 public boolean isMandatory() { 160 return this.m_bMandatory; 161 } 162 163 168 public void setMandatory(boolean bMandatory) { 169 this.m_bMandatory = bMandatory; 170 } 171 172 177 public void addDependancy(WorkflowStage stage) { 178 this.m_dependancies.add(stage); 179 } 180 181 186 public void removeDependancy(WorkflowStage stage) { 187 this.m_dependancies.remove(stage); 188 } 189 190 195 public List getDependancies() { 196 return (List ) this.m_dependancies.clone(); 197 } 198 199 204 public String getTitle() { 205 return this.m_definition.getTitle(); 206 } 207 208 213 public WorkflowModel getModel() { 214 return this.m_model; 215 } 216 217 222 public void setModel(WorkflowModel model) { 223 this.m_model = model; 224 } 225 226 } 227 | Popular Tags |