|
@@ -180,7 +180,7 @@ public class WebSocketUtil {
|
|
|
|
|
|
// path
|
|
|
// ProcessFirstSend_path(Repository, id, sendArray);
|
|
|
- ProcessFirstSend_path(Repository.objectData, id, sendArray);
|
|
|
+ ProcessFirstSend(Repository.objectData, id, sendArray);
|
|
|
|
|
|
SendAndClear(id, sendArray);
|
|
|
}
|
|
@@ -191,8 +191,23 @@ public class WebSocketUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 支持路径通配符*
|
|
|
+ public static void ProcessFirstSend(SceneDataObject objectData, String id, JSONArray sendArray) {
|
|
|
+ try {
|
|
|
+ for (String key : objectData.keySetSelf()) {
|
|
|
+ if (KeywordUtil.containsKey(key)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ SceneDataValue sdv = objectData.get(key);
|
|
|
+ ProcessFirstSend_path(sdv, id, sendArray);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 严格匹配路径,已废弃
|
|
|
- public static void ProcessFirstSend_path(RepositoryImpl Repository, String id, JSONArray sendArray) {
|
|
|
+ public static void ProcessFirstSend_path(RepositoryImpl Repository, String id, JSONArray sendArray) throws Exception {
|
|
|
List<JSONArray> pathList = id2pathList.get(id);
|
|
|
for (JSONArray pathArray : pathList) {
|
|
|
Object valueObject = ComputeUtil.getValueObject(Repository, pathArray);
|
|
@@ -214,7 +229,7 @@ public class WebSocketUtil {
|
|
|
}
|
|
|
|
|
|
// 支持路径通配符*
|
|
|
- public static void ProcessFirstSend_path(SceneDataObject objectData, String id, JSONArray sendArray) {
|
|
|
+ public static void ProcessFirstSend_path(SceneDataObject objectData, String id, JSONArray sendArray) throws Exception {
|
|
|
for (String key : objectData.keySetSelf()) {
|
|
|
if (KeywordUtil.containsKey(key)) {
|
|
|
continue;
|
|
@@ -225,9 +240,9 @@ public class WebSocketUtil {
|
|
|
}
|
|
|
|
|
|
// 支持路径通配符*
|
|
|
- public static void ProcessFirstSend_path(SceneDataValue sdv, String id, JSONArray sendArray) {
|
|
|
+ public static void ProcessFirstSend_path(SceneDataValue sdv, String id, JSONArray sendArray) throws Exception {
|
|
|
List<JSONArray> pathList = id2pathList.get(id);
|
|
|
- try {
|
|
|
+ {
|
|
|
if (sdv.rel_property != null) {
|
|
|
if (sdv.rel_property.propertyValueSchema.equals("JSONObject")) {
|
|
|
if (sdv.value_object != null) {
|
|
@@ -298,8 +313,6 @@ public class WebSocketUtil {
|
|
|
} else if (sdv.value_prim != null) {
|
|
|
}
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- log.error(e.getMessage(), e);
|
|
|
}
|
|
|
}
|
|
|
|