From f94951e7e78956b2bbd438665ff290a472afde76 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 29 Dec 2020 13:05:07 -0800 Subject: Migrate more boolean keys --- src/main/java/org/traccar/config/Keys.java | 123 +++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) (limited to 'src/main/java/org/traccar/config') diff --git a/src/main/java/org/traccar/config/Keys.java b/src/main/java/org/traccar/config/Keys.java index 3f09190a1..ea0cf4961 100644 --- a/src/main/java/org/traccar/config/Keys.java +++ b/src/main/java/org/traccar/config/Keys.java @@ -58,6 +58,85 @@ public final class Keys { ".messageLength", Collections.singletonList(KeyType.GLOBAL)); + /** + * Enable extended functionality for the protocol. The reason it's disabled by default is that not all devices + * support it. + */ + public static final ConfigSuffix PROTOCOL_EXTENDED = new ConfigSuffix<>( + ".extended", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Decode string as UTF8 instead of ASCII. Only applicable for some protocols. + */ + public static final ConfigSuffix PROTOCOL_UTF8 = new ConfigSuffix<>( + ".utf8", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Enable CAN decoding for the protocol. Similar to 'extended' configuration, it's not supported for some devices. + */ + public static final ConfigSuffix PROTOCOL_CAN = new ConfigSuffix<>( + ".can", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Indicates whether server acknowledgement is required. Only applicable for some protocols. + */ + public static final ConfigSuffix PROTOCOL_ACK = new ConfigSuffix<>( + ".ack", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Ignore device reported fix time. Useful in case some devices report invalid time. Currently only available for + * GL200 protocol. + */ + public static final ConfigSuffix PROTOCOL_IGNORE_FIX_TIME = new ConfigSuffix<>( + ".ignoreFixTime", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Decode additional TK103 attributes. Not supported for some devices. + */ + public static final ConfigSuffix PROTOCOL_DECODE_LOW = new ConfigSuffix<>( + ".decodeLow", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Use long date format for Atrack protocol. + */ + public static final ConfigSuffix PROTOCOL_LONG_DATE = new ConfigSuffix<>( + ".longDate", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Use decimal fuel value format for Atrack protocol. + */ + public static final ConfigSuffix PROTOCOL_DECIMAL_FUEL = new ConfigSuffix<>( + ".decimalFuel", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Indicates additional custom attributes for Atrack protocol. + */ + public static final ConfigSuffix PROTOCOL_CUSTOM = new ConfigSuffix<>( + ".custom", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Custom format string for Atrack protocol. + */ + public static final ConfigSuffix PROTOCOL_FORM = new ConfigSuffix<>( + ".form", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Alarm mapping for Atrack protocol. + */ + public static final ConfigSuffix PROTOCOL_ALARM_MAP = new ConfigSuffix<>( + ".alarmMap", + Collections.singletonList(KeyType.GLOBAL)); + /** * Server wide connection timeout value in seconds. See protocol timeout for more information. */ @@ -205,6 +284,21 @@ public final class Keys { "database.saveOriginal", Collections.singletonList(KeyType.GLOBAL)); + /** + * By default server syncs with the database if it encounters and unknown device. This flag allows to disable that + * behavior to improve performance in some cases. + */ + public static final ConfigKey DATABASE_IGNORE_UNKNOWN = new ConfigKey<>( + "database.ignoreUnknown", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Automatically register unknown devices in the database. + */ + public static final ConfigKey DATABASE_REGISTER_UNKNOWN = new ConfigKey<>( + "database.registerUnknown", + Collections.singletonList(KeyType.GLOBAL)); + /** * Default category for auto-registered devices. */ @@ -263,6 +357,13 @@ public final class Keys { "ldap.password", Collections.singletonList(KeyType.GLOBAL)); + /** + * Force LDAP authentication. + */ + public static final ConfigKey LDAP_FORCE = new ConfigKey<>( + "ldap.force", + Collections.singletonList(KeyType.GLOBAL)); + /** * LDAP user search base. */ @@ -356,6 +457,21 @@ public final class Keys { "web.sessionTimeout", Collections.singletonList(KeyType.GLOBAL)); + /** + * Enable database access console via '/console' URL. Use only for debugging. Never use in production. + */ + public static final ConfigKey WEB_CONSOLE = new ConfigKey<>( + "web.console", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Server debug version of the web app. Not recommended to use for performance reasons. It is intended to be used + * for development and debugging purposes. + */ + public static final ConfigKey WEB_DEBUG = new ConfigKey<>( + "web.debug", + Collections.singletonList(KeyType.GLOBAL)); + /** * Enable positions forwarding to other web server. */ @@ -725,6 +841,13 @@ public final class Keys { "geocoder.reuseDistance", Collections.singletonList(KeyType.GLOBAL)); + /** + * Perform geocoding when preparing reports and sending notifications. + */ + public static final ConfigKey GEOCODER_ON_REQUEST = new ConfigKey<>( + "geocoder.onRequest", + Collections.singletonList(KeyType.GLOBAL)); + /** * Boolean flag to enable LBS location resolution. Some devices send cell towers information and WiFi point when GPS * location is not available. Traccar can determine coordinates based on that information using third party -- cgit v1.2.3