Java Doc for ActionContext.java in  » Web-Framework » struts-1.3.8 » org » apache » struts » chain » contexts » 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 » Web Framework » struts 1.3.8 » org.apache.struts.chain.contexts 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.struts.chain.contexts.ActionContext

All known Subclasses:   org.apache.struts.chain.contexts.ActionContextBase,
ActionContext
public interface ActionContext extends Context(Code)

An ActionContext represents a view of a commons-chain Context which encapsulates access to request and session-scoped resources and services



Field Summary
final public static  StringAPPLICATION_SCOPE
    
final public static  StringREQUEST_SCOPE
    
final public static  StringSESSION_SCOPE
    


Method Summary
 voidaddErrors(ActionMessages errors)
    

Append the given errors keys to an internal cache, creating the cache if one is not already present.

 voidaddMessages(ActionMessages messages)
    

Append the given messages keys to an internal cache, creating the cache if one is not already present.

 StringgenerateToken()
    
 ActiongetAction()
    

Get the action which has been identified to be executed as part of processing this request.

 ActionConfiggetActionConfig()
    

Get the ActionConfig which contains the details for processing this request.

 ActionFormgetActionForm()
    

Get the ActionForm instance which will carry any data submitted as part of this request.

 MapgetApplicationScope()
    
 BooleangetCancelled()
    
 ActionMessagesgetErrors()
    

Retrieve error messages from an internal cache, creating an empty cache if one is not already present.

 ExceptiongetException()
    

Retrieve an exception which may have been caught by some code using this ActionContext, usually by an exception handler.

 BooleangetFormValid()
    

Is the ActionForm for this context valid? This method does not actually perform form validation.

 ForwardConfiggetForwardConfig()
    

Get the ForwardConfig which has been identified as the basis for view-processing.

 StringgetInclude()
    

Get the include path which should be processed as part of processing this request.

 LocalegetLocale()
    
 MessageResourcesgetMessageResources()
    
 MessageResourcesgetMessageResources(String key)
    
 ActionMessagesgetMessages()
    

Retrieve messages from an internal cache, creating an empty cache if one is not already present.

 ModuleConfiggetModuleConfig()
    

Get the ModuleConfig which is operative for the current request.

 MapgetParameterMap()
    

Return a Map of parameters submitted by the user as part of this request.

 MapgetRequestScope()
    

Return a Map of request scoped values.

 MapgetScope(String scopeName)
     Return the Map representing the scope identified by scopeName.
 MapgetSessionScope()
    

Return a Map of Session scoped values.

 booleanisTokenValid()
    

Indicate whether a transaction token for this context is valid.

A typical implementation will place a transaction token in the session" scope Map and a matching value in the "parameter" Map.

 booleanisTokenValid(boolean reset)
    

Indicate whether a transaction token is stored in the "session" scope for this context, optionally clearing the token, so that the next check would return false.

 voidrelease()
     Signal to the instance that it will not be used any more, so that any resources which should be cleaned up can be cleaned up.
 voidresetToken()
    

Clear any transactional token stored in the "session" scope for this context, so that the next check would return false.

 voidsaveErrors(ActionMessages errors)
    

Save the given error messages to the internal cache, clearing any previous messages in the cache.

 voidsaveMessages(ActionMessages messages)
    

Save the given messages to the internal cache, clearing any previous messages in the cache.

 voidsaveMessages(String scope, ActionMessages messages)
    

Save the given messages to the internal cache, clearing any previous messages in the cache, but only for the specified scope.

 voidsaveToken()
    

Save a new transaction token in the "session" scope for this context, creating new resources, if needed.

 voidsetAction(Action action)
    

Set the action which has been identified to be executed as part of processing this request.

 voidsetActionConfig(ActionConfig config)
    

Set the ActionConfig class contains the details for processing this request.

 voidsetActionForm(ActionForm form)
    

Set the ActionForm instance which will carry any data submitted as part of this request.

 voidsetCancelled(Boolean cancelled)
    

Set the "cancel event" state for this context.

 voidsetException(Exception e)
    

Store an exception in this context for use by other handling code.

 voidsetFormValid(Boolean valid)
    

Store the result of the validation of the Context's ActionForm.

 voidsetForwardConfig(ForwardConfig forward)
    

Set the ForwardConfig which should be used as the basis of the view segment of the overall processing.

 voidsetInclude(String include)
    

Set the include path which should be processed as part of processing this request.

 voidsetLocale(Locale locale)
    
 voidsetMessageResources(MessageResources resources)
    
 voidsetModuleConfig(ModuleConfig config)
    

Set the ModuleConfig which is operative for the current request.


Field Detail
APPLICATION_SCOPE
final public static String APPLICATION_SCOPE(Code)



REQUEST_SCOPE
final public static String REQUEST_SCOPE(Code)



SESSION_SCOPE
final public static String SESSION_SCOPE(Code)





Method Detail
addErrors
void addErrors(ActionMessages errors)(Code)

Append the given errors keys to an internal cache, creating the cache if one is not already present.


Parameters:
  errors - New ActionMessages to cache as errors



addMessages
void addMessages(ActionMessages messages)(Code)

Append the given messages keys to an internal cache, creating the cache if one is not already present.


Parameters:
  messages - New ActionMessages to cache



generateToken
String generateToken()(Code)

Generate a new transaction token, to be used for enforcing a single request for a particular transaction.




getAction
Action getAction()(Code)

Get the action which has been identified to be executed as part of processing this request.

The action to be executed with this request



getActionConfig
ActionConfig getActionConfig()(Code)

Get the ActionConfig which contains the details for processing this request. The ActionConfig class being used with this request




getActionForm
ActionForm getActionForm()(Code)

Get the ActionForm instance which will carry any data submitted as part of this request.

The ActionForm being used with this request



getApplicationScope
Map getApplicationScope()(Code)

Return a Map of Application scoped values.

This is implemented in analogy with the Application scope in the Servlet API, but it seems reasonable to expect that any Struts implementation will have an equivalent concept.

The ultimate meaning of "application scope" is an implementation detail left unspecified by Struts.

A Map of "application scope" attributes.



getCancelled
Boolean getCancelled()(Code)

Indicate if the "cancel event" state is set for for this context,


See Also:   ActionContextBase.CANCEL_KEY



getErrors
ActionMessages getErrors()(Code)

Retrieve error messages from an internal cache, creating an empty cache if one is not already present.

The ActionMessage cache for errors



getException
Exception getException()(Code)

Retrieve an exception which may have been caught by some code using this ActionContext, usually by an exception handler.

Any exception that may have been caught by this ActionContext



getFormValid
Boolean getFormValid()(Code)

Is the ActionForm for this context valid? This method does not actually perform form validation. It is simply a holder property where processes which perform validation can store the results of the validation for other processes' benefit.

Boolean.TRUE if the form passed validation;Boolean.FALSE if the form failed validation; nullif the form has not yet been validated



getForwardConfig
ForwardConfig getForwardConfig()(Code)

Get the ForwardConfig which has been identified as the basis for view-processing.

The ForwardConfig being used with this request



getInclude
String getInclude()(Code)

Get the include path which should be processed as part of processing this request.

The include path being used with this request



getLocale
Locale getLocale()(Code)

Return the user's currently selected Locale.




getMessageResources
MessageResources getMessageResources()(Code)

Return the default message resources for the current module.




getMessageResources
MessageResources getMessageResources(String key)(Code)

Return the specified message resources for the current module.


Parameters:
  key - The key specified in the <message-resources>element for the requested bundle



getMessages
ActionMessages getMessages()(Code)

Retrieve messages from an internal cache, creating an empty cache if one is not already present.

The ActionMessage cache for errors



getModuleConfig
ModuleConfig getModuleConfig()(Code)

Get the ModuleConfig which is operative for the current request.

The MooduleConfig being used with this request



getParameterMap
Map getParameterMap()(Code)

Return a Map of parameters submitted by the user as part of this request. The keys to this map will be request parameter names (of type String), and the values will be String[].

This is implemented in analogy with the Request parameters of the Servlet API, but it seems reasonable to expect that any Struts implementation will have an equivalent concept.

A map of the request parameter attributes



getRequestScope
Map getRequestScope()(Code)

Return a Map of request scoped values. A request is understood as the fundamental motivation for any particular instance of an ActionContext.

This is implemented in analogy with the Request Context in the Servlet API, but it seems reasonable to expect that any Struts implementation will have an equivalent concept.

The ultimate meaning of "request scope" is an implementation detail left unspecified by Struts.

a Map of "request scope" attributes.



getScope
Map getScope(String scopeName)(Code)
Return the Map representing the scope identified by scopeName. Implementations should support at minimum the names associated with the constants APPLICATION_SCOPE, SESSION_SCOPE, and REQUEST_SCOPE, but are permitted to support others as well.
Parameters:
  scopeName - A token identifying a scope, including but not limitedto APPLICATION_SCOPE, SESSION_SCOPE,REQUEST_SCOPE. A Map of attributes for the specified scope.



getSessionScope
Map getSessionScope()(Code)

Return a Map of Session scoped values. A session is understood as a sequence of requests made by the same user.

This is implemented in analogy with the Session scope in the Servlet API, but it seems reasonable to expect that any Struts implementation will have an equivalent concept.

The ultimate meaning of "session scope" is an implementation detail left unspecified by Struts.

A Map of "session scope" attributes.



isTokenValid
boolean isTokenValid()(Code)

Indicate whether a transaction token for this context is valid.

A typical implementation will place a transaction token in the session" scope Map and a matching value in the "parameter" Map. If the "session" token does not match the "parameter" attribute, or the session token is missing, then the transactional token is deemed invalid.




isTokenValid
boolean isTokenValid(boolean reset)(Code)

Indicate whether a transaction token is stored in the "session" scope for this context, optionally clearing the token, so that the next check would return false.


Parameters:
  reset - On true, clear the transactional token



release
void release()(Code)
Signal to the instance that it will not be used any more, so that any resources which should be cleaned up can be cleaned up.



resetToken
void resetToken()(Code)

Clear any transactional token stored in the "session" scope for this context, so that the next check would return false.




saveErrors
void saveErrors(ActionMessages errors)(Code)

Save the given error messages to the internal cache, clearing any previous messages in the cache.

If the parameter is null or empty, the internal cache is removed.


Parameters:
  errors - ActionMesssages to cache as errors



saveMessages
void saveMessages(ActionMessages messages)(Code)

Save the given messages to the internal cache, clearing any previous messages in the cache.

If the parameter is null or empty, the internal cache is removed.


Parameters:
  messages - ActionMesssages to cache



saveMessages
void saveMessages(String scope, ActionMessages messages)(Code)

Save the given messages to the internal cache, clearing any previous messages in the cache, but only for the specified scope.

If the parameter is null or empty, the internal cache is removed.


Parameters:
  scope - The scope for the internal cache
Parameters:
  messages - ActionMesssages to cache



saveToken
void saveToken()(Code)

Save a new transaction token in the "session" scope for this context, creating new resources, if needed.




setAction
void setAction(Action action)(Code)

Set the action which has been identified to be executed as part of processing this request.


Parameters:
  action -



setActionConfig
void setActionConfig(ActionConfig config)(Code)

Set the ActionConfig class contains the details for processing this request.


Parameters:
  config - The ActionConfig class to use with this request



setActionForm
void setActionForm(ActionForm form)(Code)

Set the ActionForm instance which will carry any data submitted as part of this request.


Parameters:
  form - The ActionForm instance to use with this request



setCancelled
void setCancelled(Boolean cancelled)(Code)

Set the "cancel event" state for this context.


Parameters:
  cancelled - On true, set the cancel event state to true. On false,set the cancel event state to false.
See Also:   ActionContextBase.CANCEL_KEY




setException
void setException(Exception e)(Code)

Store an exception in this context for use by other handling code.


Parameters:
  e - An exception to be stored for handling by another member



setFormValid
void setFormValid(Boolean valid)(Code)

Store the result of the validation of the Context's ActionForm.


Parameters:
  valid - Whether the ActionForm for this request passes validation



setForwardConfig
void setForwardConfig(ForwardConfig forward)(Code)

Set the ForwardConfig which should be used as the basis of the view segment of the overall processing. This is the primary method of "communication" with the "view" sub-chain.


Parameters:
  forward - The ForwardConfig to use with this request



setInclude
void setInclude(String include)(Code)

Set the include path which should be processed as part of processing this request.


Parameters:
  include - The include path to be used with this request



setLocale
void setLocale(Locale locale)(Code)

Set the user's currently selected Locale.


Parameters:
  locale - The user's selected Locale to be set, or null to selectthe server's default Locale



setMessageResources
void setMessageResources(MessageResources resources)(Code)

Set the default message resources for the current module.




setModuleConfig
void setModuleConfig(ModuleConfig config)(Code)

Set the ModuleConfig which is operative for the current request.


Parameters:
  config - The ModuleConfig to be used with this request



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