Source Code Cross Referenced for ScopeType.java in  » Workflow-Engines » spring-webflow-1.0.4 » org » springframework » webflow » execution » 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.execution 
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.execution;
017:
018:        import org.springframework.core.enums.StaticLabeledEnum;
019:        import org.springframework.webflow.core.collection.MutableAttributeMap;
020:        import org.springframework.webflow.definition.FlowDefinition;
021:
022:        /**
023:         * An enumeration of the core scope types of Spring Web Flow. Provides easy
024:         * access to each scope by <i>type</i> using
025:         * {@link #getScope(RequestContext)}.
026:         * <p>
027:         * A "scope" defines a data structure for storing custom user attributes within
028:         * a flow execution. Different scope types have different semantics in terms of
029:         * how long attributes placed in those scope maps remain valid.
030:         * 
031:         * @author Keith Donald
032:         * @author Erwin Vervaet
033:         */
034:        public abstract class ScopeType extends StaticLabeledEnum {
035:
036:            /**
037:             * The "request" scope type. Attributes placed in request scope exist for
038:             * the life of the current request into the flow execution. When the request
039:             * ends any attributes in request scope go out of scope.
040:             */
041:            public static final ScopeType REQUEST = new ScopeType(0, "Request") {
042:                public MutableAttributeMap getScope(RequestContext context) {
043:                    return context.getRequestScope();
044:                }
045:            };
046:
047:            /**
048:             * The "flash" scope type. Attributes placed in flash scope exist through
049:             * the life of the current request <i>and until the next user event is
050:             * signaled in a subsequent request</i>. When the next external user event
051:             * is signaled flash scope is cleared.
052:             * <p>
053:             * Flash scope is typically used to store messages that should be preserved
054:             * across refreshes of the next view state (for example, on a redirect and
055:             * any browser refreshes).
056:             */
057:            public static final ScopeType FLASH = new ScopeType(1, "Flash") {
058:                public MutableAttributeMap getScope(RequestContext context) {
059:                    return context.getFlashScope();
060:                }
061:            };
062:
063:            /**
064:             * The "flow" scope type. Attributes placed in flow scope exist through the
065:             * life of an executing flow session, representing an instance a single
066:             * {@link FlowDefinition flow definition}. When the flow session ends any
067:             * data in flow scope goes out of scope.
068:             */
069:            public static final ScopeType FLOW = new ScopeType(2, "Flow") {
070:                public MutableAttributeMap getScope(RequestContext context) {
071:                    return context.getFlowScope();
072:                }
073:            };
074:
075:            /**
076:             * The "conversation" scope type. Attributes placed in conversation scope
077:             * are shared by all flow sessions started within a flow execution and live
078:             * for the life of the entire flow execution (representing a single logical
079:             * user conversation). When the governing execution ends, any data in
080:             * conversation scope goes out of scope.
081:             */
082:            public static final ScopeType CONVERSATION = new ScopeType(3,
083:                    "Conversation") {
084:                public MutableAttributeMap getScope(RequestContext context) {
085:                    return context.getConversationScope();
086:                }
087:            };
088:
089:            /**
090:             * Private constructor because this is a typesafe enum!
091:             */
092:            private ScopeType(int code, String label) {
093:                super (code, label);
094:            }
095:
096:            public Class getType() {
097:                // force ScopeType as type
098:                return ScopeType.class;
099:            }
100:
101:            /**
102:             * Accessor that returns the mutable attribute map for this scope type for a
103:             * given flow execution request context.
104:             * @param context the context representing an executing request
105:             * @return the scope map of this type for that request, allowing attributes
106:             * to be accessed and set
107:             */
108:            public abstract MutableAttributeMap getScope(RequestContext context);
109:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.