KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > taskmgmt > def > Swimlane


1 package org.jbpm.taskmgmt.def;
2
3 import java.io.*;
4 import java.util.*;
5
6 import org.jbpm.instantiation.*;
7
8 /**
9  * is a process role (aka participant).
10  */

11 public class Swimlane implements Serializable {
12   
13   private static final long serialVersionUID = 1L;
14
15   long id = 0;
16   private String JavaDoc name = null;
17   private Delegation assignmentDelegation = null;
18   private TaskMgmtDefinition taskMgmtDefinition = null;
19   private Set tasks = null;
20   
21   public Swimlane() {
22   }
23
24   public Swimlane(String JavaDoc name) {
25     this.name = name;
26   }
27
28   /**
29    * sets the taskMgmtDefinition unidirectionally. use TaskMgmtDefinition.addSwimlane to create
30    * a bidirectional relation.
31    */

32   public void setTaskMgmtDefinition(TaskMgmtDefinition taskMgmtDefinition) {
33     this.taskMgmtDefinition = taskMgmtDefinition;
34   }
35
36   // tasks
37
/////////////////////////////////////////////////////////////////////////////
38

39   public void addTask( Task task ) {
40     if (tasks==null) tasks = new HashSet();
41     tasks.add(task);
42     task.setSwimlane(this);
43   }
44
45   public Set getTasks() {
46     return tasks;
47   }
48
49   // other getters and setters
50
/////////////////////////////////////////////////////////////////////////////
51

52   public TaskMgmtDefinition getTaskMgmtDefinition() {
53     return taskMgmtDefinition;
54   }
55   public Delegation getAssignmentDelegation() {
56     return assignmentDelegation;
57   }
58   public void setAssignmentDelegation(Delegation assignmentDelegation) {
59     this.assignmentDelegation = assignmentDelegation;
60   }
61   public String JavaDoc getName() {
62     return name;
63   }
64   public long getId() {
65     return id;
66   }
67 }
68
Popular Tags