Source Code Cross Referenced for Transition.java in  » Workflow-Engines » obe-1.0 » org » obe » xpdl » model » transition » 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 » obe 1.0 » org.obe.xpdl.model.transition 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*--
002:
003:         Copyright (C) 2002-2005 Adrian Price.
004:         All rights reserved.
005:
006:         Redistribution and use in source and binary forms, with or without
007:         modification, are permitted provided that the following conditions
008:         are met:
009:
010:         1. Redistributions of source code must retain the above copyright
011:            notice, this list of conditions, and the following disclaimer.
012:
013:         2. Redistributions in binary form must reproduce the above copyright
014:            notice, this list of conditions, and the disclaimer that follows
015:            these conditions in the documentation and/or other materials
016:            provided with the distribution.
017:
018:         3. The names "OBE" and "Open Business Engine" must not be used to
019:         	endorse or promote products derived from this software without prior
020:         	written permission.  For written permission, please contact
021:         	adrianprice@sourceforge.net.
022:
023:         4. Products derived from this software may not be called "OBE" or
024:         	"Open Business Engine", nor may "OBE" or "Open Business Engine"
025:         	appear in their name, without prior written permission from
026:         	Adrian Price (adrianprice@users.sourceforge.net).
027:
028:         THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
029:         WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
030:         OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
031:         DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
032:         INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
033:         (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
034:         SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
035:         HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
036:         STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
037:         IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
038:         POSSIBILITY OF SUCH DAMAGE.
039:
040:         For more information on OBE, please see
041:         <http://obe.sourceforge.net/>.
042:
043:         */
044:
045:        package org.obe.xpdl.model.transition;
046:
047:        import org.obe.xpdl.PackageVisitor;
048:        import org.obe.xpdl.model.activity.Activity;
049:        import org.obe.xpdl.model.condition.Condition;
050:        import org.obe.xpdl.model.ext.Event;
051:        import org.obe.xpdl.model.misc.AbstractWFElement;
052:        import org.obe.xpdl.model.misc.ExecutionType;
053:
054:        /**
055:         * Implementation of a transition.
056:         *
057:         * @author Adrian Price
058:         */
059:        public final class Transition extends AbstractWFElement {
060:            private static final long serialVersionUID = -6489182908053659185L;
061:
062:            private Activity _toActivity;
063:            private Activity _fromActivity;
064:            private Event _event;
065:            private ExecutionType _executionType;
066:            private Condition _condition;
067:            private String _from;
068:            private String _to;
069:
070:            public Transition() {
071:            }
072:
073:            /**
074:             * Construct a new Transition.
075:             *
076:             * @param id   The transition ID
077:             * @param name The transition name
078:             * @param from The activity ID where the transition starts
079:             * @param to   The activity ID where the transition ends
080:             */
081:            public Transition(String id, String name, String from, String to) {
082:                super (id, name);
083:
084:                setFrom(from);
085:                setTo(to);
086:            }
087:
088:            public void accept(PackageVisitor visitor) {
089:                visitor.visit(this );
090:                if (_event != null)
091:                    _event.accept(visitor);
092:            }
093:
094:            /**
095:             * Get the condition which is used to determine whether or not the
096:             * transition should be executed.
097:             *
098:             * @return The condition
099:             */
100:            public Condition getCondition() {
101:                return _condition;
102:            }
103:
104:            /**
105:             * Set the condition which is used to determine whether or not the
106:             * transition should be executed.
107:             *
108:             * @param condition The condition
109:             */
110:            public void setCondition(Condition condition) {
111:                _condition = condition;
112:            }
113:
114:            public Event getEvent() {
115:                return _event;
116:            }
117:
118:            public void setEvent(Event event) {
119:                _event = event;
120:            }
121:
122:            /**
123:             * Get the start activity ID
124:             *
125:             * @return The start activity ID
126:             */
127:            public String getFrom() {
128:                return _from;
129:            }
130:
131:            /**
132:             * Set the start activity ID.
133:             *
134:             * @param from The new start activity ID
135:             */
136:            public void setFrom(String from) {
137:                if (from == null)
138:                    throw new IllegalArgumentException(
139:                            "'from' attribute required");
140:                if (!from.equals(_from)) {
141:                    _from = from;
142:                    _fromActivity = null;
143:                }
144:            }
145:
146:            /**
147:             * Get the end activity ID.
148:             *
149:             * @return The end activity ID
150:             */
151:            public String getTo() {
152:                return _to;
153:            }
154:
155:            /**
156:             * Set the end activity ID.
157:             *
158:             * @param to The end activty ID
159:             */
160:            public void setTo(String to) {
161:                if (to == null)
162:                    throw new IllegalArgumentException(
163:                            "'to' attribute required");
164:                if (!to.equals(_to)) {
165:                    _to = to;
166:                    _toActivity = null;
167:                }
168:            }
169:
170:            public Activity getToActivity() {
171:                return _toActivity;
172:            }
173:
174:            public void setToActivity(Activity toActivity) {
175:                _toActivity = toActivity;
176:                _to = toActivity.getId();
177:            }
178:
179:            public Activity getFromActivity() {
180:                return _fromActivity;
181:            }
182:
183:            public void setFromActivity(Activity fromActivity) {
184:                _fromActivity = fromActivity;
185:                _from = fromActivity.getId();
186:            }
187:
188:            public ExecutionType getExecution() {
189:                return _executionType;
190:            }
191:
192:            public void setExecutionType(ExecutionType executionType) {
193:                _executionType = executionType;
194:            }
195:
196:            public String toString() {
197:                return "Transition[id='" + getId() + "', executionType="
198:                        + _executionType + ", condition=" + _condition
199:                        + ", from='" + _from + '\'' + ", to='" + _to + '\''
200:                        + ']';
201:            }
202:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.