|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.struts.action.Action
com.ivata.mask.web.struts.MaskAction
Every Action in the system derives from this class, making it
possible to centralize logging instantiation, and check we have a valid
intranet session.
| Field Summary |
| Fields inherited from class org.apache.struts.action.Action |
defaultLocale, servlet |
| Constructor Summary | |
MaskAction(com.ivata.mask.MaskFactory maskFactoryParam,
MaskAuthenticator authenticatorParam)
Construct a mask action, with the given authenticator. |
|
| Method Summary | |
void |
clear(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionErrors errors,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpSession session)
Called when the clear button is pressed, or after an ok or delete button, where the session should be restored to its default state. |
java.lang.String |
execute(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionErrors errors,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpSession session)
Called from the other execute method, this can be
overridden by each subclass to provide the ivata -specific
processing required. |
org.apache.struts.action.ActionForward |
execute(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Generic method called by the Struts interface. |
protected MaskAuthenticator |
getAuthenticator()
This mask authenticator will be used to confirm whether or not the user should be allowed to continue. |
protected java.lang.String |
getFromRequestOrForm(java.lang.String name,
javax.servlet.http.HttpServletRequest request,
org.apache.struts.action.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. |
protected java.lang.String |
getFromRequestOrForm(java.lang.String name,
javax.servlet.http.HttpServletRequest request,
org.apache.struts.action.ActionForm form,
java.lang.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. |
protected java.lang.String |
getInputMask(javax.servlet.http.HttpServletRequest request,
java.lang.Object form)
This method ascertains the correct input mask to use. |
protected java.lang.String |
getListMask(javax.servlet.http.HttpServletRequest request,
java.lang.Object form)
This method ascertains the correct list mask to use. |
protected com.ivata.mask.MaskFactory |
getMaskFactory()
This factory is needed to access the masks and groups of masks. |
protected boolean |
isCancelled(javax.servlet.http.HttpServletRequest request)
Not sure why I needed to override this! Refer to Action.isCancelled(javax.servlet.http.HttpServletRequest). |
java.lang.String |
onConfirm(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionErrors errors,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpSession session,
java.lang.String defaultForward)
This method is called if the ok or apply buttons are pressed. |
java.lang.String |
onDelete(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionErrors errors,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpSession session,
java.lang.String defaultForward)
This method is called if the delete (confirm, not warn) button is pressed. |
void |
setLogin(boolean loginParam)
Set to true by LoginAction to indicate the
user name should not be checked. |
| Methods inherited from class org.apache.struts.action.Action |
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MaskAction(com.ivata.mask.MaskFactory maskFactoryParam,
MaskAuthenticator authenticatorParam)
Construct a mask action, with the given authenticator.
maskFactoryParam - This factory is needed to access the masks and groups of
masks.authenticatorParam - used to confirm whether or not the user should be allowed to
continue, in the execute method.| Method Detail |
public void clear(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionErrors errors,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpSession session)
throws com.ivata.mask.util.SystemException
Called when the clear button is pressed, or after an ok or delete button, where the session should be restored to its default state.
mapping - The ActionMapping used to select this instance.errors - valid errors object to append errors to. If there are any
errors, the action will return to the input.form - optional ActionForm bean for this request (if any)request - non-HTTP request we are processingresponse - The non-HTTP response we are creatingsession - returned from the request parameter.
com.ivata.mask.util.SystemException - if there is any problem which prevents processing. It will
result in the webapp being forwarded to the standard error
page.
public java.lang.String execute(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionErrors errors,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpSession session)
throws com.ivata.mask.util.SystemException
Called from the other execute method, this can be
overridden by each subclass to provide the ivata -specific
processing required.
mapping - The ActionMapping used to select this instance.errors - valid errors object to append errors to. If there are any
errors, the action will return to the input.form - optional ActionForm bean for this request (if any)request - non-HTTP request we are processingresponse - The non-HTTP response we are creatingsession - returned from the request parameter.
ActionForward which
should follow this page, or null if it should
return to the input.
com.ivata.mask.util.SystemException - if there is any problem which prevents processing. It will
result in the webapp being forwarded to the standard error
page.
public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
Generic method called by the Struts interface.
Process the specified HTTP request, and create the corresponding HTTP
response. Return an ActionForwardinstance describing where and
how control should be forwarded, or null if the response
has already been completed.
mapping - The ActionMapping used to select this instanceform - The optional ActionForm bean for this request (if any)request - The non-HTTP request we are processingresponse - The non-HTTP response we are creating
"success"
ActionForward
if the compose session is cancelled or successfully sent,
otherwise a "failure"
ActionForward.
java.lang.Exception - if the application business logic throws an exceptionprotected MaskAuthenticator getAuthenticator()
This mask authenticator will be used to confirm whether or not the user should be allowed to continue.
protected final java.lang.String getFromRequestOrForm(java.lang.String name,
javax.servlet.http.HttpServletRequest request,
org.apache.struts.action.ActionForm form)
throws com.ivata.mask.util.SystemException
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.
name - the name of the parameter to look for.request - servlet request to look for the parameter in.form - the form to search for the parameter, if it is not found in
the request.
null if there is no parameter or form attribute
with the given name.
com.ivata.mask.util.SystemException - if there is an InvocationTargetException or an
IllegalAccessException accessing the
parameter.
protected final java.lang.String getFromRequestOrForm(java.lang.String name,
javax.servlet.http.HttpServletRequest request,
org.apache.struts.action.ActionForm form,
java.lang.String defaultValue)
throws com.ivata.mask.util.SystemException
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.
name - the name of the parameter to look for.request - servlet request to look for the parameter in.form - the form to search for the parameter, if it is not found in
the request.
defaultValue if there is no parameter or form
attribute with the given name.
com.ivata.mask.util.SystemException - if there is an InvocationTargetException or an
IllegalAccessException accessing the
parameter.
protected final java.lang.String getInputMask(javax.servlet.http.HttpServletRequest request,
java.lang.Object form)
throws com.ivata.mask.util.SystemException
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.
request - servlet request we are processing. A request parameter will be
first checked here.form - the form currently being processed. If there is no request
parameter, the property "inputMask" is read from the
form.
com.ivata.mask.util.SystemException - if the input mask cannot be retrieved.
protected final java.lang.String getListMask(javax.servlet.http.HttpServletRequest request,
java.lang.Object form)
throws com.ivata.mask.util.SystemException
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.
request - servlet request we are processing. A request parameter will be
first checked here.form - the form currently being processed. If there is no request
parameter, the property "listMask" is read from the
form.
com.ivata.mask.util.SystemException - if the list mask cannot be retrieved.protected com.ivata.mask.MaskFactory getMaskFactory()
This factory is needed to access the masks and groups of masks.
protected final boolean isCancelled(javax.servlet.http.HttpServletRequest request)
Action.isCancelled(javax.servlet.http.HttpServletRequest).
request - Refer to Action.isCancelled(javax.servlet.http.HttpServletRequest).
Action.isCancelled(javax.servlet.http.HttpServletRequest).Action.isCancelled(javax.servlet.http.HttpServletRequest)
public java.lang.String onConfirm(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionErrors errors,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpSession session,
java.lang.String defaultForward)
throws com.ivata.mask.util.SystemException
This method is called if the ok or apply buttons are pressed.
mapping - The ActionMapping used to select this instance.errors - valid errors object to append errors to. If there are any
errors, the action will return to the input.form - optional ActionForm bean for this request (if any)request - non-HTTP request we are processingresponse - The non-HTTP response we are creatingsession - returned from the request parameter.defaultForward - "ok" if the Ok button
was pressed, otherwise "apply" if the Apply button
was pressed.
ActionForward which
should follow this page, or null if it should
return to the input.
com.ivata.mask.util.SystemException - if there is any problem which prevents processing. It will
result in the webapp being forwarded to the standard error
page.
public java.lang.String onDelete(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionErrors errors,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpSession session,
java.lang.String defaultForward)
throws com.ivata.mask.util.SystemException
This method is called if the delete (confirm, not warn) button is pressed.
mapping - The ActionMapping used to select this instance.errors - valid errors object to append errors to. If there are any
errors, the action will return to the input.form - optional ActionForm bean for this request (if any)request - non-HTTP request we are processingresponse - The non-HTTP response we are creatingsession - returned from the request parameter.defaultForward - usually "delete". This is the forward
it is suggested you use, if everything is ok.
ActionForward which
should follow this page, or null if it should
return to the input.
com.ivata.mask.util.SystemException - if there is any problem which prevents processing. It will
result in the webapp being forwarded to the standard error
page.public final void setLogin(boolean loginParam)
Set to true by LoginAction to indicate the
user name should not be checked.
loginParam - the new value of login.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||