Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Moved FlightUtilFunctions to new EnrichFlight rule. WIP

Michael Rademakercc5720c974fb
diff --git a/agent/src/main/java/org/openremote/agent/protocol/http/HttpClientProtocol.java b/agent/src/main/java/org/openremote/agent/protocol/http/HttpClientProtocol.java
index c912c5221..440215e4f 100644
--- a/agent/src/main/java/org/openremote/agent/protocol/http/HttpClientProtocol.java
+++ b/agent/src/main/java/org/openremote/agent/protocol/http/HttpClientProtocol.java
@@ -427,7 +427,7 @@ public class HttpClientProtocol extends AbstractProtocol {
public static final String META_HEADERS = PROTOCOL_NAME + ":headers";
/**
- * Boolean indicating if paging should occur acoarding to the Link Header specification: https://developer.github.com/v3/guides/traversing-with-pagination/
+ * Boolean indicating if paging should occur according to the Link Header specification: https://developer.github.com/v3/guides/traversing-with-pagination/
*/
public static final String META_PAGING_ENABLED = PROTOCOL_NAME + ":pagingEnabled";
diff --git a/model/src/main/java/org/openremote/model/value/ObjectValue.java b/model/src/main/java/org/openremote/model/value/ObjectValue.java
index 8c4cee606..1ad632447 100644
--- a/model/src/main/java/org/openremote/model/value/ObjectValue.java
+++ b/model/src/main/java/org/openremote/model/value/ObjectValue.java
@@ -17,6 +17,7 @@ package org.openremote.model.value;
import org.openremote.model.util.Pair;
+import java.util.Map;
import java.util.Optional;
import java.util.function.Predicate;
import java.util.stream.Stream;
@@ -73,12 +74,13 @@ public interface ObjectValue extends Value {
ObjectValue put(String key, boolean bool);
+ ObjectValue putAll(Map<String, Value> map);
+
ObjectValue remove(String key);
ObjectValue deepCopy();
/**
- *
* @param ignoreKeyPredicate Ignore given keys in the comparison.
*/
boolean equalsIgnoreKeys(ObjectValue that, Predicate<String> ignoreKeyPredicate);
diff --git a/model/src/main/java/org/openremote/model/value/impl/ObjectValueImpl.java b/model/src/main/java/org/openremote/model/value/impl/ObjectValueImpl.java
index 9693292ac..96b92d38a 100644
--- a/model/src/main/java/org/openremote/model/value/impl/ObjectValueImpl.java
+++ b/model/src/main/java/org/openremote/model/value/impl/ObjectValueImpl.java
@@ -146,6 +146,12 @@ public class ObjectValueImpl extends ValueImpl implements ObjectValue {
return this;
}
+ @Override
+ public ObjectValue putAll(Map<String, Value> map) {
+ map.forEach(this::put);
+ return this;
+ }
+
@Override
public ObjectValue remove(String key) {
map.remove(key);