Source Code Cross Referenced for Participant.java in  » Workflow-Engines » wfmopen-2.1.1 » de » danet » an » workflow » api » 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 » wfmopen 2.1.1 » de.danet.an.workflow.api 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file is part of the WfMOpen project.
003:         * Copyright (C) 2001-2003 Danet GmbH (www.danet.de), GS-AN.
004:         * All rights reserved.
005:         *
006:         * This program is free software; you can redistribute it and/or modify
007:         * it under the terms of the GNU General Public License as published by
008:         * the Free Software Foundation; either version 2 of the License, or
009:         * (at your option) any later version.
010:         *
011:         * This program is distributed in the hope that it will be useful,
012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014:         * GNU General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU General Public License
017:         * along with this program; if not, write to the Free Software
018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
019:         *
020:         * $Id: Participant.java,v 1.4 2007/03/27 21:59:44 mlipp Exp $
021:         *
022:         * $Log: Participant.java,v $
023:         * Revision 1.4  2007/03/27 21:59:44  mlipp
024:         * Fixed lots of checkstyle warnings.
025:         *
026:         * Revision 1.3  2007/02/27 14:34:21  drmlipp
027:         * Some refactoring to reduce cyclic dependencies.
028:         *
029:         * Revision 1.2  2006/09/29 12:32:07  drmlipp
030:         * Consistently using WfMOpen as projct name now.
031:         *
032:         * Revision 1.1.1.1  2003/08/26 13:20:50  drmlipp
033:         * Update to 1.0rc2
034:         *
035:         * Revision 1.1  2003/07/04 08:08:45  lipp
036:         * Started variable performer.
037:         *
038:         */
039:        package de.danet.an.workflow.api;
040:
041:        import java.io.Serializable;
042:        import java.util.HashMap;
043:        import java.util.Map;
044:
045:        /**
046:         * This interface identifies the data type "workflow participant" in a
047:         * {@link de.danet.an.workflow.omgcore.ProcessDataInfo
048:         * <code>ProcessDataInfo</code>} object.
049:         *
050:         * @author <a href="mailto:lipp@danet.de">Michael Lipp</a>
051:         * @version $Revision: 1.4 $
052:         */
053:        public interface Participant {
054:
055:            /**
056:             * This class defines the participant type for a participant.
057:             */
058:            public static final class ParticipantType implements  Serializable {
059:                private String type = null;
060:                /**
061:                 * RESOURCE_SET ParticipantType.
062:                 */
063:                public static final ParticipantType RESOURCE_SET = new ParticipantType(
064:                        "RESOURCE_SET");
065:                /**
066:                 * RESOURCE ParticipantType.
067:                 */
068:                public static final ParticipantType RESOURCE = new ParticipantType(
069:                        "RESOURCE");
070:                /**
071:                 * ROLE ParticipantType.
072:                 */
073:                public static final ParticipantType ROLE = new ParticipantType(
074:                        "ROLE");
075:
076:                /**
077:                 * ORGANIZATIONAL_UNIT ParticipantType.
078:                 */
079:                public static final ParticipantType ORGANIZATIONAL_UNIT = new ParticipantType(
080:                        "ORGANIZATIONAL_UNIT");
081:                /**
082:                 * HUMAN ParticipantType.
083:                 */
084:                public static final ParticipantType HUMAN = new ParticipantType(
085:                        "HUMAN");
086:                /**
087:                 * SYSTEM ParticipantType.
088:                 */
089:                public static final ParticipantType SYSTEM = new ParticipantType(
090:                        "SYSTEM");
091:
092:                private static Map participantTypeMap = new HashMap();
093:
094:                static {
095:                    participantTypeMap.put(RESOURCE_SET.toString(),
096:                            RESOURCE_SET);
097:                    participantTypeMap.put(RESOURCE.toString(), RESOURCE);
098:                    participantTypeMap.put(ROLE.toString(), ROLE);
099:                    participantTypeMap.put(ORGANIZATIONAL_UNIT.toString(),
100:                            ORGANIZATIONAL_UNIT);
101:                    participantTypeMap.put(HUMAN.toString(), HUMAN);
102:                    participantTypeMap.put(SYSTEM.toString(), SYSTEM);
103:                }
104:
105:                /**
106:                 * Default constructor.
107:                 * @param text textual representation of the type.
108:                 */
109:                private ParticipantType(String text) {
110:                    type = text;
111:                }
112:
113:                /**
114:                 * Get a participant type by name.
115:                 * @param text participant type name to search
116:                 * @return participant type object
117:                 * @throws IllegalArgumentException if <code>text</code> is not a valid
118:                 * participant type name.
119:                 */
120:                public static ParticipantType fromString(String text)
121:                        throws IllegalArgumentException {
122:                    if (text == null) {
123:                        throw new IllegalArgumentException(text);
124:                    }
125:                    ParticipantType participant = (ParticipantType) participantTypeMap
126:                            .get(text);
127:                    if (participant == null) {
128:                        throw new IllegalArgumentException(text);
129:                    }
130:                    return participant;
131:                }
132:
133:                /**
134:                 * Returns the type as text.
135:                 * @return type as text
136:                 */
137:                public final String toString() {
138:                    return type;
139:                }
140:
141:                /**
142:                 * Checks if the type is "RESOURCE_SET".
143:                 * @return <code>true</code> if the type is "RESOURCE_SET".
144:                 */
145:                public final boolean isResourceSet() {
146:                    return type.equals("RESOURCE_SET");
147:                }
148:
149:                /**
150:                 * Checks if the type is "RESOURCE".
151:                 * @return <code>true</code> if the type is "RESOURCE".
152:                 */
153:                public final boolean isResource() {
154:                    return type.equals("RESOURCE");
155:                }
156:
157:                /**
158:                 * Checks if the type is "ROLE".
159:                 * @return <code>true</code> if the type is "ROLE".
160:                 */
161:                public final boolean isRole() {
162:                    return type.equals("ROLE");
163:                }
164:
165:                /**
166:                 * Checks if the type is "ORGANIZATIONAL_UNIT".
167:                 * @return <code>true</code> if the type is "ORGANIZATIONAL_UNIT".
168:                 */
169:                public final boolean isOrganizationUnit() {
170:                    return type.equals("ORGANIZATIONAL_UNIT");
171:                }
172:
173:                /**
174:                 * Checks if the type is "HUMAN".
175:                 * @return <code>true</code> if the type is "HUMAN".
176:                 */
177:                public final boolean isHuman() {
178:                    return type.equals("HUMAN");
179:                }
180:
181:                /**
182:                 * Checks if the type is "SYSTEM".
183:                 * @return <code>true</code> if the type is "SYSTEM".
184:                 */
185:                public final boolean isSystem() {
186:                    return type.equals("SYSTEM");
187:                }
188:
189:                /**
190:                 * Perform instance substitution during serialization.
191:                 */
192:                private Object readResolve() {
193:                    try {
194:                        return fromString(type);
195:                    } catch (IllegalArgumentException iae) {
196:                        throw new IllegalArgumentException(
197:                                "Unexpected error in serialization");
198:                    }
199:                }
200:            }
201:
202:            /**
203:             * Get the id of the participant.
204:             * @return a String representing the id value
205:             */
206:            public String getId();
207:
208:            /**
209:             * Get the name of the participant.
210:             * @return a String representing the name value
211:             */
212:            public String getName();
213:
214:            /**
215:             * Get the type of the participant.
216:             * @return a ParticipantType object representing the participant type value
217:             */
218:            public ParticipantType getParticipantType();
219:
220:            /**
221:             * Get the additional resource selection information passed to the
222:             * constructor.
223:             * @return an Object representing the resource selection value
224:             */
225:            public Object getResourceSelection();
226:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.