Source Code Cross Referenced for FlowExecutionHolder.java in  » Workflow-Engines » spring-webflow-1.0.4 » org » springframework » webflow » executor » jsf » 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 » spring webflow 1.0.4 » org.springframework.webflow.executor.jsf 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2004-2007 the original author or authors.
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *      http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package org.springframework.webflow.executor.jsf;
017:
018:        import java.io.Serializable;
019:
020:        import org.springframework.core.style.ToStringCreator;
021:        import org.springframework.webflow.execution.FlowExecution;
022:        import org.springframework.webflow.execution.ViewSelection;
023:        import org.springframework.webflow.execution.repository.FlowExecutionKey;
024:        import org.springframework.webflow.execution.repository.FlowExecutionLock;
025:
026:        /**
027:         * A holder storing a reference to a flow execution and the key of that flow execution if it has been (or is about to
028:         * be) managed in a repository.
029:         * 
030:         * @author Keith Donald
031:         */
032:        public class FlowExecutionHolder implements  Serializable {
033:
034:            /**
035:             * The flow execution continuation key (may be null if the flow execution has not yet been generated a repository
036:             * key). May change as well over the life of this object, as a flow execution can be given a new key to capture its
037:             * state at another point in time.
038:             */
039:            private FlowExecutionKey flowExecutionKey;
040:
041:            /**
042:             * The held flow execution representing the state of an ongoing conversation at a point in time.
043:             */
044:            private FlowExecution flowExecution;
045:
046:            /**
047:             * The lock obtained to exclusively manipulate the flow execution.
048:             */
049:            private FlowExecutionLock flowExecutionLock;
050:
051:            /**
052:             * The currently selected view selection for this request.
053:             */
054:            private ViewSelection viewSelection;
055:
056:            /**
057:             * Creates a new flow execution holder for a flow execution that has not yet been placed in a repository.
058:             * @param flowExecution the flow execution to hold
059:             */
060:            public FlowExecutionHolder(FlowExecution flowExecution) {
061:                this .flowExecution = flowExecution;
062:            }
063:
064:            /**
065:             * Creates a new flow execution holder for a flow execution that has been restored from a repository.
066:             * @param flowExecutionKey the continuation key
067:             * @param flowExecution the flow execution to hold
068:             * @param flowExecutionLock the lock acquired on the flow execution
069:             */
070:            public FlowExecutionHolder(FlowExecutionKey flowExecutionKey,
071:                    FlowExecution flowExecution,
072:                    FlowExecutionLock flowExecutionLock) {
073:                this .flowExecutionKey = flowExecutionKey;
074:                this .flowExecution = flowExecution;
075:                this .flowExecutionLock = flowExecutionLock;
076:            }
077:
078:            /**
079:             * Returns the continuation key.
080:             */
081:            public FlowExecutionKey getFlowExecutionKey() {
082:                return flowExecutionKey;
083:            }
084:
085:            /**
086:             * Sets the continuation key.
087:             */
088:            public void setFlowExecutionKey(FlowExecutionKey key) {
089:                this .flowExecutionKey = key;
090:            }
091:
092:            /**
093:             * Returns the flow execution.
094:             */
095:            public FlowExecution getFlowExecution() {
096:                return flowExecution;
097:            }
098:
099:            /**
100:             * Returns the flow execution lock
101:             */
102:            public FlowExecutionLock getFlowExecutionLock() {
103:                return flowExecutionLock;
104:            }
105:
106:            /**
107:             * Sets the lock acquired on the flow execution
108:             * @param lock the flow execution lock
109:             */
110:            public void setFlowExecutionLock(FlowExecutionLock lock) {
111:                this .flowExecutionLock = lock;
112:            }
113:
114:            /**
115:             * Returns the view selected from the current flow execution request.
116:             */
117:            public ViewSelection getViewSelection() {
118:                return viewSelection;
119:            }
120:
121:            /**
122:             * Sets the selected view from the current flow execution request.
123:             * @param viewSelection the view selection
124:             */
125:            public void setViewSelection(ViewSelection viewSelection) {
126:                this .viewSelection = viewSelection;
127:            }
128:
129:            /**
130:             * Replace the current flow execution with the one provided. This method will clear out all state associated with
131:             * the original execution and unlock it if necessary.
132:             * @param flowExecution the new "current" flow execution
133:             */
134:            public void replaceWith(FlowExecution flowExecution) {
135:                this .flowExecutionKey = null;
136:                this .viewSelection = null;
137:                unlockFlowExecutionIfNecessary();
138:                this .flowExecution = flowExecution;
139:            }
140:
141:            /**
142:             * Unlock the held flow execution if necessary.
143:             */
144:            public void unlockFlowExecutionIfNecessary() {
145:                if (flowExecutionLock != null) {
146:                    flowExecutionLock.unlock();
147:                    this .flowExecutionLock = null;
148:                }
149:            }
150:
151:            public String toString() {
152:                return new ToStringCreator(this ).append("flowExecutionKey",
153:                        flowExecutionKey)
154:                        .append("flowExecution", flowExecution).toString();
155:            }
156:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.