Java Doc for MaskAction.java in  » Development » ivatamasks » com » ivata » mask » web » struts » 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 » Development » ivatamasks » com.ivata.mask.web.struts 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.ivata.mask.web.struts.MaskAction

All known Subclasses:   com.ivata.mask.web.struts.FindAction,  com.ivata.mask.web.struts.NewAction,  com.ivata.mask.web.struts.InputMaskAction,  com.ivata.mask.web.struts.ListAction,
MaskAction
abstract public class MaskAction extends Action (Code)

Every Action in the system derives from this class, making it possible to centralize logging instantiation, and check we have a valid intranet session.


since:
   ivata masks 0.4 (2002-11-10)
author:
   Colin MacLeod
author:
   colin.macleod@ivata.com
version:
   $Revision: 1.18 $


Field Summary
final public static  StringSTOP_POPULATE_ATTRIBUTE
     This is a request attribute flag we use to tell the request processor not to populate the form from the request.

Constructor Summary
public  MaskAction(MaskFactory maskFactoryParam, MaskAuthenticator authenticatorParam)
    

Construct a mask action, with the given authenticator.


Method Summary
public  voidclear(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, HttpSession session, ClientSession clientSession)
    

Called when the clear button is pressed, or after an ok or delete button, where the session should be restored to its default state.


Parameters:
  mapping - The ActionMapping used to select this instance.
Parameters:
  form - optional ActionForm bean for this request (if any)
Parameters:
  request - non-HTTP request we are processing
Parameters:
  response - The non-HTTP response we are creating
Parameters:
  session - returned from the request parameter.
Parameters:
  clientSession - This client session is stored by the form tag,and returned via a request parameter.
public  Stringexecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, HttpSession session, ClientSession clientSession)
    

Called from the other execute method, this can be overridden by each subclass to provide the ivata -specific processing required.


Parameters:
  mapping - The ActionMapping used to select this instance.
Parameters:
  form - optional ActionForm bean for this request (if any)
Parameters:
  request - non-HTTP request we are processing
Parameters:
  response - The non-HTTP response we are creating
Parameters:
  session - returned from the request parameter.
Parameters:
  clientSession - TODO
throws:
  SystemException - if there is any problem which prevents processing.
public  ActionForwardexecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    

Generic method called by the Struts interface.

Process the specified HTTP request, and create the corresponding HTTP response.

protected  MaskAuthenticatorgetAuthenticator()
    

This mask authenticator will be used to confirm whether or not the user should be allowed to continue.

final protected  StringgetFromRequestOrForm(String name, HttpServletRequest request, ActionForm form)
    

Helper method to see if the parameter with the given name is set in the request and, if not, if it is set in the form provided.


Parameters:
  name - the name of the parameter to look for.
Parameters:
  request - servlet request to look for the parameter in.
Parameters:
  form - the form to search for the parameter, if it is not found inthe request.
final protected  StringgetFromRequestOrForm(String name, HttpServletRequest request, ActionForm form, String defaultValue)
    

Helper method to see if the parameter with the given name is set in the request and, if not, if it is set in the form provided.


Parameters:
  name - the name of the parameter to look for.
Parameters:
  request - servlet request to look for the parameter in.
Parameters:
  form - the form to search for the parameter, if it is not found inthe request.
Parameters:
  defaultValue - If the value cannot be found in either form orrequest, then this value is used.
final protected  StringgetInputMask(HttpServletRequest request, Object form)
    

This method ascertains the correct input mask to use.

final protected  StringgetListMask(HttpServletRequest request, Object form)
    

This method ascertains the correct list mask to use.

protected  MaskFactorygetMaskFactory()
    

This factory is needed to access the masks and groups of masks.

final protected  booleanisCancelled(HttpServletRequest request)
    
public  StringonConfirm(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, HttpSession session, ClientSession clientSession, String defaultForward)
    

This method is called if the ok or apply buttons are pressed.


Parameters:
  mapping - The ActionMapping used to select this instance.
Parameters:
  form - optional ActionForm bean for this request (if any)
Parameters:
  request - non-HTTP request we are processing
Parameters:
  response - The non-HTTP response we are creating
Parameters:
  session - returned from the request parameter.
Parameters:
  clientSession - TODO
Parameters:
  defaultForward - "ok" if the Ok buttonwas pressed, otherwise "apply" if the Apply buttonwas pressed.
throws:
  SystemException - if there is any problem which prevents processing.
public  StringonDelete(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, HttpSession session, ClientSession clientSession, String defaultForward)
    

This method is called if the delete (confirm, not warn) button is pressed.


Parameters:
  mapping - The ActionMapping used to select this instance.
Parameters:
  form - optional ActionForm bean for this request (if any)
Parameters:
  request - non-HTTP request we are processing
Parameters:
  response - The non-HTTP response we are creating
Parameters:
  session - returned from the request parameter.
Parameters:
  clientSession - TODO
Parameters:
  defaultForward - usually "delete".
public  StringonDeleteWarn(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, HttpSession session, String defaultForward)
    

This method is called if the delete warning button is pressed.

final public  voidsetLogin(boolean loginParam)
    

Set to true by LoginAction to indicate the user name should not be checked.


Field Detail
STOP_POPULATE_ATTRIBUTE
final public static String STOP_POPULATE_ATTRIBUTE(Code)
This is a request attribute flag we use to tell the request processor not to populate the form from the request. We do this so we can forward from one request to the next without the form being submitted on the chained action too.




Constructor Detail
MaskAction
public MaskAction(MaskFactory maskFactoryParam, MaskAuthenticator authenticatorParam)(Code)

Construct a mask action, with the given authenticator.


Parameters:
  maskFactoryParam - This factory is needed to access the masks and groups ofmasks.
Parameters:
  authenticatorParam - used to confirm whether or not the user should be allowed tocontinue, in the execute method.




Method Detail
clear
public void clear(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, HttpSession session, ClientSession clientSession) throws SystemException(Code)

Called when the clear button is pressed, or after an ok or delete button, where the session should be restored to its default state.


Parameters:
  mapping - The ActionMapping used to select this instance.
Parameters:
  form - optional ActionForm bean for this request (if any)
Parameters:
  request - non-HTTP request we are processing
Parameters:
  response - The non-HTTP response we are creating
Parameters:
  session - returned from the request parameter.
Parameters:
  clientSession - This client session is stored by the form tag,and returned via a request parameter. You can use it to store a numberof attributes, specific to the request.
throws:
  SystemException - if there is any problem which prevents processing. It willresult in the webapp being forwarded to the standard errorpage.



execute
public String execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, HttpSession session, ClientSession clientSession) throws SystemException(Code)

Called from the other execute method, this can be overridden by each subclass to provide the ivata -specific processing required.


Parameters:
  mapping - The ActionMapping used to select this instance.
Parameters:
  form - optional ActionForm bean for this request (if any)
Parameters:
  request - non-HTTP request we are processing
Parameters:
  response - The non-HTTP response we are creating
Parameters:
  session - returned from the request parameter.
Parameters:
  clientSession - TODO
throws:
  SystemException - if there is any problem which prevents processing. It willresult in the webapp being forwarded to the standard errorpage. this method returns the string used to identify the correctStruts ActionForward whichshould follow this page, or null if it shouldreturn to the input.



execute
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)

Generic method called by the Struts interface.

Process the specified HTTP request, and create the corresponding HTTP response. Return an ActionForward instance describing where and how control should be forwarded, or null if the response has already been completed.


Parameters:
  mapping - Action mapping for this action (from Struts config).
Parameters:
  form - The optional ActionForm bean for this request (if any)
Parameters:
  request - Current request we are processing.
Parameters:
  response - Current response we are processing.
exception:
  Exception - If the application business logic throws anexception. this method returns a "success"ActionForwardif the compose session is cancelled or successfully sent,otherwise a "failure"ActionForward.
throws:
  SystemException -



getAuthenticator
protected MaskAuthenticator getAuthenticator()(Code)

This mask authenticator will be used to confirm whether or not the user should be allowed to continue.

Returns the authenticator.



getFromRequestOrForm
final protected String getFromRequestOrForm(String name, HttpServletRequest request, ActionForm form) throws SystemException(Code)

Helper method to see if the parameter with the given name is set in the request and, if not, if it is set in the form provided.


Parameters:
  name - the name of the parameter to look for.
Parameters:
  request - servlet request to look for the parameter in.
Parameters:
  form - the form to search for the parameter, if it is not found inthe request. value from the request parameter with the name given. If that isnull, then the value of the form attribute is returned, ornull if there is no parameter or form attributewith the given name.
throws:
  SystemException - if there is an InvocationTargetException or anIllegalAccessException accessing theparameter.



getFromRequestOrForm
final protected String getFromRequestOrForm(String name, HttpServletRequest request, ActionForm form, String defaultValue) throws SystemException(Code)

Helper method to see if the parameter with the given name is set in the request and, if not, if it is set in the form provided.


Parameters:
  name - the name of the parameter to look for.
Parameters:
  request - servlet request to look for the parameter in.
Parameters:
  form - the form to search for the parameter, if it is not found inthe request.
Parameters:
  defaultValue - If the value cannot be found in either form orrequest, then this value is used. The value from the request parameter with the name given. Ifthat is null, then the value of the form attribute is returned, ordefaultValue if there is no parameter or formattribute with the given name.
throws:
  SystemException - if there is an InvocationTargetException or anIllegalAccessException accessing theparameter.



getInputMask
final protected String getInputMask(HttpServletRequest request, Object form) throws SystemException(Code)

This method ascertains the correct input mask to use. First it looks for an override in the request, then it looks for a parameter in the current form before finally using the default.


Parameters:
  request - servlet request we are processing. A request parameter will befirst checked here.
Parameters:
  form - the form currently being processed. If there is no requestparameter, the property "inputMask" is read from theform. string representing the action to perform for the current inputmask.
throws:
  SystemException - if the input mask cannot be retrieved.



getListMask
final protected String getListMask(HttpServletRequest request, Object form) throws SystemException(Code)

This method ascertains the correct list mask to use. First it looks for an override in the request, then it looks for a parameter in the current form before finally using the default.


Parameters:
  request - servlet request we are processing. A request parameter will befirst checked here.
Parameters:
  form - the form currently being processed. If there is no requestparameter, the property "listMask" is read from theform. string representing the action to perform for the current listmask.
throws:
  SystemException - if the list mask cannot be retrieved.



getMaskFactory
protected MaskFactory getMaskFactory()(Code)

This factory is needed to access the masks and groups of masks.

Returns the maskFactory, used to access masks and groups ofmasks.



isCancelled
final protected boolean isCancelled(HttpServletRequest request)(Code)
Not sure why I needed to override this!
Parameters:
  request -



onConfirm
public String onConfirm(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, HttpSession session, ClientSession clientSession, String defaultForward) throws SystemException(Code)

This method is called if the ok or apply buttons are pressed.


Parameters:
  mapping - The ActionMapping used to select this instance.
Parameters:
  form - optional ActionForm bean for this request (if any)
Parameters:
  request - non-HTTP request we are processing
Parameters:
  response - The non-HTTP response we are creating
Parameters:
  session - returned from the request parameter.
Parameters:
  clientSession - TODO
Parameters:
  defaultForward - "ok" if the Ok buttonwas pressed, otherwise "apply" if the Apply buttonwas pressed.
throws:
  SystemException - if there is any problem which prevents processing. It willresult in the webapp being forwarded to the standard errorpage. this method returns the string used to identify the correctStruts ActionForward whichshould follow this page, or null if it shouldreturn to the input.



onDelete
public String onDelete(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, HttpSession session, ClientSession clientSession, String defaultForward) throws SystemException(Code)

This method is called if the delete (confirm, not warn) button is pressed.


Parameters:
  mapping - The ActionMapping used to select this instance.
Parameters:
  form - optional ActionForm bean for this request (if any)
Parameters:
  request - non-HTTP request we are processing
Parameters:
  response - The non-HTTP response we are creating
Parameters:
  session - returned from the request parameter.
Parameters:
  clientSession - TODO
Parameters:
  defaultForward - usually "delete". This is the forwardit is suggested you use, if everything is ok.
exception:
  SystemException - if there is any problem which prevents processing. It willresult in the webapp being forwarded to the standard errorpage. this method returns the string used to identify the correctStruts ActionForward whichshould follow this page, or null if it shouldreturn to the input.



onDeleteWarn
public String onDeleteWarn(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, HttpSession session, String defaultForward) throws SystemException(Code)

This method is called if the delete warning button is pressed. It allows you to perform processing before the user is asked to confirm the deletion.


Parameters:
  mapping - The ActionMapping used to select this instance.
Parameters:
  form - optional ActionForm bean for this request (if any)
Parameters:
  request - non-HTTP request we are processing
Parameters:
  response - The non-HTTP response we are creating
Parameters:
  session - returned from the request parameter.
Parameters:
  defaultForward - usually "delete". This is the forwardit is suggested you use, if everything is ok.
exception:
  SystemException - if there is any problem which prevents processing. It willresult in the webapp being forwarded to the standard errorpage. this method returns the string used to identify the correctStruts ActionForward whichshould follow this page, or null if it shouldreturn to the input.



setLogin
final public void setLogin(boolean loginParam)(Code)

Set to true by LoginAction to indicate the user name should not be checked.


Parameters:
  loginParam - the new value of login.



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