aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/model
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-05-15 12:06:14 -0700
committerAnton Tananaev <anton@traccar.org>2023-05-15 12:06:14 -0700
commite44e9f860b11a50b3e39e3895ea9ea5624282b78 (patch)
tree1fffb07d2b006243bf8f86e9f3c2cc0a25d20a6b /src/main/java/org/traccar/model
parent553527d9fbe689be243acbf219bed432f15c25e3 (diff)
downloadtrackermap-server-e44e9f860b11a50b3e39e3895ea9ea5624282b78.tar.gz
trackermap-server-e44e9f860b11a50b3e39e3895ea9ea5624282b78.tar.bz2
trackermap-server-e44e9f860b11a50b3e39e3895ea9ea5624282b78.zip
Add HTML branding overrides
Diffstat (limited to 'src/main/java/org/traccar/model')
-rw-r--r--src/main/java/org/traccar/model/ExtendedModel.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/model/ExtendedModel.java b/src/main/java/org/traccar/model/ExtendedModel.java
index 7a61eda8c..6a4f502f7 100644
--- a/src/main/java/org/traccar/model/ExtendedModel.java
+++ b/src/main/java/org/traccar/model/ExtendedModel.java
@@ -89,14 +89,18 @@ public class ExtendedModel extends BaseModel {
}
}
- public String getString(String key) {
+ public String getString(String key, String defaultValue) {
if (attributes.containsKey(key)) {
return attributes.get(key).toString();
} else {
- return null;
+ return defaultValue;
}
}
+ public String getString(String key) {
+ return getString(key, null);
+ }
+
public double getDouble(String key) {
if (attributes.containsKey(key)) {
Object value = attributes.get(key);