X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcontroller%2FMicroServiceDictionaryController.java;fp=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcontroller%2FMicroServiceDictionaryController.java;h=566ac1447741f11356dc9c41aaf79e8a3b0e55a1;hp=b9e1ce1ce7b674fd3ac8f4cc206510ac74d2528f;hb=779125e31adbcc59a9864843b523bd6ed2751cbb;hpb=a2ab61f0ad39970ad35c3e47ff8429f59850c469 diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryController.java index b9e1ce1ce..566ac1447 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryController.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/MicroServiceDictionaryController.java @@ -54,8 +54,8 @@ import org.onap.policy.rest.jpa.MicroServiceModels; import org.onap.policy.rest.jpa.MicroserviceHeaderdeFaults; import org.onap.policy.rest.jpa.PrefixList; import org.onap.policy.rest.jpa.UserInfo; -import org.onap.policy.rest.util.MSAttributeObject; -import org.onap.policy.rest.util.MSModelUtils; +import org.onap.policy.rest.util.MsAttributeObject; +import org.onap.policy.rest.util.MsModelUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; @@ -75,7 +75,7 @@ public class MicroServiceDictionaryController { private static String getDictionary = "getDictionary"; private static String errorMsg = "error"; private static String dictionaryDBQuery = "dictionaryDBQuery"; - private LinkedHashMap classMap; + private LinkedHashMap classMap; private List modelList = new ArrayList<>(); private static String dictionaryFields = "dictionaryFields"; private static String duplicateResponseString = "Duplicate"; @@ -109,7 +109,7 @@ public class MicroServiceDictionaryController { MicroServiceDictionaryController.commonClassDao = commonClassDao; } - MSModelUtils utils = new MSModelUtils(XACMLPapServlet.getMsOnapName(), XACMLPapServlet.getMsPolicyName()); + MsModelUtils utils = new MsModelUtils(XACMLPapServlet.getMsOnapName(), XACMLPapServlet.getMsPolicyName()); private MicroServiceModels newModel; @@ -650,12 +650,12 @@ public class MicroServiceDictionaryController { Set keys = jsonObject.keySet(); for (String key : keys) { String value = jsonObject.get(key).toString(); - MSAttributeObject msAttributeObject = mapper1.readValue(value, MSAttributeObject.class); + MsAttributeObject msAttributeObject = mapper1.readValue(value, MsAttributeObject.class); classMap.put(key, msAttributeObject); } userId = root.get("userid").textValue(); - MSAttributeObject mainClass = classMap.get(this.newModel.getModelName()); + MsAttributeObject mainClass = classMap.get(this.newModel.getModelName()); this.newModel.setDependency("[]"); String value = new Gson().toJson(mainClass.getSubClass()); this.newModel.setSubAttributes(value); @@ -703,7 +703,7 @@ public class MicroServiceDictionaryController { Set keys = jsonObject.keySet(); for (String key : keys) { String value = jsonObject.get(key).toString(); - MSAttributeObject msAttributeObject = mapper1.readValue(value, MSAttributeObject.class); + MsAttributeObject msAttributeObject = mapper1.readValue(value, MsAttributeObject.class); classMap.put(key, msAttributeObject); } } @@ -769,11 +769,11 @@ public class MicroServiceDictionaryController { utils.removeData(request, response, microServiceModelsDictionaryDatas, MicroServiceModels.class); } - private void addValuesToNewModel(HashMap classMap) { + private void addValuesToNewModel(HashMap classMap) { // Loop through the classmap and pull out the required info for the new file. String subAttribute = null; - MSAttributeObject mainClass = classMap.get(this.newModel.getModelName()); + MsAttributeObject mainClass = classMap.get(this.newModel.getModelName()); if (mainClass != null) { String dependTemp = StringUtils.replaceEach(mainClass.getDependency(), new String[] {"[", "]", " "}, @@ -781,7 +781,7 @@ public class MicroServiceDictionaryController { ArrayList dependency = new ArrayList<>(Arrays.asList(dependTemp.split(","))); dependency = getFullDependencyList(dependency); for (String element : dependency) { - MSAttributeObject temp = classMap.get(element); + MsAttributeObject temp = classMap.get(element); if (temp != null) { mainClass.addAllRefAttribute(temp.getRefAttribute()); mainClass.addAllAttribute(temp.getAttribute()); @@ -812,7 +812,7 @@ public class MicroServiceDictionaryController { returnList.addAll(dependency); for (String element : dependency) { if (classMap.containsKey(element)) { - MSAttributeObject value = classMap.get(element); + MsAttributeObject value = classMap.get(element); String rawValue = StringUtils.replaceEach(value.getDependency(), new String[] {"[", "]"}, new String[] {"", ""}); workingList = new ArrayList<>(Arrays.asList(rawValue.split(",")));