diff options
author | liamfallon <liam.fallon@est.tech> | 2019-11-13 14:08:14 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-11-13 22:16:10 +0000 |
commit | 2f3ca9fc5edc5a52659b3486605e0db508143318 (patch) | |
tree | 0511aa5f0d117fa78032f5b91b2024b57dba5913 /ONAP-PAP-REST/src/main/java/org/onap | |
parent | 0c20d1c294fe146e1018f14b07a8d861c29fe527 (diff) |
Unit/SONAR/Checkstyle in ONAP-REST
Fourth batch of JPA pojos (N-P), with JUnit added and SONAR/Checkstyle
issues addressed. In cases where a class name change caused an update in
another package, the license header on files for those knock on changes
are not updated.
Issue-ID: POLICY-2131
Change-Id: I9319b514b5c19e6837c34566dde770673d16bca3
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'ONAP-PAP-REST/src/main/java/org/onap')
11 files changed, 55 insertions, 55 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/DictionaryNames.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/DictionaryNames.java index 2bb2e95bb..0e1cc521a 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/DictionaryNames.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/DictionaryNames.java @@ -36,7 +36,7 @@ public enum DictionaryNames { VSCLAction, ClosedLoopService, ClosedLoopSite, - PEPOptions, + PepOptions, VarbindDictionary, BRMSParamDictionary, BRMSControllerDictionary, diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/UpdateOthersPAPS.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/UpdateOthersPAPS.java index 2bb4229a6..1b25c3b9f 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/UpdateOthersPAPS.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/UpdateOthersPAPS.java @@ -48,7 +48,7 @@ import org.onap.policy.rest.XacmlRestProperties; import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.ActionBodyEntity; import org.onap.policy.rest.jpa.ConfigurationDataEntity; -import org.onap.policy.rest.jpa.PolicyDBDaoEntity; +import org.onap.policy.rest.jpa.PolicyDbDaoEntity; import org.onap.policy.utils.PeCryptoUtils; import org.onap.policy.xacml.api.XACMLErrorConstants; import org.springframework.beans.factory.annotation.Autowired; @@ -103,11 +103,11 @@ public class UpdateOthersPAPS { body.setOldPolicyName(request.getParameter("oldPolicyName")); String currentPap = XacmlRestProperties.getProperty("xacml.rest.pap.url"); - List<Object> getPAPUrls = commonClassDao.getData(PolicyDBDaoEntity.class); + List<Object> getPAPUrls = commonClassDao.getData(PolicyDbDaoEntity.class); if (getPAPUrls != null && !getPAPUrls.isEmpty()) { for (int i = 0; i < getPAPUrls.size(); i++) { - PolicyDBDaoEntity papId = (PolicyDBDaoEntity) getPAPUrls.get(i); - String papUrl = papId.getPolicyDBDaoUrl(); + PolicyDbDaoEntity papId = (PolicyDbDaoEntity) getPAPUrls.get(i); + String papUrl = papId.getPolicyDbDaoUrl(); if (!papUrl.equals(currentPap)) { String userName = papId.getUsername(); String password = papId.getPassword(); diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/CreateNewMicroServiceModel.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/CreateNewMicroServiceModel.java index 573f274f2..ea5e8aa43 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/CreateNewMicroServiceModel.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/CreateNewMicroServiceModel.java @@ -275,7 +275,7 @@ public class CreateNewMicroServiceModel { newModel.setDependency("[]"); if (mainClass.getSubClass() != null) { String value = new Gson().toJson(mainClass.getSubClass()); - newModel.setSub_attributes(value); + newModel.setSubAttributes(value); } if (mainClass.getAttribute() != null) { @@ -289,7 +289,7 @@ public class CreateNewMicroServiceModel { String refAttributes = mainClass.getRefAttribute().toString().replace("{", "").replace("}", ""); int equalsIndex = refAttributes.indexOf("="); String refAttributesAfterFirstEquals = refAttributes.substring(equalsIndex + 1); - this.newModel.setRef_attributes(refAttributesAfterFirstEquals); + this.newModel.setRefAttributes(refAttributesAfterFirstEquals); } if (mainClass.getEnumType() != null) { @@ -328,14 +328,14 @@ public class CreateNewMicroServiceModel { } subAttribute = utils.createSubAttributes(dependency, classMap, this.newModel.getModelName()); - this.newModel.setSub_attributes(subAttribute); + this.newModel.setSubAttributes(subAttribute); if (mainClass.getAttribute() != null && !mainClass.getAttribute().isEmpty()) { this.newModel.setAttributes(mainClass.getAttribute().toString().replace("{", "").replace("}", "")); } if (mainClass.getRefAttribute() != null && !mainClass.getRefAttribute().isEmpty()) { this.newModel - .setRef_attributes(mainClass.getRefAttribute().toString().replace("{", "").replace("}", "")); + .setRefAttributes(mainClass.getRefAttribute().toString().replace("{", "").replace("}", "")); } if (mainClass.getEnumType() != null && !mainClass.getEnumType().isEmpty()) { @@ -368,8 +368,8 @@ public class CreateNewMicroServiceModel { model.setDependency(this.newModel.getDependency()); model.setDescription(this.newModel.getDescription()); model.setEnumValues(this.newModel.getEnumValues()); - model.setRef_attributes(this.newModel.getRef_attributes()); - model.setSub_attributes(this.newModel.getSub_attributes()); + model.setRefAttributes(this.newModel.getRefAttributes()); + model.setSubAttributes(this.newModel.getSubAttributes()); model.setDataOrderInfo(this.newModel.getDataOrderInfo()); model.setDecisionModel(this.newModel.isDecisionModel()); model.setRuleFormation(this.newModel.getRuleFormation()); diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/NotifyOtherPaps.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/NotifyOtherPaps.java index cd290c66c..e9db043bf 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/NotifyOtherPaps.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/NotifyOtherPaps.java @@ -35,13 +35,13 @@ import java.util.UUID; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.rest.XacmlRestProperties; -import org.onap.policy.rest.jpa.PolicyDBDaoEntity; +import org.onap.policy.rest.jpa.PolicyDbDaoEntity; import org.onap.policy.utils.PeCryptoUtils; public class NotifyOtherPaps { private static final Logger LOGGER = FlexLogger.getLogger(NotifyOtherPaps.class); - private List<PolicyDBDaoEntity> failedPaps = null; + private List<PolicyDbDaoEntity> failedPaps = null; public void notifyOthers(long entityId, String entityType) { notifyOthers(entityId, entityType, null); @@ -104,8 +104,8 @@ public class NotifyOtherPaps { @Override public void run() { PolicyDbDao dao = new PolicyDbDao(); - PolicyDBDaoEntity dbdEntity = (PolicyDBDaoEntity) obj; - String otherPap = dbdEntity.getPolicyDBDaoUrl(); + PolicyDbDaoEntity dbdEntity = (PolicyDbDaoEntity) obj; + String otherPap = dbdEntity.getPolicyDbDaoUrl(); String txt; try { txt = PeCryptoUtils.decrypt(dbdEntity.getPassword()); diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDbDao.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDbDao.java index e0db53e8b..9af380b05 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDbDao.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDbDao.java @@ -59,7 +59,7 @@ import org.onap.policy.rest.jpa.ConfigurationDataEntity; import org.onap.policy.rest.jpa.DatabaseLockEntity; import org.onap.policy.rest.jpa.GroupEntity; import org.onap.policy.rest.jpa.PdpEntity; -import org.onap.policy.rest.jpa.PolicyDBDaoEntity; +import org.onap.policy.rest.jpa.PolicyDbDaoEntity; import org.onap.policy.rest.jpa.PolicyEntity; import org.onap.policy.utils.PeCryptoUtils; import org.onap.policy.xacml.api.XACMLErrorConstants; @@ -212,14 +212,14 @@ public class PolicyDbDao { /** * Gets the list of other registered PolicyDBDaos from the database. * - * @return List (type PolicyDBDaoEntity) of other PolicyDBDaos + * @return List (type PolicyDbDaoEntity) of other PolicyDBDaos */ private List<?> getRemotePolicyDbDaoList() { logger.debug("getRemotePolicyDBDaoList() as getRemotePolicyDBDaoList() called"); List<?> policyDbDaoEntityList = new LinkedList<>(); Session session = sessionfactory.openSession(); try { - Criteria cr = session.createCriteria(PolicyDBDaoEntity.class); + Criteria cr = session.createCriteria(PolicyDbDaoEntity.class); policyDbDaoEntityList = cr.list(); } catch (Exception e) { PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, POLICYDBDAO_VAR, @@ -328,7 +328,7 @@ public class PolicyDbDao { } /** - * Register the PolicyDBDao instance in the PolicyDBDaoEntity table. + * Register the PolicyDBDao instance in the PolicyDbDaoEntity table. * * @return Boolean, were we able to register? */ @@ -370,19 +370,19 @@ public class PolicyDbDao { } } logger.debug("\nPolicyDBDao.register. Database locking and concurrency control is initialized\n"); - PolicyDBDaoEntity foundPolicyDbDaoEntity = null; - Criteria cr = session.createCriteria(PolicyDBDaoEntity.class); - cr.add(Restrictions.eq("policyDBDaoUrl", url[0])); + PolicyDbDaoEntity foundPolicyDbDaoEntity = null; + Criteria cr = session.createCriteria(PolicyDbDaoEntity.class); + cr.add(Restrictions.eq("policyDbDaoUrl", url[0])); List<?> data = cr.list(); if (!data.isEmpty()) { - foundPolicyDbDaoEntity = (PolicyDBDaoEntity) data.get(0); + foundPolicyDbDaoEntity = (PolicyDbDaoEntity) data.get(0); } // encrypt the password String txt = PeCryptoUtils.encrypt(url[2]); if (foundPolicyDbDaoEntity == null) { - PolicyDBDaoEntity newPolicyDbDaoEntity = new PolicyDBDaoEntity(); - newPolicyDbDaoEntity.setPolicyDBDaoUrl(url[0]); + PolicyDbDaoEntity newPolicyDbDaoEntity = new PolicyDbDaoEntity(); + newPolicyDbDaoEntity.setPolicyDbDaoUrl(url[0]); newPolicyDbDaoEntity.setDescription("PAP server at " + url[0]); newPolicyDbDaoEntity.setUsername(url[1]); newPolicyDbDaoEntity.setPassword(txt); 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<Object> 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; } diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryController.java index 5de2dfbc2..e2e2e3872 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryController.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryController.java @@ -211,7 +211,7 @@ public class DictionaryController { UserInfo userInfo = utils.getUserInfo(userId); List<Object> duplicateData = - commonClassDao.checkDuplicateEntry(onapData.getOnapName(), onapName, OnapName.class); + commonClassDao.checkDuplicateEntry(onapData.getName(), onapName, OnapName.class); boolean duplicateflag = false; if (!duplicateData.isEmpty()) { OnapName data = (OnapName) duplicateData.get(0); diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryImportController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryImportController.java index 7400eb0c8..ef475039d 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryImportController.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryImportController.java @@ -56,7 +56,7 @@ import org.onap.policy.rest.jpa.DescriptiveScope; import org.onap.policy.rest.jpa.GroupServiceList; import org.onap.policy.rest.jpa.MicroServiceModels; 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.PrefixList; import org.onap.policy.rest.jpa.ProtocolList; import org.onap.policy.rest.jpa.SecurityZone; @@ -213,7 +213,7 @@ public class DictionaryImportController { for (int j = 0; j < rows.length; j++) { if ("onap_name".equalsIgnoreCase(dictSheet.get(0)[j]) || "Onap Name".equalsIgnoreCase(dictSheet.get(0)[j])) { - attribute.setOnapName(rows[j]); + attribute.setName(rows[j]); } if (DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])) { attribute.setDescription(rows[j]); @@ -252,10 +252,10 @@ public class DictionaryImportController { attribute.setEnumValues(rows[j]); } if ("Ref Attributes".equalsIgnoreCase(dictSheet.get(0)[j])) { - attribute.setRef_attributes(rows[j]); + attribute.setRefAttributes(rows[j]); } if ("Sub Attributes".equalsIgnoreCase(dictSheet.get(0)[j])) { - attribute.setSub_attributes(rows[j]); + attribute.setSubAttributes(rows[j]); } if ("annotations".equalsIgnoreCase(dictSheet.get(0)[j])) { attribute.setAnnotation(rows[j]); @@ -295,10 +295,10 @@ public class DictionaryImportController { attribute.setEnumValues(rows[j]); } if ("Ref Attributes".equalsIgnoreCase(dictSheet.get(0)[j])) { - attribute.setRef_attributes(rows[j]); + attribute.setRefAttributes(rows[j]); } if ("Sub Attributes".equalsIgnoreCase(dictSheet.get(0)[j])) { - attribute.setSub_attributes(rows[j]); + attribute.setSubAttributes(rows[j]); } if ("annotations".equalsIgnoreCase(dictSheet.get(0)[j])) { attribute.setAnnotation(rows[j]); @@ -389,9 +389,9 @@ public class DictionaryImportController { commonClassDao.save(attribute); } } - if (dictionaryName.startsWith("PEPOptions")) { + if (dictionaryName.startsWith("PepOptions")) { for (int i = 1; i < dictSheet.size(); i++) { - PEPOptions attribute = new PEPOptions(); + PepOptions attribute = new PepOptions(); UserInfo userinfo = new UserInfo(); userinfo.setUserLoginId(userId); attribute.setUserCreatedBy(userinfo); @@ -801,7 +801,7 @@ public class DictionaryImportController { case VSCLAction: case ClosedLoopService: case ClosedLoopSite: - case PEPOptions: + case PepOptions: case VarbindDictionary: case BRMSParamDictionary: case BRMSControllerDictionary: 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 dfd7af48d..b9e1ce1ce 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 @@ -658,7 +658,7 @@ public class MicroServiceDictionaryController { MSAttributeObject mainClass = classMap.get(this.newModel.getModelName()); this.newModel.setDependency("[]"); String value = new Gson().toJson(mainClass.getSubClass()); - this.newModel.setSub_attributes(value); + this.newModel.setSubAttributes(value); String attributes = mainClass.getAttribute().toString().replace("{", "").replace("}", ""); int equalsIndexForAttributes = attributes.indexOf('='); String atttributesAfterFirstEquals = attributes.substring(equalsIndexForAttributes + 1); @@ -666,7 +666,7 @@ public class MicroServiceDictionaryController { String refAttributes = mainClass.getRefAttribute().toString().replace("{", "").replace("}", ""); int equalsIndex = refAttributes.indexOf("="); String refAttributesAfterFirstEquals = refAttributes.substring(equalsIndex + 1); - this.newModel.setRef_attributes(refAttributesAfterFirstEquals); + this.newModel.setRefAttributes(refAttributesAfterFirstEquals); this.newModel.setEnumValues(mainClass.getEnumType().toString().replace("{", "").replace("}", "")); this.newModel .setAnnotation(mainClass.getMatchingSet().toString().replace("{", "").replace("}", "")); @@ -713,10 +713,10 @@ public class MicroServiceDictionaryController { } } microServiceModels.setAttributes(this.newModel.getAttributes()); - microServiceModels.setRef_attributes(this.newModel.getRef_attributes()); + microServiceModels.setRefAttributes(this.newModel.getRefAttributes()); microServiceModels.setDependency(this.newModel.getDependency()); microServiceModels.setModelName(this.newModel.getModelName()); - microServiceModels.setSub_attributes(this.newModel.getSub_attributes()); + microServiceModels.setSubAttributes(this.newModel.getSubAttributes()); microServiceModels.setVersion(this.newModel.getVersion()); microServiceModels.setEnumValues(this.newModel.getEnumValues()); microServiceModels.setAnnotation(this.newModel.getAnnotation()); @@ -798,9 +798,9 @@ public class MicroServiceDictionaryController { } if (mainClass != null) { this.newModel.setDependency(mainClass.getDependency()); - this.newModel.setSub_attributes(subAttribute); + this.newModel.setSubAttributes(subAttribute); this.newModel.setAttributes(mainClass.getAttribute().toString().replace("{", "").replace("}", "")); - this.newModel.setRef_attributes(mainClass.getRefAttribute().toString().replace("{", "").replace("}", "")); + this.newModel.setRefAttributes(mainClass.getRefAttribute().toString().replace("{", "").replace("}", "")); this.newModel.setEnumValues(mainClass.getEnumType().toString().replace("{", "").replace("}", "")); this.newModel.setAnnotation(mainClass.getMatchingSet().toString().replace("{", "").replace("}", "")); } diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java index ad6b9cf8e..f21ac60c8 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java @@ -58,7 +58,7 @@ import org.onap.policy.rest.jpa.GroupPolicyScopeList; import org.onap.policy.rest.jpa.MicroServiceLocation; import org.onap.policy.rest.jpa.MicroServiceModels; 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.RiskType; import org.onap.policy.rest.jpa.SafePolicyWarning; import org.onap.policy.rest.jpa.TermList; @@ -340,7 +340,7 @@ public class PolicyElasticSearchController { break; case onapName: OnapName onapName = mapper.readValue(root.get("data").toString(), OnapName.class); - value = onapName.getOnapName(); + value = onapName.getName(); policyList = searchElkDatabase(all, "onapName", value); break; case actionPolicy: @@ -356,7 +356,7 @@ public class PolicyElasticSearchController { policyList = searchElkDatabase(config, "ruleName", value); break; case pepOptions: - PEPOptions pEPOptions = mapper.readValue(root.get("data").toString(), PEPOptions.class); + PepOptions pEPOptions = mapper.readValue(root.get("data").toString(), PepOptions.class); value = pEPOptions.getPepName(); policyList = searchElkDatabase(closedloop, "jsonBodyData.pepName", value); break; diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java index 65c50b1c0..f16c2031c 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java @@ -56,7 +56,7 @@ public class DictionaryHandlerImpl implements DictionaryHandler { case "VNFType": dictionary.getVnfType(response); break; - case "PEPOptions": + case "PepOptions": dictionary.getPEPOptions(response); break; case "Varbind": @@ -206,7 +206,7 @@ public class DictionaryHandlerImpl implements DictionaryHandler { case "VNFType": result = dictionary.saveVnfType(request, response); break; - case "PEPOptions": + case "PepOptions": result = dictionary.savePEPOptions(request, response); break; case "Varbind": |