summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-11-15 13:35:42 +0000
committerliamfallon <liam.fallon@est.tech>2019-11-15 15:23:42 +0000
commitd4e3a1b394715c6386f963130e4e081d421ecd1b (patch)
tree1ef224fb04c4d5e93f02f33ef38994b04e52bdf6 /ONAP-PAP-REST
parentd79badf67d5c253eb9883ac823626d7efa16c731 (diff)
Unit/SONAR/Checkstyle in ONAP-REST
Fifth and final batch of JPA pojos (Q-Z), 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: I1cc536a5b8a0cd3c6beff068dd72381f7ae10d12 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'ONAP-PAP-REST')
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java18
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryController.java50
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/DictionaryImportController.java24
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/FirewallDictionaryController.java10
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/SafePolicyController.java2
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java14
-rw-r--r--ONAP-PAP-REST/src/main/resources/META-INF/persistence.xml8
-rw-r--r--ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java2
-rw-r--r--ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryControllerTest.java16
9 files changed, 72 insertions, 72 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java
index 01c211cdb..e153ea834 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java
@@ -610,16 +610,16 @@ public class FirewallConfigPolicy extends Policy {
TermList termEntry = new TermList();
termEntry.setTermName(ruleName);
- termEntry.setSrcIPList(srcListInsert);
- termEntry.setDestIPList(destListInsert);
+ termEntry.setSrcIpList(srcListInsert);
+ termEntry.setDestIpList(destListInsert);
termEntry.setProtocolList("null");
termEntry.setPortList("null");
termEntry.setSrcPortList("null");
termEntry.setDestPortList(destPortListInsert);
termEntry.setAction(action);
termEntry.setDescription(description);
- termEntry.setFromZones(fromZoneInsert);
- termEntry.setToZones(toZoneInsert);
+ termEntry.setFromZone(fromZoneInsert);
+ termEntry.setToZone(toZoneInsert);
termEntry.setUserCreatedBy(userInfo);
dbConnection.save(termEntry);
@@ -962,16 +962,16 @@ public class FirewallConfigPolicy extends Policy {
TermList termEntry = new TermList();
termEntry.setTermName(ruleName);
- termEntry.setSrcIPList(srcListInsert);
- termEntry.setDestIPList(destListInsert);
+ termEntry.setSrcIpList(srcListInsert);
+ termEntry.setDestIpList(destListInsert);
termEntry.setProtocolList("null");
termEntry.setPortList("null");
termEntry.setSrcPortList("null");
termEntry.setDestPortList(destPortListInsert);
termEntry.setAction(action);
termEntry.setDescription(description);
- termEntry.setFromZones(fromZoneInsert);
- termEntry.setToZones(toZoneInsert);
+ termEntry.setFromZone(fromZoneInsert);
+ termEntry.setToZone(toZoneInsert);
termEntry.setUserCreatedBy(userInfo);
dbConnection.save(termEntry);
@@ -1144,7 +1144,7 @@ public class FirewallConfigPolicy extends Policy {
serviceListEntry.setServiceName(groupName);
serviceListEntry.setServiceDescription(description);
serviceListEntry.setServiceType(type);
- serviceListEntry.setServiceTransProtocol(transportProtocol);
+ serviceListEntry.setServiceTransportProtocol(transportProtocol);
serviceListEntry.setServiceAppProtocol("null");
serviceListEntry.setServicePorts(ports);
dbConnection.save(serviceListEntry);
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 16e8e2e2c..9ea956aa7 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
@@ -40,8 +40,8 @@ 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.UserInfo;
-import org.onap.policy.rest.jpa.VNFType;
-import org.onap.policy.rest.jpa.VSCLAction;
+import org.onap.policy.rest.jpa.VnfType;
+import org.onap.policy.rest.jpa.VsclAction;
import org.onap.policy.rest.jpa.VarbindDictionary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
@@ -54,9 +54,9 @@ import org.springframework.web.servlet.ModelAndView;
public class ClosedLoopDictionaryController {
private static CommonClassDao commonClassDao;
- private static String vsclaction = "vsclaction";
+ private static String vsclaction = "action";
private static String operation = "operation";
- private static String vnftype = "vnftype";
+ private static String vnftype = "type";
private static String pepName = "pepName";
private static String varbindName = "varbindName";
private static String serviceName = "serviceName";
@@ -98,7 +98,7 @@ public class ClosedLoopDictionaryController {
produces = MediaType.APPLICATION_JSON_VALUE)
public void getVSCLActionDictionaryByNameEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
- utils.getDataByEntity(response, vsclActionDatas, vsclaction, VSCLAction.class);
+ utils.getDataByEntity(response, vsclActionDatas, vsclaction, VsclAction.class);
}
@RequestMapping(
@@ -107,7 +107,7 @@ public class ClosedLoopDictionaryController {
produces = MediaType.APPLICATION_JSON_VALUE)
public void getVSCLActionDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
- utils.getData(response, vsclActionDatas, VSCLAction.class);
+ utils.getData(response, vsclActionDatas, VsclAction.class);
}
@RequestMapping(
@@ -116,7 +116,7 @@ public class ClosedLoopDictionaryController {
produces = MediaType.APPLICATION_JSON_VALUE)
public void getVNFTypeDictionaryByNameEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
- utils.getDataByEntity(response, vnfTypeDatas, vnftype, VNFType.class);
+ utils.getDataByEntity(response, vnfTypeDatas, vnftype, VnfType.class);
}
@RequestMapping(
@@ -125,7 +125,7 @@ public class ClosedLoopDictionaryController {
produces = MediaType.APPLICATION_JSON_VALUE)
public void getVNFTypeDictionaryEntityData(HttpServletResponse response) {
DictionaryUtils utils = getDictionaryUtilsInstance();
- utils.getData(response, vnfTypeDatas, VNFType.class);
+ utils.getData(response, vnfTypeDatas, VnfType.class);
}
@RequestMapping(
@@ -208,22 +208,22 @@ public class ClosedLoopDictionaryController {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonNode root = mapper.readTree(request.getReader());
- VSCLAction vSCLAction;
+ VsclAction vSCLAction;
String userId = null;
if (fromAPI) {
- vSCLAction = mapper.readValue(root.get(dictionaryFields).toString(), VSCLAction.class);
+ vSCLAction = mapper.readValue(root.get(dictionaryFields).toString(), VsclAction.class);
userId = "API";
} else {
- vSCLAction = mapper.readValue(root.get("vsclActionDictionaryData").toString(), VSCLAction.class);
+ vSCLAction = mapper.readValue(root.get("vsclActionDictionaryData").toString(), VsclAction.class);
userId = root.get(userid).textValue();
}
UserInfo userInfo = utils.getUserInfo(userId);
List<Object> duplicateData =
- commonClassDao.checkDuplicateEntry(vSCLAction.getVsclaction(), vsclaction, VSCLAction.class);
+ commonClassDao.checkDuplicateEntry(vSCLAction.getAction(), vsclaction, VsclAction.class);
boolean duplicateflag = false;
if (!duplicateData.isEmpty()) {
- VSCLAction data = (VSCLAction) duplicateData.get(0);
+ VsclAction data = (VsclAction) duplicateData.get(0);
if (request.getParameter(operation) != null && "update".equals(request.getParameter(operation))) {
vSCLAction.setId(data.getId());
} else if ((request.getParameter(operation) != null
@@ -242,7 +242,7 @@ public class ClosedLoopDictionaryController {
vSCLAction.setModifiedDate(new Date());
commonClassDao.update(vSCLAction);
}
- responseString = mapper.writeValueAsString(commonClassDao.getData(VSCLAction.class));
+ responseString = mapper.writeValueAsString(commonClassDao.getData(VsclAction.class));
} else {
responseString = duplicateResponseString;
}
@@ -272,22 +272,22 @@ public class ClosedLoopDictionaryController {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonNode root = mapper.readTree(request.getReader());
- VNFType vNFType;
+ VnfType vNFType;
String userId = null;
if (fromAPI) {
- vNFType = mapper.readValue(root.get(dictionaryFields).toString(), VNFType.class);
+ vNFType = mapper.readValue(root.get(dictionaryFields).toString(), VnfType.class);
userId = "API";
} else {
- vNFType = mapper.readValue(root.get("vnfTypeDictionaryData").toString(), VNFType.class);
+ vNFType = mapper.readValue(root.get("vnfTypeDictionaryData").toString(), VnfType.class);
userId = root.get(userid).textValue();
}
UserInfo userInfo = utils.getUserInfo(userId);
List<Object> duplicateData =
- commonClassDao.checkDuplicateEntry(vNFType.getVnftype(), vnftype, VNFType.class);
+ commonClassDao.checkDuplicateEntry(vNFType.getType(), vnftype, VnfType.class);
boolean duplicateflag = false;
if (!duplicateData.isEmpty()) {
- VNFType data = (VNFType) duplicateData.get(0);
+ VnfType data = (VnfType) duplicateData.get(0);
if (request.getParameter(operation) != null && "update".equals(request.getParameter(operation))) {
vNFType.setId(data.getId());
} else if ((request.getParameter(operation) != null
@@ -306,7 +306,7 @@ public class ClosedLoopDictionaryController {
vNFType.setModifiedDate(new Date());
commonClassDao.update(vNFType);
}
- responseString = mapper.writeValueAsString(commonClassDao.getData(VNFType.class));
+ responseString = mapper.writeValueAsString(commonClassDao.getData(VnfType.class));
} else {
responseString = duplicateResponseString;
}
@@ -325,7 +325,7 @@ public class ClosedLoopDictionaryController {
@RequestMapping(value = {"/cl_dictionary/remove_vnfType"}, method = {RequestMethod.POST})
public void removeVnfType(HttpServletRequest request, HttpServletResponse response) throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
- utils.removeData(request, response, vnfTypeDatas, VNFType.class);
+ utils.removeData(request, response, vnfTypeDatas, VnfType.class);
}
@RequestMapping(value = {"/cl_dictionary/save_pepOptions"}, method = {RequestMethod.POST})
@@ -396,7 +396,7 @@ public class ClosedLoopDictionaryController {
@RequestMapping(value = {"/cl_dictionary/remove_pepOptions"}, method = {RequestMethod.POST})
public void removePEPOptions(HttpServletRequest request, HttpServletResponse response) throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
- utils.removeData(request, response, pepOptionDatas, VNFType.class);
+ utils.removeData(request, response, pepOptionDatas, VnfType.class);
}
@RequestMapping(value = {"/cl_dictionary/save_service"}, method = {RequestMethod.POST})
@@ -460,7 +460,7 @@ public class ClosedLoopDictionaryController {
@RequestMapping(value = {"/cl_dictionary/remove_Service"}, method = {RequestMethod.POST})
public void removeServiceType(HttpServletRequest request, HttpServletResponse response) throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
- utils.removeData(request, response, closedLoopDatas, VNFType.class);
+ utils.removeData(request, response, closedLoopDatas, VnfType.class);
}
@RequestMapping(value = {"/cl_dictionary/save_siteName"}, method = {RequestMethod.POST})
@@ -523,7 +523,7 @@ public class ClosedLoopDictionaryController {
@RequestMapping(value = {"/cl_dictionary/remove_site"}, method = {RequestMethod.POST})
public void removeSiteType(HttpServletRequest request, HttpServletResponse response) throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
- utils.removeData(request, response, closedLoopSiteDatas, VNFType.class);
+ utils.removeData(request, response, closedLoopSiteDatas, VnfType.class);
}
@RequestMapping(value = {"/cl_dictionary/save_varbind"}, method = {RequestMethod.POST})
@@ -588,6 +588,6 @@ public class ClosedLoopDictionaryController {
@RequestMapping(value = {"/cl_dictionary/remove_varbindDict"}, method = {RequestMethod.POST})
public void removeVarbind(HttpServletRequest request, HttpServletResponse response) throws IOException {
DictionaryUtils utils = getDictionaryUtilsInstance();
- utils.removeData(request, response, varbindDatas, VNFType.class);
+ utils.removeData(request, response, varbindDatas, VnfType.class);
}
}
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 ef475039d..029582213 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
@@ -63,8 +63,8 @@ import org.onap.policy.rest.jpa.SecurityZone;
import org.onap.policy.rest.jpa.ServiceList;
import org.onap.policy.rest.jpa.TermList;
import org.onap.policy.rest.jpa.UserInfo;
-import org.onap.policy.rest.jpa.VNFType;
-import org.onap.policy.rest.jpa.VSCLAction;
+import org.onap.policy.rest.jpa.VnfType;
+import org.onap.policy.rest.jpa.VsclAction;
import org.onap.policy.rest.jpa.VarbindDictionary;
import org.onap.policy.rest.jpa.Zone;
import org.springframework.beans.factory.annotation.Autowired;
@@ -311,7 +311,7 @@ public class DictionaryImportController {
if (dictionaryName.startsWith("VNFType")) {
for (int i = 1; i < dictSheet.size(); i++) {
- VNFType attribute = new VNFType();
+ VnfType attribute = new VnfType();
UserInfo userinfo = new UserInfo();
userinfo.setUserLoginId(userId);
attribute.setUserCreatedBy(userinfo);
@@ -320,7 +320,7 @@ public class DictionaryImportController {
for (int j = 0; j < rows.length; j++) {
if ("vnf_type".equalsIgnoreCase(dictSheet.get(0)[j])
|| "VNF Type".equalsIgnoreCase(dictSheet.get(0)[j])) {
- attribute.setVnftype(rows[j]);
+ attribute.setType(rows[j]);
}
if (DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])) {
attribute.setDescription(rows[j]);
@@ -331,7 +331,7 @@ public class DictionaryImportController {
}
if (dictionaryName.startsWith("VSCLAction")) {
for (int i = 1; i < dictSheet.size(); i++) {
- VSCLAction attribute = new VSCLAction();
+ VsclAction attribute = new VsclAction();
UserInfo userinfo = new UserInfo();
userinfo.setUserLoginId(userId);
attribute.setUserCreatedBy(userinfo);
@@ -340,7 +340,7 @@ public class DictionaryImportController {
for (int j = 0; j < rows.length; j++) {
if ("vscl_action".equalsIgnoreCase(dictSheet.get(0)[j])
|| "VSCL Action".equalsIgnoreCase(dictSheet.get(0)[j])) {
- attribute.setVsclaction(rows[j]);
+ attribute.setAction(rows[j]);
}
if (DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])) {
attribute.setDescription(rows[j]);
@@ -431,7 +431,7 @@ public class DictionaryImportController {
}
if ("varbind_oid".equalsIgnoreCase(dictSheet.get(0)[j])
|| "Varbind OID".equalsIgnoreCase(dictSheet.get(0)[j])) {
- attribute.setVarbindOID(rows[j]);
+ attribute.setVarbindOid(rows[j]);
}
}
commonClassDao.save(attribute);
@@ -615,7 +615,7 @@ public class DictionaryImportController {
}
if ("serviceTrasProtocol".equalsIgnoreCase(dictSheet.get(0)[j])
|| "Transport Protocol".equalsIgnoreCase(dictSheet.get(0)[j])) {
- attribute.setServiceTransProtocol(rows[j]);
+ attribute.setServiceTransportProtocol(rows[j]);
}
if ("serviceAppProtocol".equalsIgnoreCase(dictSheet.get(0)[j])
|| "APP Protocol".equalsIgnoreCase(dictSheet.get(0)[j])) {
@@ -717,19 +717,19 @@ public class DictionaryImportController {
}
if ("fromZone".equalsIgnoreCase(dictSheet.get(0)[j])
|| "From Zone".equalsIgnoreCase(dictSheet.get(0)[j])) {
- attribute.setFromZones(rows[j]);
+ attribute.setFromZone(rows[j]);
}
if ("toZone".equalsIgnoreCase(dictSheet.get(0)[j])
|| "To Zone".equalsIgnoreCase(dictSheet.get(0)[j])) {
- attribute.setToZones(rows[j]);
+ attribute.setToZone(rows[j]);
}
if ("srcIPList".equalsIgnoreCase(dictSheet.get(0)[j])
|| "Source-IP-List".equalsIgnoreCase(dictSheet.get(0)[j])) {
- attribute.setSrcIPList(rows[j]);
+ attribute.setSrcIpList(rows[j]);
}
if ("destIPList".equalsIgnoreCase(dictSheet.get(0)[j])
|| "Destination-IP-List".equalsIgnoreCase(dictSheet.get(0)[j])) {
- attribute.setDestIPList(rows[j]);
+ attribute.setDestIpList(rows[j]);
}
if ("srcPortList".equalsIgnoreCase(dictSheet.get(0)[j])
|| "Source-Port-List".equalsIgnoreCase(dictSheet.get(0)[j])) {
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/FirewallDictionaryController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/FirewallDictionaryController.java
index 39a12c81a..3c3cbac30 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/FirewallDictionaryController.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/FirewallDictionaryController.java
@@ -713,7 +713,7 @@ public class FirewallDictionaryController {
mapper.readValue(root.get("serviceListDictionaryData").toString(), GridData.class);
}
serviceList
- .setServiceTransProtocol(utils.appendKey(serviceListGridData.getTransportProtocols(), option, ","));
+ .setServiceTransportProtocol(utils.appendKey(serviceListGridData.getTransportProtocols(), option, ","));
serviceList.setServiceAppProtocol(utils.appendKey(serviceListGridData.getAppProtocols(), option, ","));
serviceList.setServiceType("SERVICE");
List<Object> duplicateData =
@@ -871,10 +871,10 @@ public class FirewallDictionaryController {
userId = root.get(userid).textValue();
}
- termList.setFromZones(utils.appendKey(termListDatas.getFromZoneDatas(), option, ","));
- termList.setToZones(utils.appendKey(termListDatas.getToZoneDatas(), option, ","));
- termList.setSrcIPList(utils.appendKey(termListDatas.getSourceListDatas(), option, ","));
- termList.setDestIPList(utils.appendKey(termListDatas.getDestinationListDatas(), option, ","));
+ termList.setFromZone(utils.appendKey(termListDatas.getFromZoneDatas(), option, ","));
+ termList.setToZone(utils.appendKey(termListDatas.getToZoneDatas(), option, ","));
+ termList.setSrcIpList(utils.appendKey(termListDatas.getSourceListDatas(), option, ","));
+ termList.setDestIpList(utils.appendKey(termListDatas.getDestinationListDatas(), option, ","));
termList.setSrcPortList(utils.appendKey(termListDatas.getSourceServiceDatas(), option, ","));
termList.setDestPortList(utils.appendKey(termListDatas.getDestinationServiceDatas(), option, ","));
termList.setAction(utils.appendKey(termListDatas.getActionListDatas(), option, ","));
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/SafePolicyController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/SafePolicyController.java
index d7683fa0b..577870c70 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/SafePolicyController.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/SafePolicyController.java
@@ -107,7 +107,7 @@ public class SafePolicyController {
}
UserInfo userInfo = utils.getUserInfo(userId);
List<Object> duplicateData =
- commonClassDao.checkDuplicateEntry(riskTypeData.getRiskName(), "name", RiskType.class);
+ commonClassDao.checkDuplicateEntry(riskTypeData.getName(), "name", RiskType.class);
boolean duplicateflag = false;
if (!duplicateData.isEmpty()) {
RiskType data = (RiskType) duplicateData.get(0);
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 f21ac60c8..48dc46c1b 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
@@ -62,8 +62,8 @@ 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;
-import org.onap.policy.rest.jpa.VNFType;
-import org.onap.policy.rest.jpa.VSCLAction;
+import org.onap.policy.rest.jpa.VnfType;
+import org.onap.policy.rest.jpa.VsclAction;
import org.onap.policy.rest.jpa.VarbindDictionary;
import org.onap.policy.utils.PolicyUtils;
import org.onap.policy.xacml.api.XACMLErrorConstants;
@@ -378,13 +378,13 @@ public class PolicyElasticSearchController {
policyList = searchElkDatabase(closedloop, jsonBodyData, "*" + value + "*");
break;
case clVnf:
- VNFType vNFType = mapper.readValue(root.get("data").toString(), VNFType.class);
- value = vNFType.getVnftype();
+ VnfType vNFType = mapper.readValue(root.get("data").toString(), VnfType.class);
+ value = vNFType.getType();
policyList = searchElkDatabase(closedloop, jsonBodyData, "*" + value + "*");
break;
case clVSCL:
- VSCLAction vsclAction = mapper.readValue(root.get("data").toString(), VSCLAction.class);
- value = vsclAction.getVsclaction();
+ VsclAction vsclAction = mapper.readValue(root.get("data").toString(), VsclAction.class);
+ value = vsclAction.getAction();
policyList = searchElkDatabase(closedloop, jsonBodyData, "*" + value + "*");
break;
case decision:
@@ -423,7 +423,7 @@ public class PolicyElasticSearchController {
break;
case safeRisk:
RiskType riskType = mapper.readValue(root.get("data").toString(), RiskType.class);
- value = riskType.getRiskName();
+ value = riskType.getName();
policyList = searchElkDatabase(config, "riskType", value);
break;
case safePolicyWarning:
diff --git a/ONAP-PAP-REST/src/main/resources/META-INF/persistence.xml b/ONAP-PAP-REST/src/main/resources/META-INF/persistence.xml
index 0280219a7..fcfe9d271 100644
--- a/ONAP-PAP-REST/src/main/resources/META-INF/persistence.xml
+++ b/ONAP-PAP-REST/src/main/resources/META-INF/persistence.xml
@@ -166,12 +166,12 @@
<class>org.onap.policy.rest.jpa.RuleAlgorithms</class>
<class>org.onap.policy.rest.jpa.SecurityZone</class>
<class>org.onap.policy.rest.jpa.ServiceList</class>
- <class>org.onap.policy.rest.jpa.SystemLogDB</class>
+ <class>org.onap.policy.rest.jpa.SystemLogDb</class>
<class>org.onap.policy.rest.jpa.TermList</class>
<class>org.onap.policy.rest.jpa.VarbindDictionary</class>
- <class>org.onap.policy.rest.jpa.VMType</class>
- <class>org.onap.policy.rest.jpa.VNFType</class>
- <class>org.onap.policy.rest.jpa.VSCLAction</class>
+ <class>org.onap.policy.rest.jpa.VmType</class>
+ <class>org.onap.policy.rest.jpa.VnfType</class>
+ <class>org.onap.policy.rest.jpa.VsclAction</class>
<class>org.onap.policy.rest.jpa.Zone</class>
<!-- unique to PolicyEngineUtils -->
<class>org.onap.policy.jpa.BackUpMonitorEntity</class>
diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java
index f978d7464..f9faa2928 100644
--- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java
+++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/test/XACMLPAPTest.java
@@ -488,7 +488,7 @@ public class XACMLPAPTest {
// Verify
Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
//
- // Check VNFType
+ // Check VnfType
//
httpServletRequest = Mockito.mock(HttpServletRequest.class);
httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryControllerTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryControllerTest.java
index fab361118..8f0d52b21 100644
--- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryControllerTest.java
+++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryControllerTest.java
@@ -44,8 +44,8 @@ import org.onap.policy.rest.jpa.ClosedLoopD2Services;
import org.onap.policy.rest.jpa.ClosedLoopSite;
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;
+import org.onap.policy.rest.jpa.VnfType;
+import org.onap.policy.rest.jpa.VsclAction;
import org.onap.policy.rest.jpa.VarbindDictionary;
import org.springframework.mock.web.MockHttpServletResponse;
@@ -72,8 +72,8 @@ public class ClosedLoopDictionaryControllerTest {
userInfo.setUserLoginId("Test");
userInfo.setUserName("Test");
- doNothing().when(commonClassDao).delete(new VSCLAction());
- doNothing().when(commonClassDao).save(new VSCLAction());
+ doNothing().when(commonClassDao).delete(new VsclAction());
+ doNothing().when(commonClassDao).save(new VsclAction());
controller = new ClosedLoopDictionaryController();
controller.setCommonClassDao(commonClassDao);
@@ -88,7 +88,7 @@ public class ClosedLoopDictionaryControllerTest {
@Test
public void testGetVSCLActionDictionaryByNameEntityData() {
- when(commonClassDao.getDataByColumn(VSCLAction.class, "vsclaction")).thenReturn(data);
+ when(commonClassDao.getDataByColumn(VsclAction.class, "vsclaction")).thenReturn(data);
controller.getVSCLActionDictionaryByNameEntityData(response);
try {
assertTrue(response.getContentAsString() != null
@@ -101,7 +101,7 @@ public class ClosedLoopDictionaryControllerTest {
@Test
public void testGetVSCLActionDictionaryEntityData() {
- when(commonClassDao.getData(VSCLAction.class)).thenReturn(new ArrayList<>());
+ when(commonClassDao.getData(VsclAction.class)).thenReturn(new ArrayList<>());
controller.getVSCLActionDictionaryEntityData(response);
try {
assertTrue(response.getContentAsString() != null
@@ -114,7 +114,7 @@ public class ClosedLoopDictionaryControllerTest {
@Test
public void testGetVNFTypeDictionaryByNameEntityData() {
- when(commonClassDao.getDataByColumn(VNFType.class, "vnftype")).thenReturn(data);
+ when(commonClassDao.getDataByColumn(VnfType.class, "vnftype")).thenReturn(data);
controller.getVNFTypeDictionaryByNameEntityData(response);
try {
assertTrue(response.getContentAsString() != null
@@ -127,7 +127,7 @@ public class ClosedLoopDictionaryControllerTest {
@Test
public void testGetVNFTypeDictionaryEntityData() {
- when(commonClassDao.getData(VNFType.class)).thenReturn(new ArrayList<>());
+ when(commonClassDao.getData(VnfType.class)).thenReturn(new ArrayList<>());
controller.getVNFTypeDictionaryEntityData(response);
try {
assertTrue(response.getContentAsString() != null