Source Code Cross Referenced for RouteContext.java in  » ERP-CRM-Financial » Kuali-Financial-System » edu » iu » uis » eden » engine » 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 » ERP CRM Financial » Kuali Financial System » edu.iu.uis.eden.engine 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2005-2006 The Kuali Foundation.
003:         *
004:         *
005:         * Licensed under the Educational Community License, Version 1.0 (the "License");
006:         * you may not use this file except in compliance with the License.
007:         * You may obtain a copy of the License at
008:         *
009:         * http://www.opensource.org/licenses/ecl1.php
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 edu.iu.uis.eden.engine;
018:
019:        import java.io.Serializable;
020:        import java.util.HashMap;
021:        import java.util.LinkedList;
022:        import java.util.List;
023:        import java.util.Map;
024:
025:        import edu.iu.uis.eden.actionrequests.ActionRequestValue;
026:        import edu.iu.uis.eden.engine.node.RouteNodeInstance;
027:        import edu.iu.uis.eden.exception.WorkflowRuntimeException;
028:        import edu.iu.uis.eden.routeheader.DocumentContent;
029:        import edu.iu.uis.eden.routeheader.DocumentRouteHeaderValue;
030:        import edu.iu.uis.eden.routeheader.StandardDocumentContent;
031:
032:        /**
033:         * Represents the current context of a Document being processed by the engine.
034:         *
035:         * @author ewestfal
036:         * @author rkirkend
037:         */
038:        public class RouteContext implements  Serializable {
039:
040:            private static final long serialVersionUID = -7125137491367944594L;
041:
042:            private DocumentRouteHeaderValue routeHeader;
043:
044:            private DocumentContent documentContent;
045:
046:            private RouteNodeInstance nodeInstance;
047:
048:            private EngineState engineState;
049:
050:            private ActionRequestValue actionRequest;
051:
052:            private ActivationContext activationContext = new ActivationContext(
053:                    !ActivationContext.CONTEXT_IS_SIMULATION);
054:
055:            private boolean doNotSendApproveNotificationEmails = false;
056:
057:            private Map parameters = new HashMap();
058:
059:            public RouteContext() {
060:            }
061:
062:            private static ThreadLocal<List<RouteContext>> ROUTE_CONTEXT_STACK = new ThreadLocal<List<RouteContext>>() {
063:                protected List<RouteContext> initialValue() {
064:                    List<RouteContext> contextStack = new LinkedList<RouteContext>();
065:                    contextStack.add(0, new RouteContext());
066:                    return contextStack;
067:                }
068:            };
069:
070:            public static RouteContext getCurrentRouteContext() {
071:                return ROUTE_CONTEXT_STACK.get().get(0);
072:            }
073:
074:            public static void clearCurrentRouteContext() {
075:                ROUTE_CONTEXT_STACK.get().remove(0);
076:                ROUTE_CONTEXT_STACK.get().add(0, new RouteContext());
077:            }
078:
079:            public static RouteContext createNewRouteContext() {
080:                ROUTE_CONTEXT_STACK.get().add(0, new RouteContext());
081:                return getCurrentRouteContext();
082:            }
083:
084:            public static RouteContext releaseCurrentRouteContext() {
085:                return ROUTE_CONTEXT_STACK.get().remove(0);
086:            }
087:
088:            /**
089:             * @deprecated use getDocument() instead
090:             */
091:            public DocumentRouteHeaderValue getRouteHeader() {
092:                return routeHeader;
093:            }
094:
095:            /**
096:             * @deprecated user setDocument() instead
097:             */
098:            public void setRouteHeader(DocumentRouteHeaderValue routeHeader) {
099:                this .routeHeader = routeHeader;
100:            }
101:
102:            public DocumentRouteHeaderValue getDocument() {
103:                return routeHeader;
104:            }
105:
106:            public void setDocument(DocumentRouteHeaderValue routeHeader) {
107:                this .routeHeader = routeHeader;
108:                try {
109:                    setDocumentContent(new StandardDocumentContent(routeHeader
110:                            .getDocContent(), this ));
111:                } catch (Exception e) {
112:                    throw new WorkflowRuntimeException(e);
113:                }
114:            }
115:
116:            public DocumentContent getDocumentContent() {
117:                return documentContent;
118:            }
119:
120:            public void setDocumentContent(DocumentContent documentContent) {
121:                this .documentContent = documentContent;
122:            }
123:
124:            public RouteNodeInstance getNodeInstance() {
125:                return nodeInstance;
126:            }
127:
128:            public void setNodeInstance(RouteNodeInstance nodeInstance) {
129:                this .nodeInstance = nodeInstance;
130:            }
131:
132:            public EngineState getEngineState() {
133:                return engineState;
134:            }
135:
136:            public void setEngineState(EngineState engineState) {
137:                this .engineState = engineState;
138:            }
139:
140:            public ActionRequestValue getActionRequest() {
141:                return actionRequest;
142:            }
143:
144:            public void setActionRequest(ActionRequestValue actionRequest) {
145:                this .actionRequest = actionRequest;
146:            }
147:
148:            public boolean isSimulation() {
149:                if (activationContext == null) {
150:                    return false;
151:                }
152:                return activationContext.isSimulation();
153:            }
154:
155:            public ActivationContext getActivationContext() {
156:                return activationContext;
157:            }
158:
159:            public void setActivationContext(ActivationContext activationContext) {
160:                this .activationContext = activationContext;
161:            }
162:
163:            public boolean isDoNotSendApproveNotificationEmails() {
164:                return doNotSendApproveNotificationEmails;
165:            }
166:
167:            public void setDoNotSendApproveNotificationEmails(
168:                    boolean sendNotificationEmails) {
169:                this .doNotSendApproveNotificationEmails = sendNotificationEmails;
170:            }
171:
172:            public Map getParameters() {
173:                return parameters;
174:            }
175:
176:            public void setParameters(Map parameters) {
177:                this.parameters = parameters;
178:            }
179:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.