aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/config
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-12-29 22:20:03 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-12-29 22:20:03 -0800
commit8fe1e679935688676f7139bb9ed6dc61838d0e2f (patch)
tree75704a42322d85d7245658b8d06aea9def6132a1 /src/main/java/org/traccar/config
parent7f0692101a017f33ffb984e6df92e5dbef6ce71b (diff)
downloadtrackermap-server-8fe1e679935688676f7139bb9ed6dc61838d0e2f.tar.gz
trackermap-server-8fe1e679935688676f7139bb9ed6dc61838d0e2f.tar.bz2
trackermap-server-8fe1e679935688676f7139bb9ed6dc61838d0e2f.zip
Migrate SMS config keys
Diffstat (limited to 'src/main/java/org/traccar/config')
-rw-r--r--src/main/java/org/traccar/config/Keys.java47
1 files changed, 45 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/config/Keys.java b/src/main/java/org/traccar/config/Keys.java
index ebe496c4f..96ed7773b 100644
--- a/src/main/java/org/traccar/config/Keys.java
+++ b/src/main/java/org/traccar/config/Keys.java
@@ -439,8 +439,7 @@ public final class Keys {
*/
public static final ConfigKey<Integer> WEB_PORT = new ConfigKey<>(
"web.port",
- Collections.singletonList(KeyType.GLOBAL),
- 8082);
+ Collections.singletonList(KeyType.GLOBAL));
/**
* WebSocket connection timeout in milliseconds. Default timeout is 10 minutes.
@@ -545,6 +544,50 @@ public final class Keys {
Collections.singletonList(KeyType.GLOBAL));
/**
+ * SMS API service full URL. Enables SMS commands and notifications.
+ */
+ public static final ConfigKey<String> SMS_HTTP_URL = new ConfigKey<>(
+ "sms.http.url",
+ Collections.singletonList(KeyType.GLOBAL));
+
+ /**
+ * SMS API authorization header name. Default value is 'Authorization'.
+ */
+ public static final ConfigKey<String> SMS_HTTP_AUTHORIZATION_HEADER = new ConfigKey<>(
+ "sms.http.authorizationHeader",
+ Collections.singletonList(KeyType.GLOBAL),
+ "Authorization");
+
+ /**
+ * SMS API authorization header value. This value takes precedence over user and password.
+ */
+ public static final ConfigKey<String> SMS_HTTP_AUTHORIZATION = new ConfigKey<>(
+ "sms.http.authorization",
+ Collections.singletonList(KeyType.GLOBAL));
+
+ /**
+ * SMS API basic authentication user.
+ */
+ public static final ConfigKey<String> SMS_HTTP_USER = new ConfigKey<>(
+ "sms.http.user",
+ Collections.singletonList(KeyType.GLOBAL));
+
+ /**
+ * SMS API basic authentication password.
+ */
+ public static final ConfigKey<String> SMS_HTTP_PASSWORD = new ConfigKey<>(
+ "sms.http.password",
+ Collections.singletonList(KeyType.GLOBAL));
+
+ /**
+ * SMS API body template. Placeholders {phone} and {message} can be used in the template.
+ * If value starts with '{' or '[', server automatically assumes JSON format.
+ */
+ public static final ConfigKey<String> SMS_HTTP_TEMPLATE = new ConfigKey<>(
+ "sms.http.template",
+ Collections.singletonList(KeyType.GLOBAL));
+
+ /**
* Maximum time period for reports in seconds. Can be useful to prevent users to request unreasonably long reports.
* By default there is no limit.
*/