org.opengts.extra.war.service
Class Service

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.opengts.war.tools.CommonServlet
              extended by org.opengts.extra.war.service.Service
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, ServiceXML

public class Service
extends CommonServlet
implements ServiceXML

See Also:
Serialized Form

Nested Class Summary
static class Service.CommandHandler
           
static class Service.CustomCommandHandler
           
 
Field Summary
static java.lang.String PARM_ACCOUNT
           
static java.lang.String PARM_REQSTATE
           
static java.lang.String PARM_USER
           
 
Fields inherited from class org.opengts.war.tools.CommonServlet
CSS_ADMIN_COMBO_BOX, CSS_ADMIN_SELECT_TABLE, CSS_ADMIN_SELECT_TITLE, CSS_ADMIN_TABLE_BODY_COL, CSS_ADMIN_TABLE_BODY_COL_SEL, CSS_ADMIN_TABLE_BODY_ROW_EVEN, CSS_ADMIN_TABLE_BODY_ROW_ODD, CSS_ADMIN_TABLE_HEADER_COL, CSS_ADMIN_TABLE_HEADER_COL_NS, CSS_ADMIN_TABLE_HEADER_COL_SEL, CSS_ADMIN_TABLE_HEADER_ROW, CSS_ADMIN_VIEW_TABLE, CSS_ADMIN_VIEW_TABLE_DATA, CSS_ADMIN_VIEW_TABLE_HEADER, CSS_ADMIN_VIEW_TABLE_TEXTAREA, CSS_CONTENT_FRAME, CSS_CONTENT_MAP, CSS_CONTENT_MAP_FULL, CSS_CONTENT_MENU, CSS_CONTENT_MESSAGE, CSS_MENU_DESCRIPTION, CSS_MENU_INSTRUCTIONS, CSS_MENU_TITLE, CSS_MENUBAR_OK, CSS_MESSAGE, CSS_TEXT_INPUT, CSS_TEXT_ONCLICK, CSS_TEXT_READONLY, CSS_TEXTAREA_INPUT, CSS_TEXTAREA_READONLY, DEFAULT_HOST_PROPERTIES_ID, HOST_PROPERTIES, HOST_PROPERTIES_ID, ID_CONTENT_MESSAGE, PARM_ARGUMENT, PARM_COMMAND, PARM_CONTENT, PARM_LOCALE, PARM_PAGE, SECTION_BANNER_IMAGE, SECTION_BANNER_IMAGE_HEIGHT, SECTION_BANNER_IMAGE_SOURCE, SECTION_BANNER_IMAGE_WIDTH, SECTION_BANNER_STYLE, SECTION_BANNER_WIDTH, SECTION_BODY_ONLOAD, SECTION_BODY_ONUNLOAD, SECTION_CONTENT_BODY, SECTION_CONTENT_CLASS_CELL, SECTION_CONTENT_CLASS_MESSAGE, SECTION_CONTENT_CLASS_TABLE, SECTION_CONTENT_HTML, SECTION_CONTENT_ID_MESSAGE, SECTION_CONTENT_MENUBAR, SECTION_CONTENT_MESSAGE, SECTION_CSSFILE, SECTION_JAVASCRIPT, SECTION_NAVIGATION, SECTION_PAGE_NAME, SECTION_PAGE_URL, SECTION_REQUESTPROPS, SECTION_STYLESHEET
 
Fields inherited from interface org.opengts.extra.service.ServiceXML
ATTR_account, ATTR_arg, ATTR_arg0, ATTR_arg1, ATTR_arg2, ATTR_arg3, ATTR_arg4, ATTR_arg5, ATTR_arg6, ATTR_arg7, ATTR_args_, ATTR_auth, ATTR_code, ATTR_command, ATTR_eval, ATTR_format, ATTR_index, ATTR_key, ATTR_locale, ATTR_name, ATTR_offset, ATTR_option, ATTR_parameter, ATTR_partial, ATTR_password, ATTR_reportGroupTag, ATTR_reportJobID, ATTR_result, ATTR_shadowSize, ATTR_shadowUrl, ATTR_size, ATTR_table, ATTR_timezone, ATTR_type, ATTR_url, ATTR_urlOnly, ATTR_user, CMD_commands, CMD_custom, CMD_dbcreate, CMD_dbdel, CMD_dbget, CMD_dbput, CMD_dbschema, CMD_devcmd, CMD_eventdata, CMD_mapdata, CMD_messages, CMD_propget, CMD_pushpins, CMD_report, CMD_reportlist, CMD_statuscodes, CMD_version, JMXServiceObjectName, TAG_Ascending, TAG_Authorization, TAG_AutoIndex, TAG_Column, TAG_Columns, TAG_Command, TAG_Commands, TAG_Comment, TAG_CreationFromMS, TAG_CreationToMS, TAG_CustomCommand, TAG_Device, TAG_DeviceCommand, TAG_DeviceGroup, TAG_EmailAddress, TAG_EventData, TAG_Field, TAG_GPSRequired, TAG_GTSRequest, TAG_GTSResponse, TAG_Limit, TAG_MapData, TAG_MenuDescription, TAG_Message, TAG_Messages, TAG_Property, TAG_Pushpin, TAG_Pushpins, TAG_Record, TAG_RecordKey, TAG_Report, TAG_ReportItem, TAG_ReportJob, TAG_ReportList, TAG_StatusCode, TAG_Subtitle, TAG_TableSchema, TAG_TimeFrom, TAG_TimeTo, TAG_Title, TAG_Version, TAG_Where
 
Constructor Summary
Service()
           
 
Method Summary
protected static boolean _isAuthorizedDevice(DBRecordKey rcdKey, Account account, User user)
           
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 java.lang.String handleRequest(java.lang.String xmlReqStr)
           
 java.lang.String handleRequest(java.lang.String xmlReqStr, java.lang.String authAcctID, java.lang.String authUserID, java.lang.String authPasswd)
           
static void main(java.lang.String[] argv)
           
protected static DBRecordKey parseDBRecordKey(boolean isSoapReq, java.io.PrintWriter pw, java.lang.String cmd, org.w3c.dom.Element childElem, java.lang.String authAcctID, java.lang.String authUserID)
           
static void writeMessageResponse(boolean isSoapReq, java.io.PrintWriter pw, java.lang.String cmd, ServiceMessage msg, java.lang.String comment)
           
 
Methods inherited from class org.opengts.war.tools.CommonServlet
println, setResponseContentType, setResponseContentType, writeHTML, writePageFrame, writePageFrame
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARM_ACCOUNT

public static final java.lang.String PARM_ACCOUNT
See Also:
Constant Field Values

PARM_USER

public static final java.lang.String PARM_USER
See Also:
Constant Field Values

PARM_REQSTATE

public static final java.lang.String PARM_REQSTATE
See Also:
Constant Field Values
Constructor Detail

Service

public Service()
Method Detail

writeMessageResponse

public static void writeMessageResponse(boolean isSoapReq,
                                        java.io.PrintWriter pw,
                                        java.lang.String cmd,
                                        ServiceMessage msg,
                                        java.lang.String comment)
                                 throws java.io.IOException
Throws:
java.io.IOException

_isAuthorizedDevice

protected static boolean _isAuthorizedDevice(DBRecordKey rcdKey,
                                             Account account,
                                             User user)
                                      throws DBException
Throws:
DBException

parseDBRecordKey

protected static DBRecordKey parseDBRecordKey(boolean isSoapReq,
                                              java.io.PrintWriter pw,
                                              java.lang.String cmd,
                                              org.w3c.dom.Element childElem,
                                              java.lang.String authAcctID,
                                              java.lang.String authUserID)
                                       throws java.io.IOException
Throws:
java.io.IOException

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws javax.servlet.ServletException,
                   java.io.IOException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

handleRequest

public java.lang.String handleRequest(java.lang.String xmlReqStr)

handleRequest

public java.lang.String handleRequest(java.lang.String xmlReqStr,
                                      java.lang.String authAcctID,
                                      java.lang.String authUserID,
                                      java.lang.String authPasswd)

main

public static void main(java.lang.String[] argv)