Source Code Cross Referenced for Process.java in  » Workflow-Engines » wilos » wilos » model » spem2 » process » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » wilos » wilos.model.spem2.process 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Wilos Is a cLever process Orchestration Software - http://www.wilos-project.org
003:         * Copyright (C) 2006-2007 Paul Sabatier University, IUP ISI (Toulouse, France) <massie@irit.fr>
004:         * Copyright (C) 2007 Mathieu BENOIT <mathieu-benoit@hotmail.fr>
005:         *
006:         * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
007:         * General Public License as published by the Free Software Foundation; either version 2 of the License,
008:         * or (at your option) any later version.
009:         *
010:         * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
011:         * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012:         * GNU General Public License for more details.
013:         *
014:         * You should have received a copy of the GNU General Public License along with this program; if not,
015:         * write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
016:         */
017:
018:        package wilos.model.spem2.process;
019:
020:        import java.util.HashSet;
021:        import java.util.Set;
022:
023:        import org.apache.commons.lang.builder.EqualsBuilder;
024:        import org.apache.commons.lang.builder.HashCodeBuilder;
025:
026:        import wilos.model.misc.project.Project;
027:        import wilos.model.misc.wilosuser.ProcessManager;
028:        import wilos.model.spem2.activity.Activity;
029:
030:        /**
031:         * 
032:         * A Process is a special {@link Activity} that describes a structure for
033:         * particular types of development projects. To perform such a development
034:         * project a Processes would be 'instantiated' and adapted for the specific
035:         * situation. Process is an abstract class and this meta-model defines different
036:         * special types of Processes for different process management applications and
037:         * different situations of process reuse.
038:         * <p />
039:         * It's an element of the SPEM2 specification of the OMG organization
040:         * (http://www.omg.org/).
041:         * 
042:         */
043:        public class Process extends Activity implements  Cloneable {
044:
045:            // The Project of Process
046:            private Set<Project> projects;
047:
048:            private ProcessManager processManager;
049:
050:            private String folderPath;
051:
052:            /**
053:             * Default constructor
054:             * 
055:             */
056:            public Process() {
057:                super ();
058:                this .projects = new HashSet<Project>();
059:            }
060:
061:            /**
062:             * Returns a copy of the current instance of Process
063:             * 
064:             * @return a copy of the Process
065:             * @throws CloneNotSupportedException
066:             */
067:            @Override
068:            public Process clone() throws CloneNotSupportedException {
069:                Process process = new Process();
070:                process.copy(this );
071:                return process;
072:            }
073:
074:            /**
075:             * Copy the values of the specified Process into the current instance of the
076:             * class.
077:             * 
078:             * @param _process
079:             *            The Process to copy.
080:             */
081:            protected void copy(final Process _process) {
082:                super .copy(_process);
083:                this .processManager = _process.getProcessManager();
084:                this .projects.addAll(_process.getProjects());
085:            }
086:
087:            /**
088:             * Defines if the specified Object is the same or has the same values as the
089:             * current instance of the Process.
090:             * 
091:             * @param obj
092:             *            the Object to be compare to the Process
093:             * @return true if the specified Object is the same, false otherwise
094:             */
095:            public boolean equals(Object obj) {
096:                if (obj instanceof  Process == false) {
097:                    return false;
098:                }
099:                if (this  == obj) {
100:                    return true;
101:                }
102:                Process process = (Process) obj;
103:                return new EqualsBuilder().appendSuper(super .equals(process))
104:                        .append(this .projects, process.projects).append(
105:                                this .processManager, process.processManager)
106:                        .isEquals();
107:            }
108:
109:            /**
110:             * Returns a hash code value for the object. This method is supported for
111:             * the benefit of hash tables.
112:             * 
113:             * @return the hash code of the current instance of Process
114:             */
115:            public int hashCode() {
116:                return new HashCodeBuilder(17, 37)
117:                        .appendSuper(super .hashCode()).append(
118:                                this .processManager).toHashCode();
119:            }
120:
121:            /**
122:             * Removes a Project from the Process
123:             * 
124:             * @param _project
125:             */
126:            public void removeProject(Project _project) {
127:                _project.setProcess(null);
128:                this .projects.remove(_project);
129:            }
130:
131:            /**
132:             * Adds a Project to the Process
133:             * 
134:             * @param _project
135:             */
136:            public void addProject(Project _project) {
137:                this .projects.add(_project);
138:                _project.setProcess(this );
139:            }
140:
141:            /**
142:             * Removes all the Project related to the Process
143:             */
144:            public void removeAllProjects() {
145:                for (Project project : this .projects) {
146:                    project.setProcess(null);
147:                }
148:                this .projects.clear();
149:            }
150:
151:            /**
152:             * Add a Project Set to the Project Collection of a Process
153:             * 
154:             * @param _project
155:             *            the Set of Project to add to the Process
156:             */
157:            public void addAllProjects(Set<Project> _project) {
158:                for (Project _proj1 : _project) {
159:                    _proj1.addProcess(this );
160:                }
161:            }
162:
163:            /**
164:             * Returns the Collection of Project related to the Process
165:             * 
166:             * @return a Set of Project
167:             */
168:            public Set<Project> getProjects() {
169:                return projects;
170:            }
171:
172:            /**
173:             * Sets the Collection of Project related to the Process
174:             * 
175:             * @param project
176:             *            the Set of Project to be set
177:             */
178:            public void setProjects(Set<Project> project) {
179:                this .projects = project;
180:            }
181:
182:            /*
183:             * relation between Process et Project Manager
184:             */
185:
186:            /**
187:             * Adds a relation between the specified ProcessManager and the Process
188:             * 
189:             * @param _processManager
190:             *            the ProcessManager to be linked to
191:             */
192:            public void addProcessManager(ProcessManager _processManager) {
193:                this .processManager = _processManager;
194:                _processManager.getProcessesManaged().add(this );
195:            }
196:
197:            /**
198:             * Removes the relation between the specified ProcessManager and the Process
199:             * 
200:             * @param _processManager
201:             *            the ProcessManager to be unlinked to
202:             */
203:            public void removeProcessManager(ProcessManager _processManager) {
204:                _processManager.getProcessesManaged().remove(this );
205:                this .processManager = null;
206:
207:            }
208:
209:            /**
210:             * Returns the ProcessManager assigned to the Process
211:             * 
212:             * @return the Process ProcessManager
213:             */
214:            public ProcessManager getProcessManager() {
215:                return processManager;
216:            }
217:
218:            /**
219:             * Sets the ProcessManager assigned to the Process
220:             * 
221:             * @param processManager
222:             *            the ProcessManager to set to the Process
223:             */
224:            public void setProcessManager(ProcessManager processManager) {
225:                this .processManager = processManager;
226:            }
227:
228:            /**
229:             * Returns the folder path to the Process
230:             * 
231:             * @return the String of the folder path
232:             */
233:            public String getFolderPath() {
234:                return folderPath;
235:            }
236:
237:            /**
238:             * Sets the folder path of the Process
239:             * 
240:             * @param folderPath
241:             *            the folder path
242:             */
243:            public void setFolderPath(String folderPath) {
244:                this.folderPath = folderPath;
245:            }
246:
247:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.