Source Code Cross Referenced for Transition.java in  » Library » Apache-commons-scxml-0.6-src » org » apache » commons » scxml » model » 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 » Library » Apache commons scxml 0.6 src » org.apache.commons.scxml.model 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one or more
003:         * contributor license agreements.  See the NOTICE file distributed with
004:         * this work for additional information regarding copyright ownership.
005:         * The ASF licenses this file to You under the Apache License, Version 2.0
006:         * (the "License"); you may not use this file except in compliance with
007:         * the License.  You may obtain a copy of the License at
008:         *
009:         *     http://www.apache.org/licenses/LICENSE-2.0
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package org.apache.commons.scxml.model;
018:
019:        import java.util.Map;
020:
021:        /**
022:         * The class in this SCXML object model that corresponds to the
023:         * <transition> SCXML element. Transition rules are triggered
024:         * by "events" and conditionalized via
025:         * "guard-conditions".
026:         *
027:         */
028:        public class Transition extends Executable implements 
029:                NamespacePrefixesHolder {
030:
031:            /**
032:             * Serial version UID.
033:             */
034:            private static final long serialVersionUID = 1L;
035:
036:            /**
037:             * Property that specifies the trigger for this transition.
038:             */
039:            private String event;
040:
041:            /**
042:             * Optional guard condition.
043:             */
044:            private String cond;
045:
046:            /**
047:             * Optional property that specifies the new state or parallel
048:             * element to transition to. May be specified by reference or in-line.
049:             */
050:            private TransitionTarget target;
051:
052:            /**
053:             * The transition target ID (used by XML Digester only).
054:             */
055:            private String next;
056:
057:            /**
058:             * The path for this transition.
059:             * @see Path
060:             */
061:            private Path path;
062:
063:            /**
064:             * The current XML namespaces in the SCXML document for this action node,
065:             * preserved for deferred XPath evaluation.
066:             */
067:            private Map namespaces;
068:
069:            /**
070:             * Constructor.
071:             */
072:            public Transition() {
073:                super ();
074:                this .target = null;
075:                this .path = null;
076:            }
077:
078:            /**
079:             * Get the guard condition (may be null).
080:             *
081:             * @return Returns the cond.
082:             */
083:            public final String getCond() {
084:                return cond;
085:            }
086:
087:            /**
088:             * Set the guard condition.
089:             *
090:             * @param cond The cond to set.
091:             */
092:            public final void setCond(final String cond) {
093:                this .cond = cond;
094:            }
095:
096:            /**
097:             * Get the event that will trigger this transition (pending
098:             * evaluation of the guard condition in favor).
099:             *
100:             * @return Returns the event.
101:             */
102:            public final String getEvent() {
103:                return event;
104:            }
105:
106:            /**
107:             * Set the event that will trigger this transition (pending
108:             * evaluation of the guard condition in favor).
109:             *
110:             * @param event The event to set.
111:             */
112:            public final void setEvent(final String event) {
113:                this .event = event;
114:            }
115:
116:            /**
117:             * Get the XML namespaces at this action node in the SCXML document.
118:             *
119:             * @return Returns the map of namespaces.
120:             */
121:            public final Map getNamespaces() {
122:                return namespaces;
123:            }
124:
125:            /**
126:             * Set the XML namespaces at this action node in the SCXML document.
127:             *
128:             * @param namespaces The document namespaces.
129:             */
130:            public final void setNamespaces(final Map namespaces) {
131:                this .namespaces = namespaces;
132:            }
133:
134:            /**
135:             * Get the transition target (may be null).
136:             *
137:             * @return Returns the target as specified in SCXML markup.
138:             * <p>Remarks: Is <code>null</code> for &quot;stay&quot; transitions.
139:             *  Returns parent (the source node) for &quot;self&quot; transitions.</p>
140:             */
141:            public final TransitionTarget getTarget() {
142:                return target;
143:            }
144:
145:            /**
146:             * Get the runtime transition target, which always resolves to
147:             * a TransitionTarget instance.
148:             *
149:             * @return Returns the actual target of a transition at runtime.
150:             * <p>Remarks: For both the &quot;stay&quot; and &quot;self&quot;
151:             * transitions it returns parent (the source node). This method should
152:             * never return <code>null</code>.</p>
153:             */
154:            public final TransitionTarget getRuntimeTarget() {
155:                if (target != null) {
156:                    return target;
157:                }
158:                return getParent();
159:            }
160:
161:            /**
162:             * Set the transition target.
163:             *
164:             * @param target The target to set.
165:             */
166:            public final void setTarget(final TransitionTarget target) {
167:                this .target = target;
168:            }
169:
170:            /**
171:             * Get the ID of the transition target (may be null, if, for example,
172:             * the target is specified inline).
173:             *
174:             * @return String Returns the transition target ID
175:             *                (used by SCXML Digester only).
176:             * @see #getTarget()
177:             */
178:            public final String getNext() {
179:                return next;
180:            }
181:
182:            /**
183:             * Set the transition target by specifying its ID.
184:             *
185:             * @param next The the transition target ID (used by SCXML Digester only).
186:             * @see #setTarget(TransitionTarget)
187:             */
188:            public final void setNext(final String next) {
189:                this .next = next;
190:            }
191:
192:            /**
193:             * Get the path of this transiton.
194:             *
195:             * @see Path
196:             * @return Path returns the transition path
197:             */
198:            public final Path getPath() {
199:                if (path == null) {
200:                    path = new Path(getParent(), getTarget());
201:                }
202:                return path;
203:            }
204:
205:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.