| 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 String | STOP_POPULATE_ATTRIBUTE This is a request attribute flag we use to tell the request processor not
to populate the form from the request. |
Method Summary | |
public void | clear(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 String | execute(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 ActionForward | execute(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 MaskAuthenticator | getAuthenticator()
This mask authenticator will be used to confirm whether or not the user
should be allowed to continue. | final protected String | getFromRequestOrForm(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 String | getFromRequestOrForm(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 String | getInputMask(HttpServletRequest request, Object form)
This method ascertains the correct input mask to use. | final protected String | getListMask(HttpServletRequest request, Object form)
This method ascertains the correct list mask to use. | protected MaskFactory | getMaskFactory()
This factory is needed to access the masks and groups of masks. | final protected boolean | isCancelled(HttpServletRequest request) | public String | onConfirm(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 String | onDelete(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 String | onDeleteWarn(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 void | setLogin(boolean loginParam)
Set to true by LoginAction to indicate the
user name should not be checked. |
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.
|
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. |
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" ActionForward if 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. |
|
|