Java Doc for FlowAttributeMapper.java in  » Workflow-Engines » spring-webflow-1.0.4 » org » springframework » webflow » 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 » Workflow Engines » spring webflow 1.0.4 » org.springframework.webflow.engine 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.springframework.webflow.engine.FlowAttributeMapper

All known Subclasses:   org.springframework.webflow.engine.support.AbstractFlowAttributeMapper,
FlowAttributeMapper
public interface FlowAttributeMapper (Code)
A service interface that maps attributes between two flows. Used by the subflow state to map attributes between a parent flow and its sub flow.

An attribute mapper may map attributes of a parent flow down to a child flow as input when the child is spawned as a subflow. In addition, a mapper may map output attributes of a subflow into a resuming parent flow as output when the child session ends and control is returned to the parent flow.

For example, say you have the following parent flow session:

 Parent Flow Session
 -------------------
 -> flow = myFlow
 -> flowScope = [map-> attribute1=value1, attribute2=value2, attribute3=value3]
 

For the "Parent Flow Session" above, there are 3 attributes in flow scope ("attribute1", "attribute2" and "attribute3", respectively). Any of these three attributes may be mapped as input down to child subflows when those subflows are spawned. An implementation of this interface performs the actual mapping, encapsulating knowledge of which attributes should be mapped, and how they will be mapped (for example, will the same attribute names be used between flows or not?).

For example:

 Flow Attribute Mapper Configuration
 -----------------------------------
 -> inputMappings  = [map-> flowScope.attribute1->attribute1, flowScope.attribute3->attribute4]
 -> outputMappings = [map-> attribute4->flowScope.attribute3]
 

The above example "Flow Attribute Mapper" specifies inputMappings that define which parent attributes to map as input to the child. In this case, two attributes in flow scope of the parent are mapped, "attribute1" and "attribute3". "attribute1" is mapped with the name "attribute1" (given the same name in both flows), while "attribute3" is mapped to "attribute4", given a different name that is local to the child flow.

Likewise, when a child flow ends the outputMappings define which output attributes to map into the parent. In this case the subflow output attribute "attribute4" will be mapped up to the parent as "attribute3", updating the value of "attribute3" in the parent's flow scope. Note: only output attributes exposed by the end state of the ending subflow are eligible for mapping.

A FlowAttributeMapper is typically implemented using 2 distinct org.springframework.binding.mapping.AttributeMapper implementations: one responsible for input mapping and one taking care of output mapping.

Note: because FlowAttributeMappers are singletons, take care not to store and/or modify caller-specific state in a unsafe manner. The FlowAttributeMapper methods run in an independently executing thread on each invocation so make sure you deal only with local data or internal, thread-safe services.
See Also:   org.springframework.webflow.engine.SubflowState
See Also:   org.springframework.binding.mapping.AttributeMapper
author:
   Keith Donald
author:
   Erwin Vervaet





Method Summary
public  MutableAttributeMapcreateFlowInput(RequestContext context)
     Create a map of attributes that should be passed as input to a spawning flow.
public  voidmapFlowOutput(AttributeMap flowOutput, RequestContext context)
     Map output attributes of an ended flow to a resuming parent flow session.



Method Detail
createFlowInput
public MutableAttributeMap createFlowInput(RequestContext context)(Code)
Create a map of attributes that should be passed as input to a spawning flow.

Attributes set in the map returned by this method are availale as input to the subflow when its session is spawned.
Parameters:
  context - the current request execution context, which gives accessto the parent flow scope, the request scope, any event parameters, etcetera a map of attributes (name=value pairs) to pass as input to thespawning subflow




mapFlowOutput
public void mapFlowOutput(AttributeMap flowOutput, RequestContext context)(Code)
Map output attributes of an ended flow to a resuming parent flow session. This maps the output of the child as new input to the resuming parent, typically adding data to flow scope.
Parameters:
  flowOutput - the output attributes exposed by the ended subflow
Parameters:
  context - the current request execution context, which gives accessto the parent flow scope



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