org.opengts.war.ctracgts
Class Data

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.war.ctracgts.Data
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Data
extends CommonServlet

See Also:
Serialized Form

Nested Class Summary
static class Data.MethodState
           
 
Field Summary
static boolean ALLOW_MULTI_MOBILE_POST
           
static java.lang.String[] APP_LATEST_VERSIONS
           
static java.lang.String COMPILE_DATETIME
           
static long COMPILE_TIMESTAMP
           
static java.lang.String COPYRIGHT
           
static java.lang.String CUSTOM_COMMAND_HANDLER
           
static boolean DEBUG_MODE
           
static java.lang.String[] DEFAULT_UNIQUE_ID_PREFIX
           
static boolean ENABLE_ACCOUNT_LOGIN
           
static boolean ENABLED_GET
           
static boolean ENABLED_POST
           
static boolean ESTIMATE_ODOMETER
           
static java.util.TimeZone GMT
           
static long GTC_DORMANT_INTERVAL
           
static java.lang.String[] GTC_IMPROMPTU_STATUS_CODES
           
static java.lang.String[] GTC_LATEST_VERSIONS
           
static long GTC_MIN_XMIT_INTERVAL
           
static long GTC_MOVING_INTERVAL
           
static boolean IGNORE_INVALID_GPS_FLAG
           
static double MAXIMUM_ACCURACY_METERS
           
static double MAXIMUM_HDOP
           
static long MIN_TIMESTAMP
           
static double MINIMUM_MOVED_METERS
           
static double MINIMUM_SPEED_KPH
           
static double PARK_RADIUS_DEFAULT
           
static double PARK_RADIUS_MINIMUM
           
static double PARK_RADIUS_WIDE
           
static double PARK_SPEED_DEFAULT
           
static java.lang.String RESPV_ACCOUNT
           
static java.lang.String RESPV_DEVICE
           
static java.lang.String RESPV_EC
           
static java.lang.String RESPV_MP
           
static java.lang.String RESPV_NEWAPP
           
static java.lang.String RESPV_NEWGTC
           
static java.lang.String RESPV_VER
           
static java.lang.String SERVICE_ID
           
static boolean SHOW_URL
           
static boolean SIMEVENT_GEOZONES
           
static java.lang.String[] UNIQUE_ID_PREFIX
           
static boolean XLATE_LOCATON_INMOTION
           
 
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_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
 
Constructor Summary
Data()
           
 
Method Summary
static java.lang.String DCProp(java.lang.String key)
          Normalize property key
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          "GET"
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handling incoming "POST"
 void init()
          init
static boolean IsDisabled(Data.MethodState ms)
           
static boolean IsEnabled(Data.MethodState ms)
           
static boolean IsRTPOnly(Data.MethodState ms)
           
static Device LoadDevice(javax.servlet.http.HttpServletResponse response, java.lang.String respType, java.lang.String ipAddr, java.lang.String authPin, java.lang.String mobileID, java.lang.String accountID, java.lang.String userID, java.lang.String deviceID)
          Returns the Device record for the specified parameters
static void main(java.lang.String[] argv)
           
static boolean MS_ENABLED_GET()
           
static boolean MS_ENABLED_POST()
           
static Data.MethodState ParseMethodState(java.lang.String val)
          Returns a MethodState enum based on the specified String representation
static void WritePlainTextResponse(javax.servlet.http.HttpServletResponse response, java.lang.String respMsg)
          Send plain text response
 
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, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPILE_DATETIME

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

COMPILE_TIMESTAMP

public static final long COMPILE_TIMESTAMP
See Also:
Constant Field Values

COPYRIGHT

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

SERVICE_ID

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

DEBUG_MODE

public static boolean DEBUG_MODE

SHOW_URL

public static boolean SHOW_URL

ENABLED_GET

public static boolean ENABLED_GET

ENABLED_POST

public static boolean ENABLED_POST

DEFAULT_UNIQUE_ID_PREFIX

public static final java.lang.String[] DEFAULT_UNIQUE_ID_PREFIX

UNIQUE_ID_PREFIX

public static java.lang.String[] UNIQUE_ID_PREFIX

MINIMUM_SPEED_KPH

public static double MINIMUM_SPEED_KPH

ESTIMATE_ODOMETER

public static boolean ESTIMATE_ODOMETER

SIMEVENT_GEOZONES

public static boolean SIMEVENT_GEOZONES

MINIMUM_MOVED_METERS

public static double MINIMUM_MOVED_METERS

MAXIMUM_HDOP

public static double MAXIMUM_HDOP

MAXIMUM_ACCURACY_METERS

public static double MAXIMUM_ACCURACY_METERS

XLATE_LOCATON_INMOTION

public static boolean XLATE_LOCATON_INMOTION

IGNORE_INVALID_GPS_FLAG

public static boolean IGNORE_INVALID_GPS_FLAG

ENABLE_ACCOUNT_LOGIN

public static boolean ENABLE_ACCOUNT_LOGIN

GTC_IMPROMPTU_STATUS_CODES

public static java.lang.String[] GTC_IMPROMPTU_STATUS_CODES

ALLOW_MULTI_MOBILE_POST

public static boolean ALLOW_MULTI_MOBILE_POST

CUSTOM_COMMAND_HANDLER

public static java.lang.String CUSTOM_COMMAND_HANDLER

PARK_RADIUS_MINIMUM

public static double PARK_RADIUS_MINIMUM

PARK_RADIUS_DEFAULT

public static double PARK_RADIUS_DEFAULT

PARK_RADIUS_WIDE

public static double PARK_RADIUS_WIDE

PARK_SPEED_DEFAULT

public static double PARK_SPEED_DEFAULT

GTC_MIN_XMIT_INTERVAL

public static long GTC_MIN_XMIT_INTERVAL

GTC_MOVING_INTERVAL

public static long GTC_MOVING_INTERVAL

GTC_DORMANT_INTERVAL

public static long GTC_DORMANT_INTERVAL

GTC_LATEST_VERSIONS

public static java.lang.String[] GTC_LATEST_VERSIONS

APP_LATEST_VERSIONS

public static java.lang.String[] APP_LATEST_VERSIONS

MIN_TIMESTAMP

public static final long MIN_TIMESTAMP

GMT

public static final java.util.TimeZone GMT

RESPV_VER

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

RESPV_ACCOUNT

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

RESPV_DEVICE

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

RESPV_EC

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

RESPV_MP

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

RESPV_NEWAPP

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

RESPV_NEWGTC

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

Data

public Data()
Method Detail

DCProp

public static java.lang.String DCProp(java.lang.String key)
Normalize property key


MS_ENABLED_GET

public static boolean MS_ENABLED_GET()

MS_ENABLED_POST

public static boolean MS_ENABLED_POST()

ParseMethodState

public static Data.MethodState ParseMethodState(java.lang.String val)
Returns a MethodState enum based on the specified String representation


IsDisabled

public static boolean IsDisabled(Data.MethodState ms)

IsEnabled

public static boolean IsEnabled(Data.MethodState ms)

IsRTPOnly

public static boolean IsRTPOnly(Data.MethodState ms)

WritePlainTextResponse

public static void WritePlainTextResponse(javax.servlet.http.HttpServletResponse response,
                                          java.lang.String respMsg)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException
Send plain text response

Throws:
javax.servlet.ServletException
java.io.IOException

LoadDevice

public static Device LoadDevice(javax.servlet.http.HttpServletResponse response,
                                java.lang.String respType,
                                java.lang.String ipAddr,
                                java.lang.String authPin,
                                java.lang.String mobileID,
                                java.lang.String accountID,
                                java.lang.String userID,
                                java.lang.String deviceID)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Returns the Device record for the specified parameters

Throws:
javax.servlet.ServletException
java.io.IOException

init

public void init()
          throws javax.servlet.ServletException
init

Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  java.io.IOException
"GET"

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
Handling incoming "POST"

Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

main

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