From 6101300ab45882e02e4a0b90d30070cb904378eb Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 30 Dec 2020 10:36:50 -0800 Subject: Migrate more config keys --- src/main/java/org/traccar/config/Keys.java | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 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 598cac66f..6b779baea 100644 --- a/src/main/java/org/traccar/config/Keys.java +++ b/src/main/java/org/traccar/config/Keys.java @@ -130,6 +130,13 @@ public final class Keys { ".form", Collections.singletonList(KeyType.GLOBAL)); + /** + * Protocol configuration. Required for some devices for decoding incoming data. + */ + public static final ConfigSuffix PROTOCOL_CONFIG = new ConfigSuffix<>( + ".config", + Collections.singletonList(KeyType.GLOBAL)); + /** * Alarm mapping for Atrack protocol. */ @@ -453,6 +460,22 @@ public final class Keys { "status.updateDeviceState", Collections.singletonList(KeyType.GLOBAL)); + /** + * List of protocol names to ignore offline status. Can be useful to not trigger status change when devices are + * configured to disconnect after reporting a batch of data. + */ + public static final ConfigKey STATUS_IGNORE_OFFLINE = new ConfigKey<>( + "status.ignoreOffline", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Path to the media folder. Server stores audio, video and photo files in that folder. Sub-folders will be + * automatically created for each device by unique id. + */ + public static final ConfigKey MEDIA_PATH = new ConfigKey<>( + "media.path", + Collections.singletonList(KeyType.GLOBAL)); + /** * Optional parameter to specify network interface for web interface to bind to. By default server will bind to all * available interfaces. @@ -499,6 +522,21 @@ public final class Keys { "web.debug", Collections.singletonList(KeyType.GLOBAL)); + /** + * Cross-origin resource sharing origin header value. + */ + public static final ConfigKey WEB_ORIGIN = new ConfigKey<>( + "web.origin", + Collections.singletonList(KeyType.GLOBAL)); + + /** + * Cache control header value. By default resources are cached for one hour. + */ + public static final ConfigKey WEB_CACHE_CONTROL = new ConfigKey<>( + "web.cacheControl", + Collections.singletonList(KeyType.GLOBAL), + "max-age=3600,public"); + /** * URL to forward positions. Data is passed through URL parameters. For example, {uniqueId} for device identifier, * {latitude} and {longitude} for coordinates. -- cgit v1.2.3