- }
-
- Map<String,Object> dynamicContent = graph.syncRequest(new NodeRequestDynamic(variable));
- if(dynamicContent.isEmpty()) {
- return staticContent;
- }
-
- JSONObject result = staticContent.clone();
- result.add(dynamicContent);
-
- if(dynamicContent.containsKey(ERRORS) || staticContent.getJSONField(ERRORS) != null) {
- ArrayList<String> errorList = new ArrayList<>();
-
- if(dynamicContent.containsKey(ERRORS))
- errorList.addAll((List<String>)dynamicContent.get(ERRORS));
-
- if(staticContent.getJSONField(ERRORS) != null)
- errorList.addAll((List<String>)staticContent.getJSONField(ERRORS));
-
- result.addJSONField(ERRORS, errorList);
- }