public abstract class TVCAction
extends com.technia.tvc.struts.action.Action
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLIENT_TASK_ERROR |
static java.lang.String |
CLIENT_TASK_ERROR_KEY |
static java.lang.String |
CLIENT_TASK_NOTICE_KEY |
static java.lang.String |
CLIENT_TASK_WARNING_KEY |
static java.lang.String |
GLOBAL_ERROR_KEY |
static java.lang.String |
INFORMATION_ERROR
Property used to save errors that are more like information to the user,
rather than error messages.
|
| Constructor and Description |
|---|
TVCAction() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addError(javax.servlet.http.HttpServletRequest request,
java.lang.String property,
com.technia.tvc.struts.action.ActionError error)
Add an error to the previously saved errors.
|
protected void |
addError(javax.servlet.http.HttpServletRequest request,
java.lang.String property,
java.lang.String key)
Add an error to the previously saved errors.
|
protected com.technia.tvc.struts.action.ActionErrors |
addErrors(javax.servlet.http.HttpServletRequest request,
com.technia.tvc.struts.action.ActionErrors errors)
Adds the error instance in the specified errors instance to the
previously saved errors.
|
protected void |
addGlobalError(javax.servlet.http.HttpServletRequest request,
com.technia.tvc.struts.action.ActionError error)
Add a global error to the previously saved errors.
|
protected void |
addGlobalError(javax.servlet.http.HttpServletRequest request,
java.lang.String key)
Add a global error to the previously saved errors.
|
protected void |
addInformationError(javax.servlet.http.HttpServletRequest request,
java.lang.String key)
Add an
information error to the previously
saved errors. |
protected com.technia.tvc.struts.action.ActionError |
asActionError(TVCException e)
Convert the specified TVCException into an ActionError.
|
protected com.technia.tvc.struts.action.ActionErrors |
asActionErrors(matrix.db.ClientTaskList ctl)
Convert the specified list of ClientTasks into ActionErrors.
|
protected com.technia.tvc.struts.action.ActionErrors |
copy(com.technia.tvc.struts.action.ActionErrors ae1,
com.technia.tvc.struts.action.ActionErrors ae2)
Copy errors from the ActionErrors instance with less errors to
the ActionErrors with more errors.
|
protected void |
debugRequest(com.technia.tvc.log4j.Logger l,
javax.servlet.http.HttpServletRequest request)
Prints the parameters and the corresponding values of those from the
current request to the provided logger.
|
com.technia.tvc.struts.action.ActionForward |
execute(com.technia.tvc.struts.action.ActionMapping mapping,
com.technia.tvc.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
abstract com.technia.tvc.struts.action.ActionForward |
executeImpl(com.technia.tvc.struts.action.ActionMapping mapping,
com.technia.tvc.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This method MUST be overridden by subclasses to handle the logic.
|
protected com.technia.tvc.struts.action.ActionForward |
findErrorForward(javax.servlet.http.HttpServletRequest request,
com.technia.tvc.struts.action.ActionMapping mapping)
This method returns the ActionForward instance referring to the
predefined error forward.
|
protected com.technia.tvc.struts.action.ActionForward |
findForwardOrTargetPage(javax.servlet.http.HttpServletRequest request,
com.technia.tvc.struts.action.ActionMapping mapping,
java.lang.String forwardName)
This method returns an ActionForward instance referring to the
requested view.
|
com.technia.tvc.struts.action.ActionForward |
perform(com.technia.tvc.struts.action.ActionMapping mapping,
com.technia.tvc.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
com.technia.tvc.struts.action.ActionForward |
perform(com.technia.tvc.struts.action.ActionMapping mapping,
com.technia.tvc.struts.action.ActionForm form,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response) |
protected void |
saveError(javax.servlet.http.HttpServletRequest request,
java.lang.String property,
com.technia.tvc.struts.action.ActionError error)
Save an error to the request object.
|
protected void |
saveError(javax.servlet.http.HttpServletRequest request,
java.lang.String property,
java.lang.String key)
Save an error to the request object.
|
protected void |
saveGlobalError(javax.servlet.http.HttpServletRequest request,
com.technia.tvc.struts.action.ActionError error)
Save a global error to the request object.
|
protected void |
saveGlobalError(javax.servlet.http.HttpServletRequest request,
java.lang.String key)
Save a global error to the request object.
|
protected void |
saveInformationError(javax.servlet.http.HttpServletRequest request,
java.lang.String key)
Save an
information error to the request
object. |
protected void |
setLocale(javax.servlet.http.HttpServletRequest request,
java.util.Locale locale) |
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setServletpublic static final java.lang.String INFORMATION_ERROR
public static final java.lang.String CLIENT_TASK_ERROR
public static final java.lang.String CLIENT_TASK_NOTICE_KEY
public static final java.lang.String CLIENT_TASK_WARNING_KEY
public static final java.lang.String CLIENT_TASK_ERROR_KEY
public static final java.lang.String GLOBAL_ERROR_KEY
protected void setLocale(javax.servlet.http.HttpServletRequest request,
java.util.Locale locale)
setLocale in class com.technia.tvc.struts.action.Actionprotected void saveError(javax.servlet.http.HttpServletRequest request,
java.lang.String property,
com.technia.tvc.struts.action.ActionError error)
request - the current request.property - the property that the error is bound to.error - the error to save.protected void saveGlobalError(javax.servlet.http.HttpServletRequest request,
com.technia.tvc.struts.action.ActionError error)
request - the current request.error - the error to save.protected void saveError(javax.servlet.http.HttpServletRequest request,
java.lang.String property,
java.lang.String key)
request - the current request.property - the property that the error is bound to.key - the key of the error message.protected void saveGlobalError(javax.servlet.http.HttpServletRequest request,
java.lang.String key)
request - the current request.key - the key of the error message.protected void saveInformationError(javax.servlet.http.HttpServletRequest request,
java.lang.String key)
information error to the request
object. All errors previously saved will be discarded.request - the current request.key - the key of the error message.protected void addError(javax.servlet.http.HttpServletRequest request,
java.lang.String property,
com.technia.tvc.struts.action.ActionError error)
request - the current request.property - the property that the error is bound to.error - the error to add.protected void addGlobalError(javax.servlet.http.HttpServletRequest request,
com.technia.tvc.struts.action.ActionError error)
request - the current request.error - the error to add.protected void addError(javax.servlet.http.HttpServletRequest request,
java.lang.String property,
java.lang.String key)
request - the current request.property - the property that the error is bound to.key - the key of the error message.protected void addGlobalError(javax.servlet.http.HttpServletRequest request,
java.lang.String key)
request - the current request.key - the key of the error message.protected void addInformationError(javax.servlet.http.HttpServletRequest request,
java.lang.String key)
information error to the previously
saved errors.request - the current request.key - the key of the error message.protected com.technia.tvc.struts.action.ActionErrors addErrors(javax.servlet.http.HttpServletRequest request,
com.technia.tvc.struts.action.ActionErrors errors)
request - the current request.errors - the errors to add.protected com.technia.tvc.struts.action.ActionErrors copy(com.technia.tvc.struts.action.ActionErrors ae1,
com.technia.tvc.struts.action.ActionErrors ae2)
ae1 - the first ActionErrors instance.ae2 - the second ActionErrors instance.protected com.technia.tvc.struts.action.ActionForward findForwardOrTargetPage(javax.servlet.http.HttpServletRequest request,
com.technia.tvc.struts.action.ActionMapping mapping,
java.lang.String forwardName)
request - the current request.mapping - the current action mapping.forwardName - the name of the default forward.protected com.technia.tvc.struts.action.ActionForward findErrorForward(javax.servlet.http.HttpServletRequest request,
com.technia.tvc.struts.action.ActionMapping mapping)
request - the current request.mapping - the current action mapping.protected void debugRequest(com.technia.tvc.log4j.Logger l,
javax.servlet.http.HttpServletRequest request)
protected com.technia.tvc.struts.action.ActionErrors asActionErrors(matrix.db.ClientTaskList ctl)
ctl - The list of ClientTasks.protected com.technia.tvc.struts.action.ActionError asActionError(TVCException e)
e - The TVCException.public abstract com.technia.tvc.struts.action.ActionForward executeImpl(com.technia.tvc.struts.action.ActionMapping mapping,
com.technia.tvc.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
java.lang.Exceptionpublic final com.technia.tvc.struts.action.ActionForward execute(com.technia.tvc.struts.action.ActionMapping mapping,
com.technia.tvc.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
execute in class com.technia.tvc.struts.action.Actionjava.lang.Exceptionpublic final com.technia.tvc.struts.action.ActionForward perform(com.technia.tvc.struts.action.ActionMapping mapping,
com.technia.tvc.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
java.io.IOExceptionjavax.servlet.ServletExceptionpublic final com.technia.tvc.struts.action.ActionForward perform(com.technia.tvc.struts.action.ActionMapping mapping,
com.technia.tvc.struts.action.ActionForm form,
javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
java.io.IOExceptionjavax.servlet.ServletExceptionCopyright ? Technia AB. All Rights Reserved.