aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/notification/PropertiesProvider.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/notification/PropertiesProvider.java')
-rw-r--r--src/org/traccar/notification/PropertiesProvider.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/org/traccar/notification/PropertiesProvider.java b/src/org/traccar/notification/PropertiesProvider.java
index 2fea901af..1a4104d2b 100644
--- a/src/org/traccar/notification/PropertiesProvider.java
+++ b/src/org/traccar/notification/PropertiesProvider.java
@@ -48,4 +48,14 @@ public class PropertiesProvider {
return value;
}
+ public int getInteger(String key, int defaultValue) {
+ if (config != null) {
+ return config.getInteger(key, defaultValue);
+ } else if (extendedModel.getAttributes().containsKey(key)) {
+ return Integer.parseInt(extendedModel.getAttributes().get(key).toString());
+ } else {
+ return defaultValue;
+ }
+ }
+
}