Java Doc for ActionContext.java in  » J2EE » webwork-2.2.6 » com » opensymphony » xwork » 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 » J2EE » webwork 2.2.6 » com.opensymphony.xwork 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.opensymphony.xwork.ActionContext

All known Subclasses:   com.opensymphony.webwork.ServletActionContext,
ActionContext
public class ActionContext implements Serializable(Code)
The ActionContext is the context in which an Action is executed. Each context is basically a container of objects an action needs for execution like the session, parameters, locale, etc.

The ActionContext is thread local which means that values stored in the ActionContext are unique per thread. See the ThreadLocal class for more information. The benefit of this is you don't need to worry about a user specific action context, you just get it:

    ActionContext context = ActionContext.getContext();

Finally, because of the thread local usage you don't need to worry about making your actions thread safe.
author:
   Patrick Lightbody
author:
   Bill Lynch (docs)



Field Summary
final public static  StringACTION_INVOCATION
     Constant for the action's com.opensymphony.xwork.ActionInvocation invocation context.
final public static  StringACTION_NAME
     Constant for the name of the action being executed.
final public static  StringAPPLICATION
     Constant for the action's application context.
final public static  StringCONVERSION_ERRORS
     Constant for the map of type conversion errors.
final public static  StringDEV_MODE
     Constant that indicates the action is running under a "development mode".
final public static  StringLOCALE
     Constant for the action's locale.
final public static  StringPARAMETERS
     Constant for the action's parameters.
final public static  StringSESSION
     Constant for the action's session.
final public static  StringTYPE_CONVERTER
     Constant for the action's type converter.
final public static  StringVALUE_STACK
     Constant for the com.opensymphony.xwork.util.OgnlValueStack OGNL value stack .
static  ThreadLocalactionContext
    
 Mapcontext
    

Constructor Summary
public  ActionContext(Map context)
     Creates a new ActionContext initialized with another context.

Method Summary
public  Objectget(Object key)
     Returns a value that is stored in the current ActionContext by doing a lookup using the value's key.
Parameters:
  key - the key used to find the value.
public  ActionInvocationgetActionInvocation()
     Gets the action invocation (the execution state).
public  MapgetApplication()
     Returns a Map of the ServletContext when in a servlet environment or a generic application level Map otherwise.
public static  ActionContextgetContext()
     Returns the ActionContext specific to the current thread.
public  MapgetContextMap()
     Gets the context map.
public  MapgetConversionErrors()
     Gets the map of conversion errors which occurred when executing the action.
public  LocalegetLocale()
     Gets the Locale of the current action.
public  StringgetName()
     Gets the name of the current Action.
public  MapgetParameters()
     Returns a Map of the HttpServletRequest parameters when in a servlet environment or a generic Map of parameters otherwise.
public  MapgetSession()
     Gets the Map of HttpSession values when in a servlet environment or a generic session map otherwise.
public  OgnlValueStackgetValueStack()
     Gets the OGNL value stack.
public  voidput(Object key, Object value)
     Stores a value in the current ActionContext.
public  voidsetActionInvocation(ActionInvocation actionInvocation)
     Sets the action invocation (the execution state).
public  voidsetApplication(Map application)
     Sets the action's application context.
public static  voidsetContext(ActionContext context)
     Sets the action context for the current thread.
public  voidsetContextMap(Map contextMap)
     Sets the action's context map.
public  voidsetConversionErrors(Map conversionErrors)
     Sets conversion errors which occurred when executing the action.
public  voidsetLocale(Locale locale)
     Sets the Locale for the current action.
public  voidsetName(String name)
     Sets the name of the current Action in the ActionContext.
public  voidsetParameters(Map parameters)
     Sets the action parameters.
public  voidsetSession(Map session)
     Sets a map of action session values.
public  voidsetValueStack(OgnlValueStack stack)
     Sets the OGNL value stack.

Field Detail
ACTION_INVOCATION
final public static String ACTION_INVOCATION(Code)
Constant for the action's com.opensymphony.xwork.ActionInvocation invocation context.



ACTION_NAME
final public static String ACTION_NAME(Code)
Constant for the name of the action being executed.



APPLICATION
final public static String APPLICATION(Code)
Constant for the action's application context.



CONVERSION_ERRORS
final public static String CONVERSION_ERRORS(Code)
Constant for the map of type conversion errors.



DEV_MODE
final public static String DEV_MODE(Code)
Constant that indicates the action is running under a "development mode". This mode provides more feedback that is useful for developers but probably too verbose/error prone for production.



LOCALE
final public static String LOCALE(Code)
Constant for the action's locale.



PARAMETERS
final public static String PARAMETERS(Code)
Constant for the action's parameters.



SESSION
final public static String SESSION(Code)
Constant for the action's session.



TYPE_CONVERTER
final public static String TYPE_CONVERTER(Code)
Constant for the action's type converter.



VALUE_STACK
final public static String VALUE_STACK(Code)
Constant for the com.opensymphony.xwork.util.OgnlValueStack OGNL value stack .



actionContext
static ThreadLocal actionContext(Code)



context
Map context(Code)




Constructor Detail
ActionContext
public ActionContext(Map context)(Code)
Creates a new ActionContext initialized with another context.
Parameters:
  context - a context map.




Method Detail
get
public Object get(Object key)(Code)
Returns a value that is stored in the current ActionContext by doing a lookup using the value's key.
Parameters:
  key - the key used to find the value. the value that was found using the key or null if the key was not found.



getActionInvocation
public ActionInvocation getActionInvocation()(Code)
Gets the action invocation (the execution state). the action invocation (the execution state).



getApplication
public Map getApplication()(Code)
Returns a Map of the ServletContext when in a servlet environment or a generic application level Map otherwise. a Map of ServletContext or generic application level Map



getContext
public static ActionContext getContext()(Code)
Returns the ActionContext specific to the current thread. the ActionContext for the current thread, is never null.



getContextMap
public Map getContextMap()(Code)
Gets the context map. the context map.



getConversionErrors
public Map getConversionErrors()(Code)
Gets the map of conversion errors which occurred when executing the action. the map of conversion errors which occurred when executing the action or an empty map ifthere were no errors.



getLocale
public Locale getLocale()(Code)
Gets the Locale of the current action. If no locale was ever specified the platform's java.util.Locale.getDefault default locale is used. the Locale of the current action.



getName
public String getName()(Code)
Gets the name of the current Action. the name of the current action.



getParameters
public Map getParameters()(Code)
Returns a Map of the HttpServletRequest parameters when in a servlet environment or a generic Map of parameters otherwise. a Map of HttpServletRequest parameters or a multipart map when in a servlet environment, or ageneric Map of parameters otherwise.



getSession
public Map getSession()(Code)
Gets the Map of HttpSession values when in a servlet environment or a generic session map otherwise. the Map of HttpSession values when in a servlet environment or a generic session map otherwise.



getValueStack
public OgnlValueStack getValueStack()(Code)
Gets the OGNL value stack. the OGNL value stack.



put
public void put(Object key, Object value)(Code)
Stores a value in the current ActionContext. The value can be looked up using the key.
Parameters:
  key - the key of the value.
Parameters:
  value - the value to be stored.



setActionInvocation
public void setActionInvocation(ActionInvocation actionInvocation)(Code)
Sets the action invocation (the execution state).
Parameters:
  actionInvocation - the action execution state.



setApplication
public void setApplication(Map application)(Code)
Sets the action's application context.
Parameters:
  application - the action's application context.



setContext
public static void setContext(ActionContext context)(Code)
Sets the action context for the current thread.
Parameters:
  context - the action context.



setContextMap
public void setContextMap(Map contextMap)(Code)
Sets the action's context map.
Parameters:
  contextMap - the context map.



setConversionErrors
public void setConversionErrors(Map conversionErrors)(Code)
Sets conversion errors which occurred when executing the action.
Parameters:
  conversionErrors - a Map of errors which occurred when executing the action.



setLocale
public void setLocale(Locale locale)(Code)
Sets the Locale for the current action.
Parameters:
  locale - the Locale for the current action.



setName
public void setName(String name)(Code)
Sets the name of the current Action in the ActionContext.
Parameters:
  name - the name of the current action.



setParameters
public void setParameters(Map parameters)(Code)
Sets the action parameters.
Parameters:
  parameters - the parameters for the current action.



setSession
public void setSession(Map session)(Code)
Sets a map of action session values.
Parameters:
  session - the session values.



setValueStack
public void setValueStack(OgnlValueStack stack)(Code)
Sets the OGNL value stack.
Parameters:
  stack - the OGNL value stack.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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