public class AlertServlet
extends javax.servlet.http.HttpServlet
| Modifier and Type | Field and Description | 
|---|---|
| private static DbHelper | _dbHelperThe _db helper. | 
| private static java.lang.String | _dbNameThe _db name. | 
| private static java.lang.String | _driverNameThe _driver name. | 
| private static java.lang.String | _hostNameThe _host name. | 
| protected static org.apache.log4j.Logger | _loggerThe _logger. | 
| private static java.lang.String | _passwordStringThe _password string. | 
| private static java.util.Properties | _propsThe _props. | 
| private static java.lang.String | _userNameThe _user name. | 
| private static long | serialVersionUIDThe Constant serialVersionUID. | 
| Constructor and Description | 
|---|
| AlertServlet()Instantiates a new alert servlet. | 
| Modifier and Type | Method and Description | 
|---|---|
| private void | addAlert(java.lang.String arg,
        java.io.Writer out)Adds the alert. | 
| private void | createAlertXmlList(java.io.Writer out)Creates the alert xml list. | 
| private void | deleteAlert(java.lang.String arg,
           java.io.Writer out)Delete alert. | 
| private void | determineResult(java.lang.String arg,
               java.io.Writer out)Determine result. | 
| void | doGet(javax.servlet.http.HttpServletRequest req,
     javax.servlet.http.HttpServletResponse rsp)Generate the REST interface for alerts. | 
| static void | main(java.lang.String[] args)The main method. | 
| private void | outputPrettyXml(org.dom4j.Document doc,
               java.io.Writer out)Output pretty xml. | 
| private void | setup()Setup database access | 
| private void | showAlert(java.lang.String arg,
         java.io.Writer out)Show alert. | 
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, serviceprivate static final long serialVersionUID
private static DbHelper _dbHelper
private static java.util.Properties _props
private static java.lang.String _hostName
private static java.lang.String _dbName
private static java.lang.String _driverName
private static java.lang.String _userName
private static java.lang.String _passwordString
protected static org.apache.log4j.Logger _logger
private void setup()
private void outputPrettyXml(org.dom4j.Document doc,
                   java.io.Writer out)
doc - the dom4j Document that contains the  DOMout - the Writer that displays the xml/htmlprivate void createAlertXmlList(java.io.Writer out)
out - the Writer that displays the xml/htmlprivate void addAlert(java.lang.String arg,
            java.io.Writer out)
arg - the String containing the parameters of the alert (/AddAlert/uid=abc123&source=Foo&target=Bar&description=one, two, three...")out - the Writer that displays the xml/htmlprivate void showAlert(java.lang.String arg,
             java.io.Writer out)
arg - the parameters (/AddAlert/uid=abc123&source=Foo&target=Bar&description=one, two, three...")out - the Writer that displays the xml/htmlprivate void deleteAlert(java.lang.String arg,
               java.io.Writer out)
arg - the parameters (/AddAlert/uid=abc123&source=Foo&target=Bar&description=one, two, three...")out - the Writer that displays the xml/htmlprivate void determineResult(java.lang.String arg,
                   java.io.Writer out)
arg - the parameters (/AddAlert/uid=abc123&source=Foo&target=Bar&description=one, two, three...")out - the Writer that displays the xml/htmlpublic void doGet(javax.servlet.http.HttpServletRequest req,
         javax.servlet.http.HttpServletResponse rsp)
doGet in class javax.servlet.http.HttpServletreq - the HttpServletRequestrsp - the HttpServletResponsepublic static void main(java.lang.String[] args)
args - the arguments