- while (fieldsIterator.hasNext()) {
- Map.Entry<String, JsonNode> field = fieldsIterator.next();
- final String key = field.getKey();
- final JsonNode value = field.getValue();
- if (value.isContainerNode() && !value.isArray()) {
- pullMatchValue(value); // RECURSIVE CALL
- } else {
- newValue = StringUtils.replaceEach(value.toString(), new String[]{"[", "]", "\""}, new String[]{"", "", ""});
- mapAttribute.put(key, newValue);
- }
- }
-
- }
-
- private String getValueFromDictionary(String service){
- String ruleTemplate=null;
- String modelName = service.split("-v")[0];
- String modelVersion = service.split("-v")[1];
-
- CommonClassDaoImpl dbConnection = new CommonClassDaoImpl();
- List<Object> result = dbConnection.getDataById(MicroServiceModels.class, "modelName:version", modelName+":"+modelVersion);
- if(result != null && !result.isEmpty()){
- MicroServiceModels model = (MicroServiceModels) result.get(0);
- ruleTemplate = model.getAnnotation();
- }
- return ruleTemplate;
- }
-
+ while (fieldsIterator.hasNext()) {
+ Map.Entry<String, JsonNode> field = fieldsIterator.next();
+ final String key = field.getKey();
+ final JsonNode value = field.getValue();
+ if (value.isContainerNode() && !value.isArray()) {
+ pullMatchValue(value); // RECURSIVE CALL
+ } else {
+ newValue = StringUtils.replaceEach(value.toString(), new String[] {"[", "]", "\""},
+ new String[] {"", "", ""});
+ mapAttribute.put(key, newValue);
+ }
+ }
+
+ }
+
+ private String getValueFromDictionary(String service) {
+ String ruleTemplate = null;
+ String modelName = service.split("-v")[0];
+ String modelVersion = service.split("-v")[1];
+
+ CommonClassDaoImpl dbConnection = new CommonClassDaoImpl();
+ List<Object> result =
+ dbConnection.getDataById(MicroServiceModels.class, "modelName:version", modelName + ":" + modelVersion);
+ if (result != null && !result.isEmpty()) {
+ MicroServiceModels model = (MicroServiceModels) result.get(0);
+ ruleTemplate = model.getAnnotation();
+ }
+ return ruleTemplate;
+ }
+