org.opengts.db
Class DBConfig

java.lang.Object
  extended by org.opengts.db.DBConfig

public class DBConfig
extends java.lang.Object


Nested Class Summary
static interface DBConfig.DBInitialization
          DBInitialization interface
 
Field Summary
static java.lang.String[] ARG_SCHEMA
           
static java.lang.String[] ARG_STATUS
           
static java.lang.String[] ARG_WHERE
           
static java.lang.String AUTHKEYS_CONF
           
static java.lang.String CLASS_RULE_EventRuleFactory
           
static java.lang.String env_GTS_HOME
          The GTS environment variable names
static java.lang.String env_GTS_LOGDIR
           
static java.lang.String env_GTS_PIDDIR
           
static java.lang.String PACKAGE_BCROSS_
           
static java.lang.String PACKAGE_BCROSS_TABLES
           
static java.lang.String PACKAGE_BCROSS_TABLES_
           
static java.lang.String PACKAGE_EXTRA_
           
static java.lang.String PACKAGE_EXTRA_DBTOOLS_
           
static java.lang.String PACKAGE_EXTRA_TABLES_
           
static java.lang.String PACKAGE_EXTRA_WAR_
           
static java.lang.String PACKAGE_OPT
           
static java.lang.String PACKAGE_OPT_
           
static java.lang.String PACKAGE_OPT_AUDIT_
           
static java.lang.String PACKAGE_OPT_TABLES_
           
static java.lang.String PACKAGE_OPT_WAR_
           
static java.lang.String PACKAGE_RULE_
           
static java.lang.String PACKAGE_RULE_TABLES_
           
static java.lang.String PACKAGE_RULE_UTIL_
           
static java.lang.String PACKAGE_WAR_
           
static java.lang.String PACKAGE_WAR_TRACK_
           
static java.lang.String PROP_Account_alwaysAllowWebService
          Runtime Configuration Property
True to always allow web-services for all Accounts
Type: Boolean
static java.lang.String PROP_Account_defaultCurrency
          Runtime Configuration Property
Default Account Currency
Type: String (valid Currency value)
static java.lang.String PROP_Account_defaultCurrencySymbol
          Runtime Configuration Property
Default Account Currency Symbol
Type: String (valid Currency Symbol)
static java.lang.String PROP_Account_defaultTimeZone
          Runtime Configuration Property
Default Account TimeZone
Type: String (valid TimeZone)
static java.lang.String PROP_Account_smsEnabled
          Runtime Configuration Property
Default SMS enabled state
Type: Enum[true|false|account]
static java.lang.String PROP_audit_saveDeviceCommand
          Runtime Configuration Property
SystemAudit save rule trigger notifications.
Type: Boolean
static java.lang.String PROP_audit_saveFailedLogin
          Runtime Configuration Property
SystemAudit save failed login attempts.
Type: Boolean
static java.lang.String PROP_audit_saveReportEmail
          Runtime Configuration Property
SystemAudit save report email.
Type: Boolean
static java.lang.String PROP_audit_saveRuleNotification
          Runtime Configuration Property
SystemAudit save rule trigger notifications.
Type: Boolean
static java.lang.String PROP_audit_saveSuccessfulLogin
          Runtime Configuration Property
SystemAudit save successful login attempts.
Type: Boolean
static java.lang.String PROP_db_defaultDeviceAuthorization
          Runtime Configuration Property
True to allow account/user access to "ALL" device group, if no groups are defined.
Type: Boolean
static java.lang.String PROP_db_defaultDeviceAuthorization_
          Runtime Configuration Property
True to allow account/user access to "ALL" device group, if no groups are defined.
(allows specifying specific Account IDs)
Type: Boolean
static java.lang.String PROP_DCSServer_isRunningInDCS
          Runtime Constant Property (TO BE SET BY RUNNING DCS ONLY)
True if running within a DCS
Type: Boolean
static java.lang.String PROP_Device_checkAccountAllowNotify
          Runtime Configuration Property
True to check Account.getAllowNotify() when checking for allowing Device notification (defaults to false)
Type: Boolean
static java.lang.String PROP_Device_checkLastEventIgnitionState
          Runtime Configuration Property
Returns true if the "Device.getCurrentIgnitionState()" method is allowed to examine the EventData table for ignition state based on status code events.
Type: Integer
static java.lang.String PROP_Device_checkLastOdometer
          Runtime Configuration Property
Check event odometer against previous/last save odometer in Device record
Type: Boolean
static java.lang.String PROP_Device_checkNotifySelector
          Runtime Configuration Property
True to test the rule selector in column Device.notifySelector
Type: Boolean
static java.lang.String PROP_Device_checkNotifySelector_ENRE
           
static java.lang.String PROP_Device_deferCheckEventRules
          Runtime Configuration Property
True to defer "checkEventRules" until AFTER reverse-geocoding
Type: Boolean
static java.lang.String PROP_Device_eventsPerSecond
          Runtime Configuration Property
Device EventsPerSecond calculation properties Type: Array (RangeSeconds,WeightPercent)
static java.lang.String PROP_Device_futureDate_action
          Runtime Configuration Property
Action to perform when an Event date/time is in the future
Type: Enum[disabled|ignore|truncate]
static java.lang.String PROP_Device_futureDate_maximumSec
          Runtime Configuration Property
Maximum number of seconds that an Event date/time must be in the future before the action is performed
Type: Integer
static java.lang.String PROP_Device_invalidSpeed_action
          Runtime Configuration Property
Action to perform when an Event speed is invalid (ie.
static java.lang.String PROP_Device_invalidSpeed_maximumKPH
          Runtime Configuration Property
Maximum speed that an Event may have, beyond which ithe action is performed
(not currently used)
Type: Double
static java.lang.String PROP_Device_keyedLastNotifyTime
          Runtime Configuration Property
True to create an alternate key/index for column Device.lastNotifyTime
(can be used for global "Last Notify Time" lookups)
Type: Boolean
static java.lang.String PROP_Device_keyedSimPhoneNumber
          Runtime Configuration Property
True to create an alternate key/index for column Device.simPhoneNumber
(can be used for "SIM Phone Number" lookups)
Type: Boolean
static java.lang.String PROP_Device_logMissingColumns
          Runtime Configuration Property
Log missing columns on insert/update (defaults to 'true')
Type: Boolean
static java.lang.String PROP_Device_maintenanceDescriptionKM_0
          Runtime Configuration Property
Device Maintenance Descriptions Type: String
static java.lang.String PROP_Device_maintenanceDescriptionKM_1
           
static java.lang.String PROP_Device_maintenanceOdometerCount
          Runtime Configuration Property
Returns the number of periodic maintenance odometer values to support
(must be less-than-or-equal-to the maximum supported by the Device record)
Type: Integer
static java.lang.String PROP_Device_maximumOdometerKM
          Runtime Configuration Property
Maximum odometer value
Type: Double
static java.lang.String PROP_Device_maximumRuntimeHours
          Runtime Configuration Property
Maximum engine-hours value
Type: Double
static java.lang.String PROP_Device_pastDate_action
          Runtime Configuration Property
Action to perform when an Event date/time is in the past
Type: Enum[disabled|ignore|truncate]
static java.lang.String PROP_Device_pastDate_maximumSec
          Runtime Configuration Property
Maximum number of seconds that an Event date/time must be in the past before the action is performed
Type: Integer
static java.lang.String PROP_Device_saveEventDriverID
          Runtime Configuration Property
Returns true to save last non-blank EventData "driverID" into Device record
Type: Boolean
static java.lang.String PROP_Device_simulateEngineHours
          Runtime Configuration Property
Returns true if engine-hours is to be estimated based on a Device's ignition state (EXPERIMENTAL - the accurracy of using this method for estimating engine-hours has not been fully determined).
Type: Boolean
static java.lang.String PROP_Device_updateEventWithGeozoneLoc
          Runtime Configuration Property
Returns true to update the EventData location if the location is invalid, and it specifies a valid GeozoneID.
static java.lang.String PROP_DeviceGroup_checkAccountAllowNotify
          Runtime Configuration Property
True to check Account.getAllowNotify() when checking for allowing DeviceGroup notification (defaults to false)
Type: Boolean
static java.lang.String PROP_DeviceInfo_DeviceCmdAlternate_
          Runtime Configuration Property
Prefix for looking up DeviceInfo.DeviceCmd alternate server IDs
Type: String array
static java.lang.String PROP_EventData_allowInnoDBCountWithWhere
          Runtime Configuration Property
Allow the use of "count(*)" in InnoDB EventData table, if the request has a "WHERE" clause
Type: Boolean
static java.lang.String PROP_EventData_keyedAccountDeviceTime
          Runtime Configuration Property
Create alternate keyed "adtime" in EventData over accountID/deviceID/timestamp
Type: Boolean
static java.lang.String PROP_EventData_keyedCreationTime
          Runtime Configuration Property
Create alternate keyed "creationTime" in EventData
Type: Boolean
static java.lang.String PROP_EventData_lockTableOnRead
          Runtime Configuration Property
Lock EventData table on Read (prevents writes while reading)
Use by MySQL/MyISAM DBProvider only.
static java.lang.String PROP_EventData_logMissingColumns
          Runtime Configuration Property
Log missing columns on insert/update (defaults to 'true')
Type: Boolean
static java.lang.String PROP_EventData_odometerOffsetType
          Runtime Configuration Property
Odometer offset type
Must be one of: DEVICE_ONLY, EVENT_ONLY, BEST(default) Type: String
static java.lang.String PROP_EventFunctionMap_adminAccounts
          Runtime Configuration Property
Comma separated list of account ID that can access "SystemAdminOnly" rule functions.
Type: String
static java.lang.String PROP_EventFunctionMapFactory_class
          Runtime Configuration Property
The name of the overriding Class used to provide the Rule handling EventFunctionMapFactory.
Type: Class
static java.lang.String PROP_EventIdentifierMapFactory_class
          Runtime Configuration Property
The name of the overriding Class used to provide the Rule handling EventIdentifierMapFactory.
Type: Class
static java.lang.String PROP_FuelRegister_ignoreNegativeFuelLevels
          Runtime Configuration Property (optional)
Ignore negative EventData fuel-levels (requires FuelRegister installed).
Type: Boolean
static java.lang.String PROP_FuelRegister_ignoreWhileMoving
          Runtime Configuration Property (optional)
Ignore fuel-levels while moving (requires FuelRegister installed).
Type: Boolean
static java.lang.String PROP_FuelRegister_ignoreZeroFuelLevels
          Runtime Configuration Property (optional)
Ignore zero EventData fuel-levels (requires FuelRegister installed).
Type: Boolean
static java.lang.String PROP_FuelRegister_installFuelManager
          Runtime Configuration Property (optional)
Enable FuelManager checking (requires FuelRegister installed).
Type: Boolean
static java.lang.String PROP_FuelRegister_levelDecreaseThreshold
          Runtime Configuration Property (optional)
The FuelLevel "Decrease" percent threshold (between 0.0 and 1.0 inclusive).
Type: Double
static java.lang.String PROP_FuelRegister_levelIncreaseThreshold
          Runtime Configuration Property (optional)
The FuelLevel "Increase" percent threshold (between 0.0 and 1.0 inclusive).
Type: Double
static java.lang.String PROP_Geozone_alwaysActive
          Runtime Configuration Property
True if all Geozones are to be considered active
Type: Boolean
static java.lang.String PROP_Geozone_dftRadius_pointRadius
          Runtime Configuration Property
Default Radius (in meters) for PointRadius Geozones
Type: Integer
static java.lang.String PROP_Geozone_dftRadius_polygon
          Runtime Configuration Property
Default Radius (in meters) for Polygon Geozones (NOT USED)
Type: Integer
static java.lang.String PROP_Geozone_dftRadius_sweptPointRadius
          Runtime Configuration Property
Default Radius (in meters) for SweptPointRadius Geozones
Type: Integer
static java.lang.String PROP_Geozone_maximumVertices
          Runtime Configuration Property
Maximum number of vertices allowed in a Geozone
Type: Integer
static java.lang.String PROP_Geozone_maxRadius_pointRadius
           
static java.lang.String PROP_Geozone_maxRadius_polygon
           
static java.lang.String PROP_Geozone_maxRadius_sweptPointRadius
           
static java.lang.String PROP_Geozone_minRadius_pointRadius
           
static java.lang.String PROP_Geozone_minRadius_polygon
           
static java.lang.String PROP_Geozone_minRadius_sweptPointRadius
           
static java.lang.String PROP_GoogleKML_pushpinBaseURL
          Runtime Configuration Property
The base URL for Google pushpins
Type: String
static java.lang.String PROP_GTSRequest_url
          Runtime Configuration Property
Required for web-service access.
Type: String See also PROP_track_enableService
static java.lang.String PROP_PendingCommands_keyedSendState
          Runtime Configuration Property (optional)
True to specify a keyed "sendState" column (otherwise non-keyed) (Should also have "db.allowUpdateKeyFields" set true) Type: Boolean
static java.lang.String PROP_RuleList_includeGroupRules
          Runtime Configuration Property (optional)
True to enable checking Device "Group" lookup when triggering rules.
Type: Boolean
static java.lang.String PROP_RuleTrigger_allowClearActiveTrigger
          Runtime Configuration Property (optional)
True to allow clearing an active RuleTrigger when a Rule condition returns "false".
Type: Boolean
static java.lang.String PROP_ServiceAccount_Attr
          Runtime Configuration Property
The customer "Service Account" Attributes
(currently not used)
Type: RTProperties
static java.lang.String PROP_ServiceAccount_ID
          Runtime Configuration Property
The customer "Service Account" ID
Type: String
static java.lang.String PROP_ServiceAccount_Key
          Runtime Configuration Property
The customer "Service Account" Authorization Key
Type: String
static java.lang.String PROP_ServiceAccount_Name
          Runtime Configuration Property
The customer "Service Account" Name/Description
Type: String
static java.lang.String PROP_StartupInit_class
          Runtime Configuration Property
The name of the statup-initialization Class used to initialize custom features
Type: Class
static java.lang.String PROP_SubdivisionProvider_class
          Runtime Configuration Property
The name of the overriding Class used to provide latitude/longitude subdivision data.
Used for Border-Crossing detection.
Type: Class
static java.lang.String PROP_sysAdmin_account
          Runtime Configuration Property
The name of the SystemAdmin Account ID.
Type: String
static java.lang.String PROP_track_baseURI
          Runtime Configuration Property
Base URI used for accesing the GTS login (must match web.xml configuration)
Type: String
static java.lang.String PROP_track_enableService
          Runtime Configuration Property
True to enable web-service access.
Type: Boolean See also PROP_GTSRequest_url
static java.lang.String PROP_track_js_directory
          Runtime Configuration Property
The overriding directory, used to find the JavaScript code.
Type: String
static java.lang.String PROP_track_offlineFile
          Runtime Configuration Property
The file which contains the text to display when the system is 'Offline'.
Type: File
static java.lang.String PROP_track_requireCookies
          Runtime Configuration Property
True to require that cookies be enabled.
If false, session information will be encoded in the URL
Type: Boolean
static java.lang.String PROP_track_service_AccessControlAllowOrigin
          Runtime Configuration Property
Track web-service "Access-Control-Allow-Origin" domain
Type: String
static java.lang.String PROP_track_service_authKey
          Runtime Configuration Property
Track web-service Authroization obfuscation key.
Type: String
static java.lang.String PROP_track_service_commandEnabled_
          Runtime Configuration Property
Track web-service command enabled/disabled prefix.
Type: Boolean
static java.lang.String PROP_track_service_customCommandHandler
          Runtime Configuration Property
Track web-service custom command handler class name.
Type: String
static java.lang.String PROP_track_updateLastLoginTime_account
          Runtime Configuration Property
True to update the User "lastLoginTime" at login.
Type: Boolean
static java.lang.String PROP_track_updateLastLoginTime_user
          Runtime Configuration Property
True to update the User "lastLoginTime" at login.
Type: Boolean
static java.lang.String PROP_Transport_queryEnabled
          Runtime Configuration Property
True to enable Transport table unique-id lookup.
(only required when the Device is separate from the Transport)
Type: Boolean
static java.lang.String PROP_UniqueXID_queryEnabled
          Runtime Configuration Property
True to enable UniqueXID table unique-id lookup.
(only required when the UniqueID is separate from the Device)
Type: Boolean
protected static RTKey.Entry[] runtimeKeys
           
 
Constructor Summary
DBConfig()
           
 
Method Summary
static int _main(java.lang.String[] argv)
          Main entry point for providing command-line DB administration tools
static void addTableFactories()
          Add the standard DBFactories as-is
static java.lang.String AUTHKEY_DCS_CONF(java.lang.String dcs)
           
static boolean check_GTS_HOME()
          Compares the GTS_HOME environment variable to the current directory.
static int cmdLineInit(java.lang.String[] argv, boolean interactive)
          Entry point for various programs/tools which initializes the DBFactories
static java.io.File get_GTS_HOME()
          Gets the GTS_HOME environment variable as a directory.
static java.io.File get_GTS_LOGDIR()
          Gets the GTS_LOGDIR environment variable as a directory.
static java.io.File get_GTS_PIDDIR()
          Gets the GTS_PIDDIR environment variable as a directory.
static boolean GetDefaultDeviceAuthorization(java.lang.String acctID)
          Returns true if the Device group "ALL" is authorized for the specified Account
static java.io.File getEnvironmentDirectory(java.lang.String envVar)
          Returns the specified environment variable as a directory
static java.lang.String getServiceAccountAttributes(java.lang.String dft)
          Return the ServiceAccount Attributes
static java.lang.String getServiceAccountID(java.lang.String dft)
          Return the ServiceAccount ID
static java.lang.String getServiceAccountName(java.lang.String dft)
          Return the ServiceAccount Name
static java.lang.String getVersion()
          Return the GTS build version
static boolean hasBCrossPackage()
          Returns true if the "bcross" package is present
static boolean hasExtraPackage()
          Returns true if the "extra" package is present
static boolean hasOptPackage()
          Returns true if the "opt" package is present
static boolean hasRulePackage()
          Returns true if the "rule" package is present
static void main(java.lang.String[] argv)
          Main entry point for providing command-line DB administration tools
static void servletInit(java.util.Properties srvCtxProps)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PACKAGE_OPT

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

PACKAGE_OPT_

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

PACKAGE_OPT_TABLES_

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

PACKAGE_OPT_AUDIT_

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

PACKAGE_OPT_WAR_

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

PACKAGE_EXTRA_

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

PACKAGE_EXTRA_TABLES_

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

PACKAGE_EXTRA_DBTOOLS_

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

PACKAGE_EXTRA_WAR_

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

PACKAGE_RULE_

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

PACKAGE_RULE_UTIL_

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

PACKAGE_RULE_TABLES_

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

CLASS_RULE_EventRuleFactory

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

PACKAGE_BCROSS_

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

PACKAGE_BCROSS_TABLES

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

PACKAGE_BCROSS_TABLES_

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

PACKAGE_WAR_

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

PACKAGE_WAR_TRACK_

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

AUTHKEYS_CONF

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

PROP_DCSServer_isRunningInDCS

public static final java.lang.String PROP_DCSServer_isRunningInDCS
Runtime Constant Property (TO BE SET BY RUNNING DCS ONLY)
True if running within a DCS
Type: Boolean

See Also:
Constant Field Values

PROP_ServiceAccount_ID

public static final java.lang.String PROP_ServiceAccount_ID
Runtime Configuration Property
The customer "Service Account" ID
Type: String

See Also:
Constant Field Values

PROP_ServiceAccount_Name

public static final java.lang.String PROP_ServiceAccount_Name
Runtime Configuration Property
The customer "Service Account" Name/Description
Type: String

See Also:
Constant Field Values

PROP_ServiceAccount_Attr

public static final java.lang.String PROP_ServiceAccount_Attr
Runtime Configuration Property
The customer "Service Account" Attributes
(currently not used)
Type: RTProperties

See Also:
Constant Field Values

PROP_ServiceAccount_Key

public static final java.lang.String PROP_ServiceAccount_Key
Runtime Configuration Property
The customer "Service Account" Authorization Key
Type: String

See Also:
Constant Field Values

PROP_StartupInit_class

public static final java.lang.String PROP_StartupInit_class
Runtime Configuration Property
The name of the statup-initialization Class used to initialize custom features
Type: Class

See Also:
Constant Field Values

PROP_Account_smsEnabled

public static final java.lang.String PROP_Account_smsEnabled
Runtime Configuration Property
Default SMS enabled state
Type: Enum[true|false|account]

See Also:
Constant Field Values

PROP_Account_defaultTimeZone

public static final java.lang.String PROP_Account_defaultTimeZone
Runtime Configuration Property
Default Account TimeZone
Type: String (valid TimeZone)

See Also:
Constant Field Values

PROP_Account_defaultCurrency

public static final java.lang.String PROP_Account_defaultCurrency
Runtime Configuration Property
Default Account Currency
Type: String (valid Currency value)

See Also:
Constant Field Values

PROP_Account_defaultCurrencySymbol

public static final java.lang.String PROP_Account_defaultCurrencySymbol
Runtime Configuration Property
Default Account Currency Symbol
Type: String (valid Currency Symbol)

See Also:
Constant Field Values

PROP_Account_alwaysAllowWebService

public static final java.lang.String PROP_Account_alwaysAllowWebService
Runtime Configuration Property
True to always allow web-services for all Accounts
Type: Boolean

See Also:
Constant Field Values

PROP_Device_pastDate_action

public static final java.lang.String PROP_Device_pastDate_action
Runtime Configuration Property
Action to perform when an Event date/time is in the past
Type: Enum[disabled|ignore|truncate]

See Also:
Constant Field Values

PROP_Device_pastDate_maximumSec

public static final java.lang.String PROP_Device_pastDate_maximumSec
Runtime Configuration Property
Maximum number of seconds that an Event date/time must be in the past before the action is performed
Type: Integer

See Also:
Constant Field Values

PROP_Device_futureDate_action

public static final java.lang.String PROP_Device_futureDate_action
Runtime Configuration Property
Action to perform when an Event date/time is in the future
Type: Enum[disabled|ignore|truncate]

See Also:
Constant Field Values

PROP_Device_futureDate_maximumSec

public static final java.lang.String PROP_Device_futureDate_maximumSec
Runtime Configuration Property
Maximum number of seconds that an Event date/time must be in the future before the action is performed
Type: Integer

See Also:
Constant Field Values

PROP_Device_invalidSpeed_action

public static final java.lang.String PROP_Device_invalidSpeed_action
Runtime Configuration Property
Action to perform when an Event speed is invalid (ie. < '0', or > max km/h)
(not currently used)
Type: Enum[disabled|ignore|truncate]

See Also:
Constant Field Values

PROP_Device_invalidSpeed_maximumKPH

public static final java.lang.String PROP_Device_invalidSpeed_maximumKPH
Runtime Configuration Property
Maximum speed that an Event may have, beyond which ithe action is performed
(not currently used)
Type: Double

See Also:
Constant Field Values

PROP_Device_checkLastOdometer

public static final java.lang.String PROP_Device_checkLastOdometer
Runtime Configuration Property
Check event odometer against previous/last save odometer in Device record
Type: Boolean

See Also:
Constant Field Values

PROP_Device_maximumOdometerKM

public static final java.lang.String PROP_Device_maximumOdometerKM
Runtime Configuration Property
Maximum odometer value
Type: Double

See Also:
Constant Field Values

PROP_Device_maximumRuntimeHours

public static final java.lang.String PROP_Device_maximumRuntimeHours
Runtime Configuration Property
Maximum engine-hours value
Type: Double

See Also:
Constant Field Values

PROP_Device_keyedSimPhoneNumber

public static final java.lang.String PROP_Device_keyedSimPhoneNumber
Runtime Configuration Property
True to create an alternate key/index for column Device.simPhoneNumber
(can be used for "SIM Phone Number" lookups)
Type: Boolean

See Also:
Constant Field Values

PROP_Device_keyedLastNotifyTime

public static final java.lang.String PROP_Device_keyedLastNotifyTime
Runtime Configuration Property
True to create an alternate key/index for column Device.lastNotifyTime
(can be used for global "Last Notify Time" lookups)
Type: Boolean

See Also:
Constant Field Values

PROP_Device_checkNotifySelector

public static final java.lang.String PROP_Device_checkNotifySelector
Runtime Configuration Property
True to test the rule selector in column Device.notifySelector
Type: Boolean

See Also:
Constant Field Values

PROP_Device_checkNotifySelector_ENRE

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

PROP_Device_maintenanceOdometerCount

public static final java.lang.String PROP_Device_maintenanceOdometerCount
Runtime Configuration Property
Returns the number of periodic maintenance odometer values to support
(must be less-than-or-equal-to the maximum supported by the Device record)
Type: Integer

See Also:
Constant Field Values

PROP_Device_checkLastEventIgnitionState

public static final java.lang.String PROP_Device_checkLastEventIgnitionState
Runtime Configuration Property
Returns true if the "Device.getCurrentIgnitionState()" method is allowed to examine the EventData table for ignition state based on status code events.
Type: Integer

See Also:
Constant Field Values

PROP_Device_simulateEngineHours

public static final java.lang.String PROP_Device_simulateEngineHours
Runtime Configuration Property
Returns true if engine-hours is to be estimated based on a Device's ignition state (EXPERIMENTAL - the accurracy of using this method for estimating engine-hours has not been fully determined).
Type: Boolean

See Also:
Constant Field Values

PROP_Device_saveEventDriverID

public static final java.lang.String PROP_Device_saveEventDriverID
Runtime Configuration Property
Returns true to save last non-blank EventData "driverID" into Device record
Type: Boolean

See Also:
Constant Field Values

PROP_Device_updateEventWithGeozoneLoc

public static final java.lang.String PROP_Device_updateEventWithGeozoneLoc
Runtime Configuration Property
Returns true to update the EventData location if the location is invalid, and it specifies a valid GeozoneID. (specificallly excluded Geozone "depart" events)
Type: Boolean

See Also:
Constant Field Values

PROP_Device_logMissingColumns

public static final java.lang.String PROP_Device_logMissingColumns
Runtime Configuration Property
Log missing columns on insert/update (defaults to 'true')
Type: Boolean

See Also:
Constant Field Values

PROP_Device_checkAccountAllowNotify

public static final java.lang.String PROP_Device_checkAccountAllowNotify
Runtime Configuration Property
True to check Account.getAllowNotify() when checking for allowing Device notification (defaults to false)
Type: Boolean

See Also:
Constant Field Values

PROP_Device_eventsPerSecond

public static final java.lang.String PROP_Device_eventsPerSecond
Runtime Configuration Property
Device EventsPerSecond calculation properties Type: Array (RangeSeconds,WeightPercent)

See Also:
Constant Field Values

PROP_Device_maintenanceDescriptionKM_0

public static final java.lang.String PROP_Device_maintenanceDescriptionKM_0
Runtime Configuration Property
Device Maintenance Descriptions Type: String

See Also:
Constant Field Values

PROP_Device_maintenanceDescriptionKM_1

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

PROP_Device_deferCheckEventRules

public static final java.lang.String PROP_Device_deferCheckEventRules
Runtime Configuration Property
True to defer "checkEventRules" until AFTER reverse-geocoding
Type: Boolean

See Also:
Constant Field Values

PROP_DeviceGroup_checkAccountAllowNotify

public static final java.lang.String PROP_DeviceGroup_checkAccountAllowNotify
Runtime Configuration Property
True to check Account.getAllowNotify() when checking for allowing DeviceGroup notification (defaults to false)
Type: Boolean

See Also:
Constant Field Values

PROP_DeviceInfo_DeviceCmdAlternate_

public static final java.lang.String PROP_DeviceInfo_DeviceCmdAlternate_
Runtime Configuration Property
Prefix for looking up DeviceInfo.DeviceCmd alternate server IDs
Type: String array

See Also:
Constant Field Values

PROP_EventData_lockTableOnRead

public static final java.lang.String PROP_EventData_lockTableOnRead
Runtime Configuration Property
Lock EventData table on Read (prevents writes while reading)
Use by MySQL/MyISAM DBProvider only. Type: Boolean

See Also:
Constant Field Values

PROP_EventData_allowInnoDBCountWithWhere

public static final java.lang.String PROP_EventData_allowInnoDBCountWithWhere
Runtime Configuration Property
Allow the use of "count(*)" in InnoDB EventData table, if the request has a "WHERE" clause
Type: Boolean

See Also:
Constant Field Values

PROP_EventData_keyedAccountDeviceTime

public static final java.lang.String PROP_EventData_keyedAccountDeviceTime
Runtime Configuration Property
Create alternate keyed "adtime" in EventData over accountID/deviceID/timestamp
Type: Boolean

See Also:
Constant Field Values

PROP_EventData_keyedCreationTime

public static final java.lang.String PROP_EventData_keyedCreationTime
Runtime Configuration Property
Create alternate keyed "creationTime" in EventData
Type: Boolean

See Also:
Constant Field Values

PROP_EventData_logMissingColumns

public static final java.lang.String PROP_EventData_logMissingColumns
Runtime Configuration Property
Log missing columns on insert/update (defaults to 'true')
Type: Boolean

See Also:
Constant Field Values

PROP_EventData_odometerOffsetType

public static final java.lang.String PROP_EventData_odometerOffsetType
Runtime Configuration Property
Odometer offset type
Must be one of: DEVICE_ONLY, EVENT_ONLY, BEST(default) Type: String

See Also:
Constant Field Values

PROP_Geozone_alwaysActive

public static final java.lang.String PROP_Geozone_alwaysActive
Runtime Configuration Property
True if all Geozones are to be considered active
Type: Boolean

See Also:
Constant Field Values

PROP_Geozone_maximumVertices

public static final java.lang.String PROP_Geozone_maximumVertices
Runtime Configuration Property
Maximum number of vertices allowed in a Geozone
Type: Integer

See Also:
Constant Field Values

PROP_Geozone_dftRadius_pointRadius

public static final java.lang.String PROP_Geozone_dftRadius_pointRadius
Runtime Configuration Property
Default Radius (in meters) for PointRadius Geozones
Type: Integer

See Also:
Constant Field Values

PROP_Geozone_minRadius_pointRadius

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

PROP_Geozone_maxRadius_pointRadius

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

PROP_Geozone_dftRadius_polygon

public static final java.lang.String PROP_Geozone_dftRadius_polygon
Runtime Configuration Property
Default Radius (in meters) for Polygon Geozones (NOT USED)
Type: Integer

See Also:
Constant Field Values

PROP_Geozone_minRadius_polygon

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

PROP_Geozone_maxRadius_polygon

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

PROP_Geozone_dftRadius_sweptPointRadius

public static final java.lang.String PROP_Geozone_dftRadius_sweptPointRadius
Runtime Configuration Property
Default Radius (in meters) for SweptPointRadius Geozones
Type: Integer

See Also:
Constant Field Values

PROP_Geozone_minRadius_sweptPointRadius

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

PROP_Geozone_maxRadius_sweptPointRadius

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

PROP_RuleList_includeGroupRules

public static final java.lang.String PROP_RuleList_includeGroupRules
Runtime Configuration Property (optional)
True to enable checking Device "Group" lookup when triggering rules.
Type: Boolean

See Also:
Constant Field Values

PROP_RuleTrigger_allowClearActiveTrigger

public static final java.lang.String PROP_RuleTrigger_allowClearActiveTrigger
Runtime Configuration Property (optional)
True to allow clearing an active RuleTrigger when a Rule condition returns "false".
Type: Boolean

See Also:
Constant Field Values

PROP_FuelRegister_installFuelManager

public static final java.lang.String PROP_FuelRegister_installFuelManager
Runtime Configuration Property (optional)
Enable FuelManager checking (requires FuelRegister installed).
Type: Boolean

See Also:
Constant Field Values

PROP_FuelRegister_ignoreNegativeFuelLevels

public static final java.lang.String PROP_FuelRegister_ignoreNegativeFuelLevels
Runtime Configuration Property (optional)
Ignore negative EventData fuel-levels (requires FuelRegister installed).
Type: Boolean

See Also:
Constant Field Values

PROP_FuelRegister_ignoreZeroFuelLevels

public static final java.lang.String PROP_FuelRegister_ignoreZeroFuelLevels
Runtime Configuration Property (optional)
Ignore zero EventData fuel-levels (requires FuelRegister installed).
Type: Boolean

See Also:
Constant Field Values

PROP_FuelRegister_ignoreWhileMoving

public static final java.lang.String PROP_FuelRegister_ignoreWhileMoving
Runtime Configuration Property (optional)
Ignore fuel-levels while moving (requires FuelRegister installed).
Type: Boolean

See Also:
Constant Field Values

PROP_FuelRegister_levelIncreaseThreshold

public static final java.lang.String PROP_FuelRegister_levelIncreaseThreshold
Runtime Configuration Property (optional)
The FuelLevel "Increase" percent threshold (between 0.0 and 1.0 inclusive).
Type: Double

See Also:
Constant Field Values

PROP_FuelRegister_levelDecreaseThreshold

public static final java.lang.String PROP_FuelRegister_levelDecreaseThreshold
Runtime Configuration Property (optional)
The FuelLevel "Decrease" percent threshold (between 0.0 and 1.0 inclusive).
Type: Double

See Also:
Constant Field Values

PROP_PendingCommands_keyedSendState

public static final java.lang.String PROP_PendingCommands_keyedSendState
Runtime Configuration Property (optional)
True to specify a keyed "sendState" column (otherwise non-keyed) (Should also have "db.allowUpdateKeyFields" set true) Type: Boolean

See Also:
Constant Field Values

PROP_track_baseURI

public static final java.lang.String PROP_track_baseURI
Runtime Configuration Property
Base URI used for accesing the GTS login (must match web.xml configuration)
Type: String

See Also:
Constant Field Values

PROP_track_requireCookies

public static final java.lang.String PROP_track_requireCookies
Runtime Configuration Property
True to require that cookies be enabled.
If false, session information will be encoded in the URL
Type: Boolean

See Also:
Constant Field Values

PROP_track_js_directory

public static final java.lang.String PROP_track_js_directory
Runtime Configuration Property
The overriding directory, used to find the JavaScript code.
Type: String

See Also:
Constant Field Values

PROP_track_offlineFile

public static final java.lang.String PROP_track_offlineFile
Runtime Configuration Property
The file which contains the text to display when the system is 'Offline'.
Type: File

See Also:
Constant Field Values

PROP_track_enableService

public static final java.lang.String PROP_track_enableService
Runtime Configuration Property
True to enable web-service access.
Type: Boolean See also PROP_GTSRequest_url

See Also:
Constant Field Values

PROP_track_service_customCommandHandler

public static final java.lang.String PROP_track_service_customCommandHandler
Runtime Configuration Property
Track web-service custom command handler class name.
Type: String

See Also:
Constant Field Values

PROP_track_service_commandEnabled_

public static final java.lang.String PROP_track_service_commandEnabled_
Runtime Configuration Property
Track web-service command enabled/disabled prefix.
Type: Boolean

See Also:
Constant Field Values

PROP_track_service_authKey

public static final java.lang.String PROP_track_service_authKey
Runtime Configuration Property
Track web-service Authroization obfuscation key.
Type: String

See Also:
Constant Field Values

PROP_track_service_AccessControlAllowOrigin

public static final java.lang.String PROP_track_service_AccessControlAllowOrigin
Runtime Configuration Property
Track web-service "Access-Control-Allow-Origin" domain
Type: String

See Also:
Constant Field Values

PROP_track_updateLastLoginTime_user

public static final java.lang.String PROP_track_updateLastLoginTime_user
Runtime Configuration Property
True to update the User "lastLoginTime" at login.
Type: Boolean

See Also:
Constant Field Values

PROP_track_updateLastLoginTime_account

public static final java.lang.String PROP_track_updateLastLoginTime_account
Runtime Configuration Property
True to update the User "lastLoginTime" at login.
Type: Boolean

See Also:
Constant Field Values

PROP_GTSRequest_url

public static final java.lang.String PROP_GTSRequest_url
Runtime Configuration Property
Required for web-service access.
Type: String See also PROP_track_enableService

See Also:
Constant Field Values

PROP_SubdivisionProvider_class

public static final java.lang.String PROP_SubdivisionProvider_class
Runtime Configuration Property
The name of the overriding Class used to provide latitude/longitude subdivision data.
Used for Border-Crossing detection.
Type: Class

See Also:
Constant Field Values

PROP_EventFunctionMap_adminAccounts

public static final java.lang.String PROP_EventFunctionMap_adminAccounts
Runtime Configuration Property
Comma separated list of account ID that can access "SystemAdminOnly" rule functions.
Type: String

See Also:
Constant Field Values

PROP_EventFunctionMapFactory_class

public static final java.lang.String PROP_EventFunctionMapFactory_class
Runtime Configuration Property
The name of the overriding Class used to provide the Rule handling EventFunctionMapFactory.
Type: Class

See Also:
Constant Field Values

PROP_EventIdentifierMapFactory_class

public static final java.lang.String PROP_EventIdentifierMapFactory_class
Runtime Configuration Property
The name of the overriding Class used to provide the Rule handling EventIdentifierMapFactory.
Type: Class

See Also:
Constant Field Values

PROP_Transport_queryEnabled

public static final java.lang.String PROP_Transport_queryEnabled
Runtime Configuration Property
True to enable Transport table unique-id lookup.
(only required when the Device is separate from the Transport)
Type: Boolean

See Also:
Constant Field Values

PROP_UniqueXID_queryEnabled

public static final java.lang.String PROP_UniqueXID_queryEnabled
Runtime Configuration Property
True to enable UniqueXID table unique-id lookup.
(only required when the UniqueID is separate from the Device)
Type: Boolean

See Also:
Constant Field Values

PROP_db_defaultDeviceAuthorization

public static final java.lang.String PROP_db_defaultDeviceAuthorization
Runtime Configuration Property
True to allow account/user access to "ALL" device group, if no groups are defined.
Type: Boolean

See Also:
Constant Field Values

PROP_db_defaultDeviceAuthorization_

public static final java.lang.String PROP_db_defaultDeviceAuthorization_
Runtime Configuration Property
True to allow account/user access to "ALL" device group, if no groups are defined.
(allows specifying specific Account IDs)
Type: Boolean

See Also:
Constant Field Values

PROP_sysAdmin_account

public static final java.lang.String PROP_sysAdmin_account
Runtime Configuration Property
The name of the SystemAdmin Account ID.
Type: String

See Also:
Constant Field Values

PROP_audit_saveSuccessfulLogin

public static final java.lang.String PROP_audit_saveSuccessfulLogin
Runtime Configuration Property
SystemAudit save successful login attempts.
Type: Boolean

See Also:
Constant Field Values

PROP_audit_saveFailedLogin

public static final java.lang.String PROP_audit_saveFailedLogin
Runtime Configuration Property
SystemAudit save failed login attempts.
Type: Boolean

See Also:
Constant Field Values

PROP_audit_saveRuleNotification

public static final java.lang.String PROP_audit_saveRuleNotification
Runtime Configuration Property
SystemAudit save rule trigger notifications.
Type: Boolean

See Also:
Constant Field Values

PROP_audit_saveReportEmail

public static final java.lang.String PROP_audit_saveReportEmail
Runtime Configuration Property
SystemAudit save report email.
Type: Boolean

See Also:
Constant Field Values

PROP_audit_saveDeviceCommand

public static final java.lang.String PROP_audit_saveDeviceCommand
Runtime Configuration Property
SystemAudit save rule trigger notifications.
Type: Boolean

See Also:
Constant Field Values

PROP_GoogleKML_pushpinBaseURL

public static final java.lang.String PROP_GoogleKML_pushpinBaseURL
Runtime Configuration Property
The base URL for Google pushpins
Type: String

See Also:
Constant Field Values

runtimeKeys

protected static RTKey.Entry[] runtimeKeys

env_GTS_HOME

public static final java.lang.String env_GTS_HOME
The GTS environment variable names

See Also:
Constant Field Values

env_GTS_LOGDIR

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

env_GTS_PIDDIR

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

ARG_SCHEMA

public static final java.lang.String[] ARG_SCHEMA

ARG_STATUS

public static final java.lang.String[] ARG_STATUS

ARG_WHERE

public static final java.lang.String[] ARG_WHERE
Constructor Detail

DBConfig

public DBConfig()
Method Detail

AUTHKEY_DCS_CONF

public static final java.lang.String AUTHKEY_DCS_CONF(java.lang.String dcs)

hasExtraPackage

public static boolean hasExtraPackage()
Returns true if the "extra" package is present

Returns:
True if the "extra" package is present

hasRulePackage

public static boolean hasRulePackage()
Returns true if the "rule" package is present

Returns:
True if the "rule" package is present

hasBCrossPackage

public static boolean hasBCrossPackage()
Returns true if the "bcross" package is present

Returns:
True if the "bcross" package is present

hasOptPackage

public static boolean hasOptPackage()
Returns true if the "opt" package is present

Returns:
True if the "opt" package is present

getVersion

public static java.lang.String getVersion()
Return the GTS build version

Returns:
The GTS build version

GetDefaultDeviceAuthorization

public static boolean GetDefaultDeviceAuthorization(java.lang.String acctID)
Returns true if the Device group "ALL" is authorized for the specified Account

Parameters:
acctID - The account ID for which the Device group "ALL" authorization is returned
Returns:
True is Device group "ALL" is authoriized

getEnvironmentDirectory

public static java.io.File getEnvironmentDirectory(java.lang.String envVar)
Returns the specified environment variable as a directory

Returns:
True if GTS_HOME matches current directory, false otherwise

get_GTS_HOME

public static java.io.File get_GTS_HOME()
Gets the GTS_HOME environment variable as a directory.

Returns:
The GTS_HOME directory, or null if unable to determine directory.

check_GTS_HOME

public static boolean check_GTS_HOME()
Compares the GTS_HOME environment variable to the current directory.

Returns:
True if GTS_HOME matches current directory, false otherwise

get_GTS_LOGDIR

public static java.io.File get_GTS_LOGDIR()
Gets the GTS_LOGDIR environment variable as a directory. If the GTS_LOGDIR environment variable is undefined, then this will return $GTS_HOME/logs (if defined).

Returns:
The GTS_LOGDIR directory.

get_GTS_PIDDIR

public static java.io.File get_GTS_PIDDIR()
Gets the GTS_PIDDIR environment variable as a directory. If the GTS_PIDDIR environment variable is undefined, then this will return $GTS_HOME/logs (if defined).

Returns:
The GTS_PIDDIR directory.

addTableFactories

public static void addTableFactories()
Add the standard DBFactories as-is


servletInit

public static void servletInit(java.util.Properties srvCtxProps)

cmdLineInit

public static int cmdLineInit(java.lang.String[] argv,
                              boolean interactive)
Entry point for various programs/tools which initializes the DBFactories

Parameters:
argv - The Command-Line arguments, if any
interactive - True if this is invoked from a user interactive command-line tool, False if this is invoked from a server non-interactive command-line tool.

getServiceAccountID

public static java.lang.String getServiceAccountID(java.lang.String dft)
Return the ServiceAccount ID

Parameters:
dft - The default value to return if the ServiceAccount ID is not available
Returns:
The ServiceAccount ID

getServiceAccountName

public static java.lang.String getServiceAccountName(java.lang.String dft)
Return the ServiceAccount Name

Parameters:
dft - The default value to return if the ServiceAccount Name is not available
Returns:
The ServiceAccount Name

getServiceAccountAttributes

public static java.lang.String getServiceAccountAttributes(java.lang.String dft)
Return the ServiceAccount Attributes

Parameters:
dft - The default value to return if the ServiceAccount Attributes are not available
Returns:
The ServiceAccount Attributes

_main

public static int _main(java.lang.String[] argv)
Main entry point for providing command-line DB administration tools

Parameters:
argv - The command-line arguments

main

public static void main(java.lang.String[] argv)
Main entry point for providing command-line DB administration tools

Parameters:
argv - The command-line arguments