Java Doc for RequestContext.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 Reference  Class Diagram Java Document (Java Doc) 


org.springframework.webflow.execution.RequestContext

All known Subclasses:   org.springframework.webflow.test.MockRequestContext,
RequestContext
public interface RequestContext (Code)
A context for a single request to manipulate a flow execution. Allows Web Flow users to access contextual information about the executing request, as well as the governing RequestContext.getFlowExecutionContext() active flow execution .

The term request is used to describe a single call (thread) into the flow system by an external actor to manipulate exactly one flow execution.

A new instance of this object is typically created when one of the core operations supported by a flow execution is invoked, either start to launch the flow execution, signalEvent to resume the flow execution, or refresh to reconstitute the flow execution's last view selection for purposes of reissuing a user response.

Once created this context object is passed around throughout flow execution request processing where it may be accessed and reasoned upon by SWF-internal artifacts such as states, user-implemented action code, and state transition criteria.

When a call into a flow execution returns this object goes out of scope and is disposed of automatically. Thus a request context is an internal artifact used within a FlowExecution: this object is not exposed to external client code, e.g. a view implementation (JSP).

The RequestContext.getRequestScope() requestScope property may be used as a store for arbitrary data that should exist for the life of this object. Request-scoped data, along with all data in RequestContext.getFlashScope() flash scope , RequestContext.getFlowScope() flow scope and RequestContext.getConversationScope() conversation scope is available for exposing to view templates via a RequestContext.getModel() model property.

The web flow system will ensure that a RequestContext object is local to the current thread. It can be safely manipulated without needing to worry about concurrent access.

Note: this request context is in no way linked to an HTTP or Portlet request. It uses the familiar "request" naming convention to indicate a single call to manipulate a runtime execution of a flow definition.
author:
   Keith Donald
author:
   Erwin Vervaet





Method Summary
public  FlowDefinitiongetActiveFlow()
     Returns the definition of the flow that is currently executing.
public  AttributeMapgetAttributes()
     Returns a context map for accessing arbitrary attributes about the state of the current request.
public  MutableAttributeMapgetConversationScope()
     Returns a mutable accessor for accessing and/or setting attributes in conversation scope.
public  StateDefinitiongetCurrentState()
     Returns the current state of the executing flow.
public  ExternalContextgetExternalContext()
     Returns the external client context that originated (or triggered) this request.

Acting as a facade, the returned context object provides a single point of access to the calling client's environment.

public  MutableAttributeMapgetFlashScope()
     Returns a mutable accessor for accessing and/or setting attributes in flash scope.
public  FlowExecutionContextgetFlowExecutionContext()
     Returns contextual information about the flow execution itself.
public  MutableAttributeMapgetFlowScope()
     Returns a mutable accessor for accessing and/or setting attributes in flow scope.
public  EventgetLastEvent()
     Returns the last event signaled during this request.
public  TransitionDefinitiongetLastTransition()
     Returns the last state transition that executed in this request.
public  AttributeMapgetModel()
     Returns the data model capturing the state of this context, suitable for exposing to clients (mostly web views).
public  ParameterMapgetRequestParameters()
     Returns the immutable input parameters associated with this request into Spring Web Flow.
public  MutableAttributeMapgetRequestScope()
     Returns a mutable accessor for accessing and/or setting attributes in request scope.
public  voidsetAttributes(AttributeMap attributes)
     Set the contextual attributes describing the state of this request.



Method Detail
getActiveFlow
public FlowDefinition getActiveFlow() throws IllegalStateException(Code)
Returns the definition of the flow that is currently executing. the flow definition for the active session
throws:
  IllegalStateException - if the flow execution has not been startedat all, or if the execution has ended and is no longer actively executing



getAttributes
public AttributeMap getAttributes()(Code)
Returns a context map for accessing arbitrary attributes about the state of the current request. These attributes may be used to influence flow execution behavior. the current attributes of this request, or empty if not set



getConversationScope
public MutableAttributeMap getConversationScope()(Code)
Returns a mutable accessor for accessing and/or setting attributes in conversation scope. Conversation scoped attributes exist for the life of the executing flow and are shared across all flow sessions. the conversation scope
See Also:   FlowExecutionContext



getCurrentState
public StateDefinition getCurrentState() throws IllegalStateException(Code)
Returns the current state of the executing flow. May return null if this flow execution is in the process of starting and has not yet entered its start state. the current state, or null if in the process ofstarting
throws:
  IllegalStateException - if this flow execution has not been startedat all, or if this execution has ended and is no longer activelyexecuting



getExternalContext
public ExternalContext getExternalContext()(Code)
Returns the external client context that originated (or triggered) this request.

Acting as a facade, the returned context object provides a single point of access to the calling client's environment. It provides normalized access to attributes of the client environment without tying you to specific constructs within that environment.

In addition, this context may be downcastable to a specific context type for a specific client environment, such as a org.springframework.webflow.context.servlet.ServletExternalContext for servlets or a org.springframework.webflow.context.portlet.PortletExternalContext for portlets. Such downcasting will give you full access to a native HttpServletRequest, for example. With that said, for portability reasons you should avoid coupling your flow artifacts to a specific deployment environment when possible. the originating external context, the one that triggered thecurrent execution request




getFlashScope
public MutableAttributeMap getFlashScope()(Code)
Returns a mutable accessor for accessing and/or setting attributes in flash scope. Flash scoped attributes exist untill the next event is signaled in the flow execution. the flash scope



getFlowExecutionContext
public FlowExecutionContext getFlowExecutionContext()(Code)
Returns contextual information about the flow execution itself. Information in this context typically spans more than one request. the flow execution context



getFlowScope
public MutableAttributeMap getFlowScope()(Code)
Returns a mutable accessor for accessing and/or setting attributes in flow scope. Flow scoped attributes exist for the life of the active flow session. the flow scope
See Also:   FlowSession



getLastEvent
public Event getLastEvent()(Code)
Returns the last event signaled during this request. The event may or may not have caused a state transition to happen. the last signaled event, or null if no event has been signaled yet



getLastTransition
public TransitionDefinition getLastTransition()(Code)
Returns the last state transition that executed in this request. the last transition, or null if no transition hasoccured yet



getModel
public AttributeMap getModel()(Code)
Returns the data model capturing the state of this context, suitable for exposing to clients (mostly web views). Typically the model will contain the union of the data available in request, flash, session and conversation scope. the model that can be exposed to a client view for renderingpurposes



getRequestParameters
public ParameterMap getRequestParameters()(Code)
Returns the immutable input parameters associated with this request into Spring Web Flow. The map returned is immutable and cannot be changed.

This is typically a convenient shortcut for accessing the ExternalContext.getRequestParameterMap directly.
See Also:   RequestContext.getExternalContext()




getRequestScope
public MutableAttributeMap getRequestScope()(Code)
Returns a mutable accessor for accessing and/or setting attributes in request scope. Request scoped attributes exist for the duration of this request only. the request scope



setAttributes
public void setAttributes(AttributeMap attributes)(Code)
Set the contextual attributes describing the state of this request. Overwrites any pre-existing collection.
Parameters:
  attributes - the attributes



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.