|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.taggercat.Environment
public class Environment
This class provides basic environment information as read from the taggercat.properties file as well as from the application's deployment descriptor.
![]() |
![]() |
![]() |
![]() |
| Constructor Summary | |
|---|---|
Environment(javax.servlet.ServletContext servletContext)
Creates an application environment instance. |
|
| Method Summary | |
|---|---|
void |
destroy()
Release all plug-ins. |
java.lang.String |
getControllerClassName()
Reads requestprocessor.classname from the taggercat configuration file. |
static RequestController |
getRequestControllerInstance(java.lang.String classname)
Creates a new RequestController for the application. |
javax.servlet.ServletContext |
getServletContext()
|
java.lang.String |
getString(java.lang.String key)
Gets value of specified key, searching first in initial parameters (web.xml) and then in ResourceBundle. |
java.lang.String |
getString(java.lang.String key,
java.lang.String defaultValue)
Gets value of specified key, searching first in Servlet's initial parameters (web.xml) and then in ResourceBundle. |
java.lang.String |
getStringFromInitialParameters(java.lang.String key)
Gets value of specified key from context init parameters (web.xml). |
java.lang.String |
getStringFromResourceBundle(java.lang.String key)
Gets value of specified key from locale-specific ResourceBundle (by default, taggercat.properties). |
void |
init(javax.servlet.ServletContext servletContext)
Sets ServletConfig instance. |
void |
initDateFormaters()
Initializes the date and datetime formatters used to parse user entered dates. |
void |
initNumberFormaters()
Initializes the number formatters used to parse user entered numeric values. |
void |
initPlugIns()
Deprecated. |
void |
registerUserDefinedFunctions()
Registers any user defined functions with expression evaluator. |
java.util.Date |
toDate(java.lang.String dateStr,
java.util.TimeZone timezone)
Parses a date string using the formatters initialized in the taggercat.properties file. |
java.util.Date |
toDateTime(java.lang.String dateStr,
java.util.TimeZone timezone)
Parses a date string using the formatters initialized in the taggercat.properties file. |
java.lang.Number |
toNumber(java.lang.String numberStr)
Parses a number string using the formatters initialized in initNumberFormaters(). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Environment(javax.servlet.ServletContext servletContext)
servletContext - this applications servletContext object| Method Detail |
|---|
public java.lang.String getStringFromResourceBundle(java.lang.String key)
key - Name of property to retrieve value for.
public java.lang.String getString(java.lang.String key)
key - Name of property to retrieve value for.
public java.lang.String getStringFromInitialParameters(java.lang.String key)
key - Name of property to retrieve value for.
public java.lang.String getString(java.lang.String key,
java.lang.String defaultValue)
key - Name of property to retrieve value for.defaultValue - use this value if not found.
public void destroy()
public java.lang.String getControllerClassName()
public void init(javax.servlet.ServletContext servletContext)
servletContext - ServletContext instance.public void initDateFormaters()
;---[ Date Formats for Save ]--- date.format1=MMM/dd/yyyy date.format2=MM/dd/yyyy date.format3=yyyy/MMM/dd ;---[ Datetime Formats for Save ]--- datetime.format1=MMM/dd/yyyy HH:mm datetime.format2=MM/dd/yyyy HH:mm datetime.format3=yyyy/MMM/dd HH:mm
public void initNumberFormaters()
;---[ Number Formats for Save ]--- number.format1=$###,###.### number.format2=###,###.### number.format3=### ###,### number.format4=Z###,###.###
public void registerUserDefinedFunctions()
@Deprecated public void initPlugIns()
public java.util.Date toDate(java.lang.String dateStr,
java.util.TimeZone timezone)
dateStr - the date string
public java.util.Date toDateTime(java.lang.String dateStr,
java.util.TimeZone timezone)
dateStr - the date string
public java.lang.Number toNumber(java.lang.String numberStr)
numberStr - the number string
public javax.servlet.ServletContext getServletContext()
public static RequestController getRequestControllerInstance(java.lang.String classname)
throws javax.servlet.ServletException
javax.servlet.ServletException - if the creation failed, with
the root cause exception includedclassname - the class name of the request map
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||