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;h=dfd7af48d78dfa5ee9aee2ede9419354cf44da04;hp=1582dab190daa288e9096446e23b67a25fc30ddd;hb=e4ac1ef3c51fc9afe44849ada5bea8c3d6057897;hpb=1e61676b77dd09659027b8984f050df7e8538526 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 1582dab19..dfd7af48d 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 @@ -45,7 +45,7 @@ import org.onap.policy.pap.xacml.rest.XACMLPapServlet; import org.onap.policy.pap.xacml.rest.util.DictionaryUtils; import org.onap.policy.pap.xacml.rest.util.JsonMessage; import org.onap.policy.rest.dao.CommonClassDao; -import org.onap.policy.rest.jpa.DCAEuuid; +import org.onap.policy.rest.jpa.DcaeUuid; import org.onap.policy.rest.jpa.DictionaryData; import org.onap.policy.rest.jpa.MicroServiceAttribute; import org.onap.policy.rest.jpa.MicroServiceConfigName; @@ -119,7 +119,7 @@ public class MicroServiceDictionaryController { produces = MediaType.APPLICATION_JSON_VALUE) public void getDCAEUUIDDictionaryByNameEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); - utils.getDataByEntity(response, dcaeUUIDDatas, "name", DCAEuuid.class); + utils.getDataByEntity(response, dcaeUUIDDatas, "name", DcaeUuid.class); } @RequestMapping( @@ -128,7 +128,7 @@ public class MicroServiceDictionaryController { produces = MediaType.APPLICATION_JSON_VALUE) public void getDCAEUUIDDictionaryEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); - utils.getData(response, dcaeUUIDDatas, DCAEuuid.class); + utils.getData(response, dcaeUUIDDatas, DcaeUuid.class); } @RequestMapping(value = {"/ms_dictionary/save_dcaeUUID"}, method = {RequestMethod.POST}) @@ -140,17 +140,17 @@ public class MicroServiceDictionaryController { ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); JsonNode root = mapper.readTree(request.getReader()); - DCAEuuid dCAEuuid; + DcaeUuid dCAEuuid; if (fromAPI) { - dCAEuuid = mapper.readValue(root.get(dictionaryFields).toString(), DCAEuuid.class); + dCAEuuid = mapper.readValue(root.get(dictionaryFields).toString(), DcaeUuid.class); } else { - dCAEuuid = mapper.readValue(root.get("dcaeUUIDDictionaryData").toString(), DCAEuuid.class); + dCAEuuid = mapper.readValue(root.get("dcaeUUIDDictionaryData").toString(), DcaeUuid.class); } - List duplicateData = commonClassDao.checkDuplicateEntry(dCAEuuid.getName(), "name", DCAEuuid.class); + List duplicateData = commonClassDao.checkDuplicateEntry(dCAEuuid.getName(), "name", DcaeUuid.class); boolean duplicateflag = false; if (duplicateData != null && !duplicateData.isEmpty()) { - DCAEuuid data = (DCAEuuid) duplicateData.get(0); + DcaeUuid data = (DcaeUuid) duplicateData.get(0); if (request.getParameter(operation) != null && "update".equals(request.getParameter(operation))) { dCAEuuid.setId(data.getId()); } else if ((request.getParameter(operation) != null @@ -166,7 +166,7 @@ public class MicroServiceDictionaryController { } else { commonClassDao.update(dCAEuuid); } - responseString = mapper.writeValueAsString(commonClassDao.getData(DCAEuuid.class)); + responseString = mapper.writeValueAsString(commonClassDao.getData(DcaeUuid.class)); } else { responseString = duplicateResponseString; } @@ -184,7 +184,7 @@ public class MicroServiceDictionaryController { @RequestMapping(value = {"/ms_dictionary/remove_dcaeuuid"}, method = {RequestMethod.POST}) public void removeDCAEUUIDDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException { DictionaryUtils utils = getDictionaryUtilsInstance(); - utils.removeData(request, response, dcaeUUIDDatas, DCAEuuid.class); + utils.removeData(request, response, dcaeUUIDDatas, DcaeUuid.class); } @RequestMapping(