KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openharmonise > workfloweditor > model > WorkflowStageDefinition


1 /*
2  * The contents of this file are subject to the
3  * Mozilla Public License Version 1.1 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS"
8  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
9  * See the License for the specific language governing rights and
10  * limitations under the License.
11  *
12  * The Initial Developer of the Original Code is Simulacra Media Ltd.
13  * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14  *
15  * All Rights Reserved.
16  *
17  * Contributor(s):
18  */

19 package org.openharmonise.workfloweditor.model;
20
21 import java.util.ArrayList JavaDoc;
22 import java.util.List JavaDoc;
23
24 /**
25  * Definition for a workflow stage.
26  *
27  * @author Matthew Large
28  * @version $Revision: 1.1 $
29  *
30  */

31 public class WorkflowStageDefinition {
32
33     /**
34      * Title.
35      */

36     private String JavaDoc m_sTitle = null;
37     
38     /**
39      * List of {@link Role} objects.
40      */

41     private ArrayList JavaDoc m_roles = new ArrayList JavaDoc();
42     
43     /**
44      * Workflow model.
45      */

46     private WorkflowModel m_model = null;
47
48     /**
49      * Constructs a new workflow stage definition.
50      *
51      * @param model Model
52      */

53     protected WorkflowStageDefinition(WorkflowModel model) {
54         super();
55         this.m_model = model;
56     }
57
58     /**
59      * Constructs a new workflow stage definition.
60      *
61      * @param sTitle Title
62      */

63     public WorkflowStageDefinition(String JavaDoc sTitle) {
64         super();
65         this.m_sTitle = sTitle;
66     }
67     
68     /**
69      * Returns the title.
70      *
71      * @return Title
72      */

73     public String JavaDoc getTitle() {
74         return this.m_sTitle;
75     }
76     
77     /**
78      * Sets the title.
79      *
80      * @param sTitle Title
81      */

82     public void setTitle(String JavaDoc sTitle) {
83         this.m_sTitle = sTitle;
84     }
85     
86     /**
87      * Adds a role.
88      *
89      * @param role Role to add
90      */

91     public void addRole(Role role) {
92         this.m_roles.add(role);
93     }
94     
95     /**
96      * Removes a role.
97      *
98      * @param role Role to remove
99      */

100     public void removeRole(Role role) {
101         this.m_roles.remove(role);
102     }
103     
104     /**
105      * Returns a list of all the roles.
106      *
107      * @return List of {@link Role} objects
108      */

109     public List JavaDoc getRoles() {
110         return (List JavaDoc) this.m_roles.clone();
111     }
112     
113     /**
114      * Returns the model.
115      *
116      * @return Model
117      */

118     public WorkflowModel getModel() {
119         return this.m_model;
120     }
121
122 }
123
Popular Tags