Java Doc for ActionContextBase.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) 


java.lang.Object
   org.apache.struts.chain.contexts.ContextWrapper
      org.apache.struts.chain.contexts.ActionContextBase

All known Subclasses:   org.apache.struts.chain.contexts.WebActionContext,  org.apache.struts.chain.contexts.MockActionContext,
ActionContextBase
abstract public class ActionContextBase extends ContextWrapper implements ActionContext(Code)

Provide an abstract but semi-complete implementation of ActionContext to serve as the base for concrete implementations.

The abstract methods to implement are the accessors for the named states, getApplicationScope, getRequestScope, and getSessionScope.



Field Summary
final public static  StringACTION_CONFIG_KEY
    
final public static  StringACTION_FORM_KEY
    
final public static  StringACTION_KEY
    
final public static  StringCANCEL_KEY
    
final public static  StringERROR_ACTION_MESSAGES_KEY
    

Provide the default context attribute under which to store the ActionMessage cache for errors.

final public static  StringEXCEPTION_KEY
    
final public static  StringFORWARD_CONFIG_KEY
    
final public static  StringINCLUDE_KEY
    
final public static  StringLOCALE_KEY
    
final public static  StringMESSAGE_ACTION_MESSAGES_KEY
    

Provide the default context attribute under which to store the ActionMessage cache.

final public static  StringMESSAGE_RESOURCES_KEY
    
final public static  StringMODULE_CONFIG_KEY
    
final public static  StringTOKEN_KEY
     Provide the default context attribute under which to store the token key.
final public static  StringTRANSACTION_TOKEN_KEY
     Provide the default context attribute under which to store the transaction token key.
final public static  StringVALID_KEY
    
protected  TokenProcessortoken
     Store the TokenProcessor instance for this Context.

Constructor Summary
public  ActionContextBase(Context context)
     Instantiate ActionContextBase, wrapping the given Context.
public  ActionContextBase()
     Instantiate ActionContextBase, wrapping a default ContextBase instance.

Method Summary
public  voidaddActionMessages(String key, ActionMessages messages)
    

Add the given messages to a cache stored in this Context, under key.

public  voidaddErrors(ActionMessages errors)
    
public  voidaddMessages(ActionMessages messages)
    
public  ActionFormfindOrCreateActionForm(String formName, String scopeName)
    

Using this ActionContext's default ModuleConfig, return an existing ActionForm in the specified scope, or create a new one and add it to the specified scope.

public  ActionFormfindOrCreateActionForm(String formName, String scopeName, ModuleConfig moduleConfig)
    

In the context of the given ModuleConfig and this ActionContext, look for an existing ActionForm in the specified scope.

public  StringgenerateToken()
    
public  ActiongetAction()
    
public  ActionConfiggetActionConfig()
    
public  ActionFormgetActionForm()
    
abstract public  MapgetApplicationScope()
    
public  BooleangetCancelled()
    
public  ActionMessagesgetErrors()
    
public  ExceptiongetException()
    
public  BooleangetFormValid()
    
public  ForwardConfiggetForwardConfig()
    
public  StringgetInclude()
    
public  LocalegetLocale()
    
public  LoggetLogger()
    

Provide the currently configured commons-logging Log instance.

public  MessageResourcesgetMessageResources()
    
public  MessageResourcesgetMessageResources(String key)
    
public  ActionMessagesgetMessages()
    
public  ModuleConfiggetModuleConfig()
    
abstract public  MapgetRequestScope()
    
public  MapgetScope(String scopeName)
    
abstract public  MapgetSessionScope()
    
protected  StringgetTokenGeneratorId()
    
public  booleanisTokenValid()
    
public  booleanisTokenValid(boolean reset)
    
public  voidrelease()
    
public  voidresetToken()
    
public  voidsaveActionMessages(String key, ActionMessages messages)
    

Save the given ActionMessages into the request scope under the given key, clearing the attribute if the messages are empty or null.

public  voidsaveActionMessages(String scopeId, String key, ActionMessages messages)
    
public  voidsaveErrors(ActionMessages errors)
    
public  voidsaveMessages(ActionMessages messages)
    
public  voidsaveMessages(String scope, ActionMessages messages)
    

Adapt a legacy form of SaveMessages to the ActionContext API by storing the ActoinMessages under the default scope.

public  voidsaveToken()
    
public  voidsetAction(Action action)
    
public  voidsetActionConfig(ActionConfig config)
    
public  voidsetActionForm(ActionForm form)
    
public  voidsetCancelled(Boolean cancelled)
    
public  voidsetException(Exception e)
    
public  voidsetFormValid(Boolean valid)
    
public  voidsetForwardConfig(ForwardConfig forward)
    
public  voidsetInclude(String include)
    
public  voidsetLocale(Locale locale)
    
public  voidsetLogger(Log logger)
    

Set the commons-logging Log instance which should be used to LOG messages.

public  voidsetMessageResources(MessageResources messageResources)
    
public  voidsetModuleConfig(ModuleConfig config)
    

Field Detail
ACTION_CONFIG_KEY
final public static String ACTION_CONFIG_KEY(Code)



ACTION_FORM_KEY
final public static String ACTION_FORM_KEY(Code)

See Also:   Constants.ACTION_FORM_KEY



ACTION_KEY
final public static String ACTION_KEY(Code)

See Also:   Constants.ACTION_KEY



CANCEL_KEY
final public static String CANCEL_KEY(Code)

See Also:   Constants.CANCEL_KEY



ERROR_ACTION_MESSAGES_KEY
final public static String ERROR_ACTION_MESSAGES_KEY(Code)

Provide the default context attribute under which to store the ActionMessage cache for errors.




EXCEPTION_KEY
final public static String EXCEPTION_KEY(Code)

See Also:   Constants.EXCEPTION_KEY



FORWARD_CONFIG_KEY
final public static String FORWARD_CONFIG_KEY(Code)

See Also:   Constants.FORWARD_CONFIG_KEY



INCLUDE_KEY
final public static String INCLUDE_KEY(Code)

See Also:   Constants.INCLUDE_KEY



LOCALE_KEY
final public static String LOCALE_KEY(Code)

See Also:   Constants.LOCALE_KEY



MESSAGE_ACTION_MESSAGES_KEY
final public static String MESSAGE_ACTION_MESSAGES_KEY(Code)

Provide the default context attribute under which to store the ActionMessage cache.




MESSAGE_RESOURCES_KEY
final public static String MESSAGE_RESOURCES_KEY(Code)

See Also:   Constants.MESSAGE_RESOURCES_KEY



MODULE_CONFIG_KEY
final public static String MODULE_CONFIG_KEY(Code)

See Also:   Constants.MODULE_CONFIG_KEY



TOKEN_KEY
final public static String TOKEN_KEY(Code)
Provide the default context attribute under which to store the token key.



TRANSACTION_TOKEN_KEY
final public static String TRANSACTION_TOKEN_KEY(Code)
Provide the default context attribute under which to store the transaction token key.



VALID_KEY
final public static String VALID_KEY(Code)

See Also:   Constants.VALID_KEY



token
protected TokenProcessor token(Code)
Store the TokenProcessor instance for this Context.




Constructor Detail
ActionContextBase
public ActionContextBase(Context context)(Code)
Instantiate ActionContextBase, wrapping the given Context.
Parameters:
  context - Context to wrap



ActionContextBase
public ActionContextBase()(Code)
Instantiate ActionContextBase, wrapping a default ContextBase instance.




Method Detail
addActionMessages
public void addActionMessages(String key, ActionMessages messages)(Code)

Add the given messages to a cache stored in this Context, under key.


Parameters:
  key - The attribute name for the message cache
Parameters:
  messages - The ActionMessages to add



addErrors
public void addErrors(ActionMessages errors)(Code)



addMessages
public void addMessages(ActionMessages messages)(Code)



findOrCreateActionForm
public ActionForm findOrCreateActionForm(String formName, String scopeName) throws IllegalAccessException, InstantiationException(Code)

Using this ActionContext's default ModuleConfig, return an existing ActionForm in the specified scope, or create a new one and add it to the specified scope.


Parameters:
  formName - The name attribute of our ActionForm
Parameters:
  scopeName - The scope identier (request, session) The ActionForm for this request
throws:
  IllegalAccessException - If object cannot be created
throws:
  InstantiationException - If object cannot be created
See Also:    this.findOrCreateActionForm(String, String, ModuleConfig)



findOrCreateActionForm
public ActionForm findOrCreateActionForm(String formName, String scopeName, ModuleConfig moduleConfig) throws IllegalAccessException, InstantiationException(Code)

In the context of the given ModuleConfig and this ActionContext, look for an existing ActionForm in the specified scope. If one is found, return it; otherwise, create a new instance, add it to that scope, and then return it.


Parameters:
  formName - The name attribute of our ActionForm
Parameters:
  scopeName - The scope identier (request, session) The ActionForm for this request
throws:
  IllegalAccessException - If object cannot be created
throws:
  InstantiationException - If object cannot be created
throws:
  IllegalArgumentException - If form config is missing from moduleor scopeName is invalid



generateToken
public String generateToken()(Code)



getAction
public Action getAction()(Code)



getActionConfig
public ActionConfig getActionConfig()(Code)



getActionForm
public ActionForm getActionForm()(Code)



getApplicationScope
abstract public Map getApplicationScope()(Code)



getCancelled
public Boolean getCancelled()(Code)



getErrors
public ActionMessages getErrors()(Code)



getException
public Exception getException()(Code)



getFormValid
public Boolean getFormValid()(Code)



getForwardConfig
public ForwardConfig getForwardConfig()(Code)



getInclude
public String getInclude()(Code)



getLocale
public Locale getLocale()(Code)



getLogger
public Log getLogger()(Code)

Provide the currently configured commons-logging Log instance.

Log instance for this context



getMessageResources
public MessageResources getMessageResources()(Code)



getMessageResources
public MessageResources getMessageResources(String key)(Code)



getMessages
public ActionMessages getMessages()(Code)



getModuleConfig
public ModuleConfig getModuleConfig()(Code)



getRequestScope
abstract public Map getRequestScope()(Code)



getScope
public Map getScope(String scopeName)(Code)



getSessionScope
abstract public Map getSessionScope()(Code)



getTokenGeneratorId
protected String getTokenGeneratorId()(Code)



isTokenValid
public boolean isTokenValid()(Code)



isTokenValid
public boolean isTokenValid(boolean reset)(Code)



release
public void release()(Code)



resetToken
public void resetToken()(Code)



saveActionMessages
public void saveActionMessages(String key, ActionMessages messages)(Code)

Save the given ActionMessages into the request scope under the given key, clearing the attribute if the messages are empty or null.


Parameters:
  key - The attribute name for the message cache
Parameters:
  messages - The ActionMessages to add



saveActionMessages
public void saveActionMessages(String scopeId, String key, ActionMessages messages)(Code)

Save the given messages into the map identified by the given scopeId under the given key.


Parameters:
  scopeId -
Parameters:
  key -
Parameters:
  messages -



saveErrors
public void saveErrors(ActionMessages errors)(Code)



saveMessages
public void saveMessages(ActionMessages messages)(Code)



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

Adapt a legacy form of SaveMessages to the ActionContext API by storing the ActoinMessages under the default scope.
Parameters:
  scope - The scope for the internal cache
Parameters:
  messages - ActionMesssages to cache




saveToken
public void saveToken()(Code)



setAction
public void setAction(Action action)(Code)



setActionConfig
public void setActionConfig(ActionConfig config)(Code)



setActionForm
public void setActionForm(ActionForm form)(Code)



setCancelled
public void setCancelled(Boolean cancelled)(Code)



setException
public void setException(Exception e)(Code)



setFormValid
public void setFormValid(Boolean valid)(Code)



setForwardConfig
public void setForwardConfig(ForwardConfig forward)(Code)



setInclude
public void setInclude(String include)(Code)



setLocale
public void setLocale(Locale locale)(Code)



setLogger
public void setLogger(Log logger)(Code)

Set the commons-logging Log instance which should be used to LOG messages. This is initialized at instantiation time but may be overridden. Be advised not to set the value to null, as ActionContextBase uses the logger for some of its own operations.




setMessageResources
public void setMessageResources(MessageResources messageResources)(Code)



setModuleConfig
public void setModuleConfig(ModuleConfig config)(Code)



Methods inherited from org.apache.struts.chain.contexts.ContextWrapper
public void clear()(Code)(Java Doc)
public boolean containsKey(Object o)(Code)(Java Doc)
public boolean containsValue(Object o)(Code)(Java Doc)
public Set entrySet()(Code)(Java Doc)
public Object get(Object key)(Code)(Java Doc)
protected Context getBaseContext()(Code)(Java Doc)
public boolean isEmpty()(Code)(Java Doc)
public Set keySet()(Code)(Java Doc)
public Object put(Object key, Object value)(Code)(Java Doc)
public void putAll(Map map)(Code)(Java Doc)
public Object remove(Object key)(Code)(Java Doc)
public int size()(Code)(Java Doc)
public Collection values()(Code)(Java Doc)

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.