Java Doc for ActionBase.java in  » J2EE » Jaffa » org » jaffa » presentation » portlet » 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 » Jaffa » org.jaffa.presentation.portlet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jaffa.presentation.portlet.ActionBase

All known Subclasses:   org.jaffa.presentation.portlet.session.ui.SessionExplorerAction,  org.jaffa.presentation.portlet.StartComponentAction,  org.jaffa.presentation.portlet.widgets.tests.GridAction,  org.jaffa.presentation.portlet.widgets.tests.LookupClientAction,  org.jaffa.presentation.portlet.widgets.tests.FoldingSectionAction,  org.jaffa.presentation.portlet.widgets.tests.LookupAction,  org.jaffa.presentation.portlet.widgets.tests.TextAction,  org.jaffa.presentation.portlet.widgets.tests.CheckBoxAction,  org.jaffa.presentation.portlet.widgets.tests.ImageAction,  org.jaffa.presentation.portlet.widgets.tests.TableAction,  org.jaffa.components.maint.MaintAction,  org.jaffa.components.finder.FinderAction,  org.jaffa.presentation.portlet.widgets.tests.LabelAction,  org.jaffa.presentation.portlet.session.ui.ComponentDetailsAction,  org.jaffa.presentation.portlet.widgets.tests.UserGridAction,  org.jaffa.applications.test.modules.security.components.test1.ui.Page1Action,  org.jaffa.presentation.portlet.widgets.tests.EditBoxAction,  org.jaffa.presentation.portlet.widgets.tests.DateTimeAction,  org.jaffa.presentation.portlet.widgets.tests.DropDownAction,  org.jaffa.presentation.portlet.widgets.tests.TreeAction,  org.jaffa.presentation.portlet.widgets.tests.RadioButtonAction,  org.jaffa.applications.test.modules.material.components.itemfinder.ui.ItemFinderCriteriaAction,  org.jaffa.presentation.portlet.widgets.tests.ButtonAction,  org.jaffa.presentation.portlet.session.ui.ComponentExplorerAction,  org.jaffa.applications.test.modules.material.components.itemfinder.ui.ItemFinderResultsAction,
ActionBase
public class ActionBase extends Action (Code)
This is the base class for all 'Action' classes


Field Summary
protected  Componentcomponent
    
protected  ActionFormform
    
protected  ActionMappingmapping
    
protected  HttpServletRequestrequest
    
protected  HttpServletResponseresponse
    


Method Summary
protected  FormKeydefaultAction()
     The default action method which should be overriden by the extending class.
protected  FormKeydetermineCurrentFormKey(FormBase formBase)
     Determines the currentFormKey, if possible, utilising the NAME field (if defined) and the componentId of the formBase.
Parameters:
  formBase - The input FormBean from which the current FormKey is to be determined.
public  FormKeydo_HistoryNav_Clicked(String index)
     This is the handler for the event generated in the historyNav for rendering a previous screen.
Parameters:
  index - The index for the screen to be rendered.
public  FormKeydo_refresh()
     Determines the currentFormKey, if possible, utilising the NAME field (if defined) and the componentId of the formBase.
public  ActionForwardexecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
     Check the eventId & invoke the suitable method which will return the FormKey.
protected  FormKeyexecuteEvent(String eventId)
     This method will introspect this class for a suitable handler for the input eventId and invoke it.
Parameters:
  eventId - The event.
throws:
  Exception - If any error occurs in introspection or invocation of the event-handler.
protected  ActionForwardhandleNullFormKey()
     This is invoked whenever a null FormKey is returned by an event handler. This will kill the UserSession, if the config property 'PROP_SECURITY_PORTLET_INVALIDATE_SESSION_BEFORE_REDIRECTING_TO_FINAL_URL' is set to true. It will then redirect to the root of this webapp '/'.
throws:
  Exception - if any error occurs.
protected  booleanisTokenValid(HttpServletRequest request)
     Return true if there is a transaction token stored in the component, and the value submitted as a request parameter with this action matches it.
protected  booleanisTokenValid(HttpServletRequest request, boolean reset)
     Return true if there is a transaction token stored in the component, and the value submitted as a request parameter with this action matches it.
protected  StringparseFormName(String formName)
     This will parse the input FormName for parameters and set them as attributes on the request stream. It will then return the FormName minus the parameters.
Parameters:
  formName - The input FormName.
throws:
  UnsupportedEncodingException - This will be thrown if the JVM doesn't support the 'UTF-8' encoding.
protected  voidperformTokenValidation(HttpServletRequest request)
     This merely invokes the isTokenValid() method and throws the ApplicationExceptions if the validation fails.
protected  FormKeyprocessContainerFormKey(FormKey fk)
     Returns the ContainerFormKey, if the component specified by the input FormKey has one defined. For such a component a FormKeyChangeEvent will be sent to the registered FormKeyChangeListeners.
Parameters:
  fk - The input FormKey.
protected  voidresetToken(HttpServletRequest request)
     Reset the saved transaction token in the component.
protected  voidsaveToken(FormKey fk)
     Save a new transaction token in the component.

Field Detail
component
protected Component component(Code)
The optional component for this request (if any)



form
protected ActionForm form(Code)
The optional ActionForm bean for this request (if any)



mapping
protected ActionMapping mapping(Code)
The ActionMapping used to select this instance



request
protected HttpServletRequest request(Code)
The HTTP request we are processing



response
protected HttpServletResponse response(Code)
The HTTP response we are creating





Method Detail
defaultAction
protected FormKey defaultAction() throws Exception(Code)
The default action method which should be overriden by the extending class. This method is invoked by the perform() method, if no eventId is passed. If the extending class doesn't provide an implementation of this method, a EventHandlerMissingRuntimeException will be thrown. If all the 'submit' actions send an eventId, then there is no need to provide any implementation for this method.
throws:
  Exception - if the application business logic throws an exception A FormKey instance which describes the current Component & Form



determineCurrentFormKey
protected FormKey determineCurrentFormKey(FormBase formBase)(Code)
Determines the currentFormKey, if possible, utilising the NAME field (if defined) and the componentId of the formBase.
Parameters:
  formBase - The input FormBean from which the current FormKey is to be determined. The current FormKey.



do_HistoryNav_Clicked
public FormKey do_HistoryNav_Clicked(String index)(Code)
This is the handler for the event generated in the historyNav for rendering a previous screen.
Parameters:
  index - The index for the screen to be rendered. The most ancient screen(usually the Home) will be indexed '0' The FormKey for a previous screen.



do_refresh
public FormKey do_refresh()(Code)
Determines the currentFormKey, if possible, utilising the NAME field (if defined) and the componentId of the formBase. This event is invoked when a user changes the settings of the UserGrid in a screen. The FormKey for the Results screen.



execute
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)
Check the eventId & invoke the suitable method which will return the FormKey. It will invoke the defaultAction() method in case the eventId is null. This will throw the EventHandlerMissingRuntimeException in case no method is found.
Parameters:
  mapping - The ActionMapping used to select this instance
Parameters:
  form - The optional ActionForm bean for this request (if any)
Parameters:
  request - The HTTP request we are processing
Parameters:
  response - The HTTP response we are creating
throws:
  Exception - if the application business logic throws an exception An ActionForward instance describing where and how control should be forwarded, or null if the response has already been completed



executeEvent
protected FormKey executeEvent(String eventId) throws Exception(Code)
This method will introspect this class for a suitable handler for the input eventId and invoke it.
Parameters:
  eventId - The event.
throws:
  Exception - If any error occurs in introspection or invocation of the event-handler. The output from the input handler.



handleNullFormKey
protected ActionForward handleNullFormKey() throws Exception(Code)
This is invoked whenever a null FormKey is returned by an event handler. This will kill the UserSession, if the config property 'PROP_SECURITY_PORTLET_INVALIDATE_SESSION_BEFORE_REDIRECTING_TO_FINAL_URL' is set to true. It will then redirect to the root of this webapp '/'.
throws:
  Exception - if any error occurs. The ActionForward representing the redirection to the root of this webapp '/'.



isTokenValid
protected boolean isTokenValid(HttpServletRequest request)(Code)
Return true if there is a transaction token stored in the component, and the value submitted as a request parameter with this action matches it. Else it returns false.
Parameters:
  request - The servlet request we are processing true if there is a transaction token stored in the component, and the value submitted as a request parameter with this action matches it. Else it returns false.



isTokenValid
protected boolean isTokenValid(HttpServletRequest request, boolean reset)(Code)
Return true if there is a transaction token stored in the component, and the value submitted as a request parameter with this action matches it. Else it returns false.
Parameters:
  request - The servlet request we are processing
Parameters:
  reset - Should we reset the token after checking it? true if there is a transaction token stored in the component, and the value submitted as a request parameter with this action matches it. Else it returns false.



parseFormName
protected String parseFormName(String formName) throws UnsupportedEncodingException(Code)
This will parse the input FormName for parameters and set them as attributes on the request stream. It will then return the FormName minus the parameters.
Parameters:
  formName - The input FormName.
throws:
  UnsupportedEncodingException - This will be thrown if the JVM doesn't support the 'UTF-8' encoding. Highly unlikely that this will be thrown. The FormName minus the parameters, if any.



performTokenValidation
protected void performTokenValidation(HttpServletRequest request) throws ApplicationExceptions(Code)
This merely invokes the isTokenValid() method and throws the ApplicationExceptions if the validation fails.
Parameters:
  request - The servlet request we are processing
throws:
  ApplicationExceptions - if the token on the component does not match the token submitted as the request paramter.



processContainerFormKey
protected FormKey processContainerFormKey(FormKey fk)(Code)
Returns the ContainerFormKey, if the component specified by the input FormKey has one defined. For such a component a FormKeyChangeEvent will be sent to the registered FormKeyChangeListeners.
Parameters:
  fk - The input FormKey. The ContainerFormKey, if exists, or just the input FormKey.



resetToken
protected void resetToken(HttpServletRequest request)(Code)
Reset the saved transaction token in the component. This indicates that transactional token checking will not be needed on the next request that is submitted.
Parameters:
  request - The servlet request we are processing



saveToken
protected void saveToken(FormKey fk)(Code)
Save a new transaction token in the component.
Parameters:
  fk - The FormKey from which the component will be determined.



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