|
IT.CappuccinoNet StrutsCX v0.8.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.cappuccinonet.strutscx.action.StrutsCXBaseActionHelper
This class helps to keep the BaseAction cleaner and is responsible to set and check a couple parameters to the HttpServletRequest, the HttpSession or the ServletContext.
ServletContext:
HttpSession:
HttpServletRequest:
The reason for doing all this is, that we do need
serialize some of these parameters into the output XML
document. Check out the
XSLTDocumentBuilder for more details on this.
Caching & Performance Tuning:
The variables for the view are read once at first call to the
BaseAction and saved in the ServletContext.
NOTE: To affect changes to them the Servlet Engine need to be restarted.
| Field Summary | |
private java.lang.String |
dateToday
The date today. |
private static Logger |
logger
The logger - it is visible to all subclasses. |
private java.lang.String |
THIS_CLASS
A String with this Classname used for system messages |
private java.lang.String |
thisYear
The actual year. |
| Constructor Summary | |
StrutsCXBaseActionHelper()
|
|
| Method Summary | |
java.lang.String |
getCharset(HttpServletRequest request,
com.oreilly.javaxml2.XMLProperties properties,
java.util.Locale locale)
Sets the users prefered charset to the request. |
private java.lang.String |
getDateToday(HttpSession session,
java.util.Locale locale)
Gets the date today. |
int |
getEntryId(HttpServletRequest request)
Reads the entryId Parameter out of the request and writes it back to it as a Attribute. |
java.util.Locale |
getLocale(HttpServletRequest request,
HttpSession session)
Updates the Locale. |
java.lang.String |
getPersisttype(HttpServletRequest request,
com.oreilly.javaxml2.XMLProperties properties)
EXPERIMENTAL: Method getPersisttype. |
java.lang.String |
getViewtype(HttpServletRequest request,
com.oreilly.javaxml2.XMLProperties properties)
EXPERIMENTAL: Method getViewtype. |
private java.lang.String |
getYear(HttpSession session)
Gets the actual year. |
private void |
loadRessourcePropertiesFiles(ServletConfig config,
com.oreilly.javaxml2.XMLProperties properties)
This method loads all variables files we pointed to in the properties.xml and saves them under an unique identifier in the ServletContext. |
void |
setBasicDomainParameters(HttpServletRequest request,
HttpSession session,
ServletConfig config,
com.oreilly.javaxml2.XMLProperties properties)
A convenience method which combines call to a couple of other methodes to set and check the parameters into the ServletContext and the HttpSession. |
void |
setDateStrings(HttpSession session,
java.util.Locale locale)
A convenience method which does nothing else than calling the getDateToday() and the getYear() methods. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.lang.String THIS_CLASS
private static Logger logger
private java.lang.String dateToday
private java.lang.String thisYear
| Constructor Detail |
public StrutsCXBaseActionHelper()
| Method Detail |
public void setBasicDomainParameters(HttpServletRequest request,
HttpSession session,
ServletConfig config,
com.oreilly.javaxml2.XMLProperties properties)
throws StrutsCXException
See above for a list of parameters this method organizes.
request - the HttpServletRequestsession - the HttpSessionconfig - the ServletConfigproperties - the XMLProperties
StrutsCXExceptionStrutsCXConstants,
StrutsCXPropertiesReaderpublic int getEntryId(HttpServletRequest request)
request - the HttpServletRequest
StrutsCXConstants
private java.lang.String getDateToday(HttpSession session,
java.util.Locale locale)
session - locale -
StrutsCXDateString,
StrutsCXConstants
public void setDateStrings(HttpSession session,
java.util.Locale locale)
session - locale - getDateToday,
getYearprivate java.lang.String getYear(HttpSession session)
session - the HttpSession
StrutsCXDateString,
StrutsCXConstants
public java.util.Locale getLocale(HttpServletRequest request,
HttpSession session)
request - the HttpServletRequestsession - the HttpSession
StrutsCXConstants
public java.lang.String getCharset(HttpServletRequest request,
com.oreilly.javaxml2.XMLProperties properties,
java.util.Locale locale)
throws StrutsCXException
request - the HttpServletRequestproperties - the XMLProperties, hence the properties.xmllocale - a string with the locale parameter *
StrutsCXException - if charset value is missing in the properties.xml
public java.lang.String getPersisttype(HttpServletRequest request,
com.oreilly.javaxml2.XMLProperties properties)
Constants class.
request - properties -
public java.lang.String getViewtype(HttpServletRequest request,
com.oreilly.javaxml2.XMLProperties properties)
Constants class.
request - properties -
private void loadRessourcePropertiesFiles(ServletConfig config,
com.oreilly.javaxml2.XMLProperties properties)
throws ServletException
NOTE: Changes to the variables_xx.xml files afford to reload the servlet container!
config - the ServletConfigproperties - the XMLProperties
ServletException - if a servlet exception occurs.
|
IT.CappuccinoNet StrutsCX v0.8.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||