com.quadrique.jbuildingblocks.core.struts.controller.actions
Class JbbAction
java.lang.Object
org.apache.struts.action.Action
com.quadrique.jbuildingblocks.core.struts.controller.actions.JbbAction
- Direct Known Subclasses:
- JbbActionAccessControl
public abstract class JbbAction
- extends org.apache.struts.action.Action
A base class for all struts based actions
|
Method Summary |
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)
|
String |
getBreadcrumbPresentationName()
|
static int |
getMaxNbOfBreadcrumbs()
|
static javax.servlet.http.HttpSession |
getSession(org.apache.struts.action.ActionServlet zServlet,
javax.servlet.http.HttpServletRequest zRequest)
Static method that can be used by both the Action and ActionForms
instances... |
javax.servlet.http.HttpSession |
getSession(javax.servlet.http.HttpServletRequest zRequest)
Non static method that should be called by all the BaseAction subclasses.... |
int |
getValueFromSessionAsInt(javax.servlet.http.HttpServletRequest request,
String key,
boolean removeFromSession)
|
Object |
getValueFromSessionAsObject(javax.servlet.http.HttpServletRequest request,
String key,
boolean removeFromSession)
|
String |
getValueFromSessionAsString(javax.servlet.http.HttpServletRequest request,
String key,
boolean removeFromSession)
|
boolean |
isBreadcrumb()
|
void |
removeFormFromSession(javax.servlet.http.HttpServletRequest request,
org.apache.struts.action.ActionMapping mapping)
|
void |
removeValueFromSession(javax.servlet.http.HttpServletRequest zRequest,
String key)
|
void |
setBreadcrumb(boolean breadcrumb)
|
static void |
setMaxNbOfBreadcrumbs(int maxNbOfBreadcrumbs)
|
void |
setValueInSession(javax.servlet.http.HttpServletRequest zRequest,
String key,
int value)
|
void |
setValueInSession(javax.servlet.http.HttpServletRequest zRequest,
String key,
Object value)
|
void |
setValueInSession(javax.servlet.http.HttpServletRequest request,
String key,
String value)
|
| Methods inherited from class org.apache.struts.action.Action |
execute, getServlet, setServlet |
maxNbOfBreadcrumbs
public static int maxNbOfBreadcrumbs
JbbAction
public JbbAction()
execute
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 Exception
- Overrides:
execute in class org.apache.struts.action.Action
- Throws:
Exception
getSession
public static final javax.servlet.http.HttpSession getSession(org.apache.struts.action.ActionServlet zServlet,
javax.servlet.http.HttpServletRequest zRequest)
throws Exception
- Static method that can be used by both the Action and ActionForms
instances...
- Parameters:
zServlet - zRequest -
- Returns:
- the session
- Throws:
Exception
getSession
public javax.servlet.http.HttpSession getSession(javax.servlet.http.HttpServletRequest zRequest)
throws Exception
- Non static method that should be called by all the BaseAction subclasses....
- Parameters:
zRequest -
- Returns:
- an HttpSession
- Throws:
Exception
removeFormFromSession
public void removeFormFromSession(javax.servlet.http.HttpServletRequest request,
org.apache.struts.action.ActionMapping mapping)
- Parameters:
request - mapping -
setValueInSession
public void setValueInSession(javax.servlet.http.HttpServletRequest request,
String key,
String value)
throws Exception
- Parameters:
request - key - value -
- Throws:
Exception
setValueInSession
public void setValueInSession(javax.servlet.http.HttpServletRequest zRequest,
String key,
int value)
throws Exception
- Parameters:
zRequest - key - value -
- Throws:
Exception
setValueInSession
public void setValueInSession(javax.servlet.http.HttpServletRequest zRequest,
String key,
Object value)
throws Exception
- Parameters:
zRequest - key - value -
- Throws:
Exception
getValueFromSessionAsObject
public Object getValueFromSessionAsObject(javax.servlet.http.HttpServletRequest request,
String key,
boolean removeFromSession)
throws Exception
- Parameters:
request - key - removeFromSession -
- Returns:
- the value as an Object instance
- Throws:
Exception
getValueFromSessionAsInt
public int getValueFromSessionAsInt(javax.servlet.http.HttpServletRequest request,
String key,
boolean removeFromSession)
throws Exception
- Parameters:
request - key - removeFromSession -
- Returns:
- the value as an int, -1 if not found or if the value is not an Integer instance
- Throws:
Exception
getValueFromSessionAsString
public String getValueFromSessionAsString(javax.servlet.http.HttpServletRequest request,
String key,
boolean removeFromSession)
throws Exception
- Parameters:
request - key - removeFromSession -
- Returns:
- the value as an int, null if not found or if the value is not a String instance
- Throws:
Exception
removeValueFromSession
public void removeValueFromSession(javax.servlet.http.HttpServletRequest zRequest,
String key)
throws Exception
- Parameters:
zRequest - key -
- Throws:
Exception
isBreadcrumb
public boolean isBreadcrumb()
- Returns:
setBreadcrumb
public void setBreadcrumb(boolean breadcrumb)
- Parameters:
breadcrumb -
getMaxNbOfBreadcrumbs
public static int getMaxNbOfBreadcrumbs()
- Returns:
setMaxNbOfBreadcrumbs
public static void setMaxNbOfBreadcrumbs(int maxNbOfBreadcrumbs)
- Parameters:
maxNbOfBreadcrumbs -
getBreadcrumbPresentationName
public String getBreadcrumbPresentationName()
- Returns:
Copyright © 2001-2008 Quadrique Corporation. All Rights Reserved.