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%2FClosedLoopDictionaryController.java;h=16e8e2e2c97f6961cbc4c76881a473a80ccc9563;hp=0b94b40bc818034a05b9f539026d794fc1e9e4ec;hb=2f3ca9fc5edc5a52659b3486605e0db508143318;hpb=0c20d1c294fe146e1018f14b07a8d861c29fe527 diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryController.java index 0b94b40bc..16e8e2e2c 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryController.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryController.java @@ -38,7 +38,7 @@ import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.ClosedLoopD2Services; import org.onap.policy.rest.jpa.ClosedLoopSite; import org.onap.policy.rest.jpa.OnapName; -import org.onap.policy.rest.jpa.PEPOptions; +import org.onap.policy.rest.jpa.PepOptions; import org.onap.policy.rest.jpa.UserInfo; import org.onap.policy.rest.jpa.VNFType; import org.onap.policy.rest.jpa.VSCLAction; @@ -134,7 +134,7 @@ public class ClosedLoopDictionaryController { produces = MediaType.APPLICATION_JSON_VALUE) public void getPEPOptionsDictionaryByNameEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); - utils.getDataByEntity(response, pepOptionDatas, pepName, PEPOptions.class); + utils.getDataByEntity(response, pepOptionDatas, pepName, PepOptions.class); } @RequestMapping( @@ -143,7 +143,7 @@ public class ClosedLoopDictionaryController { produces = MediaType.APPLICATION_JSON_VALUE) public void getPEPOptionsDictionaryEntityData(HttpServletResponse response) { DictionaryUtils utils = getDictionaryUtilsInstance(); - utils.getData(response, pepOptionDatas, PEPOptions.class); + utils.getData(response, pepOptionDatas, PepOptions.class); } @RequestMapping( @@ -336,15 +336,15 @@ public class ClosedLoopDictionaryController { ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); JsonNode root = mapper.readTree(request.getReader()); - PEPOptions pEPOptions; + PepOptions pEPOptions; GridData gridData; String userId = null; if (fromAPI) { - pEPOptions = mapper.readValue(root.get(dictionaryFields).toString(), PEPOptions.class); + pEPOptions = mapper.readValue(root.get(dictionaryFields).toString(), PepOptions.class); gridData = mapper.readValue(root.get(dictionaryFields).toString(), GridData.class); userId = "API"; } else { - pEPOptions = mapper.readValue(root.get("pepOptionsDictionaryData").toString(), PEPOptions.class); + pEPOptions = mapper.readValue(root.get("pepOptionsDictionaryData").toString(), PepOptions.class); gridData = mapper.readValue(root.get("pepOptionsDictionaryData").toString(), GridData.class); userId = root.get(userid).textValue(); } @@ -355,10 +355,10 @@ public class ClosedLoopDictionaryController { } List duplicateData = - commonClassDao.checkDuplicateEntry(pEPOptions.getPepName(), pepName, PEPOptions.class); + commonClassDao.checkDuplicateEntry(pEPOptions.getPepName(), pepName, PepOptions.class); boolean duplicateflag = false; if (!duplicateData.isEmpty()) { - PEPOptions data = (PEPOptions) duplicateData.get(0); + PepOptions data = (PepOptions) duplicateData.get(0); if (request.getParameter(operation) != null && "update".equals(request.getParameter(operation))) { pEPOptions.setId(data.getId()); } else if ((request.getParameter(operation) != null @@ -377,7 +377,7 @@ public class ClosedLoopDictionaryController { pEPOptions.setModifiedDate(new Date()); commonClassDao.update(pEPOptions); } - responseString = mapper.writeValueAsString(commonClassDao.getData(PEPOptions.class)); + responseString = mapper.writeValueAsString(commonClassDao.getData(PepOptions.class)); } else { responseString = duplicateResponseString; }