|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--com.arsdigita.acs.Parameters
Class to handle ACS parameters, loaded on server startup. Parameters are stored and accessed via static methods
EXPECTS: IniFileName servlet init parameter: points to an .xml file with ACS parameters
We chose to make the ACS parameters a separate XML file, rather than putting them in web.xml, because it allows us to make a more convenient syntax for having parameters with multiple (i.e., lists of) values. It also maintains some separation between things that are web-server specific, and the things that are specific to ACS and server-independent.
| Constructor Summary | |
Parameters()
|
|
| Method Summary | |
static String |
get(String param,
String module)
Gets a parameter as a String. |
static String |
get(String param,
String module,
String def)
Gets a parameter as a String. |
static boolean |
getBoolean(String param,
String module)
Gets a parameter as a boolean primitive |
static boolean |
getBoolean(String param,
String module,
boolean def)
Gets a parameter as a boolean primitive |
static Enumeration |
getInitClasses()
Returns an enumeration of classes that need to be loaded at server start-up to invoke static initializers. |
static int |
getInt(String param,
String module)
Gets a parameter as a boolean primitive |
static int |
getInt(String param,
String module,
int def)
Gets a parameter as an int primitive |
static Object |
getObject(String param,
String module)
Gets a parameter as an Object. |
static Object |
getObject(String param,
String module,
Object def)
Gets a parameter as an Object. |
static Vector |
getVector(String param,
String module)
Gets a list of parameter values as a Vector. |
void |
init()
Calls readParameters at start-up. |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public Parameters()
| Method Detail |
public static Object getObject(String param,
String module,
Object def)
param - The parametermodule - The module name (may be empty or null)def - Default if not found
public static Object getObject(String param,
String module)
param - The parametermodule - The module name (may be empty or null)
public static String get(String param,
String module,
String def)
param - The parametermodule - The module name (may be empty or null)def - Default value
public static String get(String param,
String module)
param - The parametermodule - The module name (may be empty or null)
public static Vector getVector(String param,
String module)
param - The parameter name
public static boolean getBoolean(String param,
String module,
boolean def)
param - The parametermodule - The module name (may be empty or null)def - Default value
public static boolean getBoolean(String param,
String module)
param - The parametermodule - The module name (may be empty or null)
public static int getInt(String param,
String module,
int def)
param - The parametermodule - The module name (may be empty or null)def - Default value
public static int getInt(String param,
String module)
param - The parametermodule - The module name (may be empty or null)
public void init()
throws ServletException
init in class GenericServletjavax.servlet.GenericServletServletException - if an exception occurs that
interrupts the servlet's
normal operationpublic static final Enumeration getInitClasses()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||