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%2FDictionaryImportController.java;h=0295822131118c0023fdf089447e4e9deb4ea7a9;hp=f56da990cc18529ea50699d482eff65145667bb5;hb=d4e3a1b394715c6386f963130e4e081d421ecd1b;hpb=1e61676b77dd09659027b8984f050df7e8538526 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 f56da990c..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 @@ -44,9 +44,9 @@ import org.onap.policy.rest.jpa.ActionList; import org.onap.policy.rest.jpa.ActionPolicyDict; import org.onap.policy.rest.jpa.AddressGroup; import org.onap.policy.rest.jpa.Attribute; -import org.onap.policy.rest.jpa.BRMSController; -import org.onap.policy.rest.jpa.BRMSDependency; -import org.onap.policy.rest.jpa.BRMSParamTemplate; +import org.onap.policy.rest.jpa.BrmsController; +import org.onap.policy.rest.jpa.BrmsDependency; +import org.onap.policy.rest.jpa.BrmsParamTemplate; import org.onap.policy.rest.jpa.Category; import org.onap.policy.rest.jpa.ClosedLoopD2Services; import org.onap.policy.rest.jpa.ClosedLoopSite; @@ -56,15 +56,15 @@ 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; 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; @@ -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]); @@ -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]); @@ -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); @@ -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); @@ -439,7 +439,7 @@ public class DictionaryImportController { } if (dictionaryName.startsWith("BRMSParamDictionary")) { for (int i = 1; i < dictSheet.size(); i++) { - BRMSParamTemplate attribute = new BRMSParamTemplate(); + BrmsParamTemplate attribute = new BrmsParamTemplate(); UserInfo userinfo = new UserInfo(); userinfo.setUserLoginId(userId); attribute.setUserCreatedBy(userinfo); @@ -461,7 +461,7 @@ public class DictionaryImportController { } if (dictionaryName.startsWith("BRMSControllerDictionary")) { for (int i = 1; i < dictSheet.size(); i++) { - BRMSController attribute = new BRMSController(); + BrmsController attribute = new BrmsController(); UserInfo userinfo = new UserInfo(); userinfo.setUserLoginId(userId); attribute.setUserCreatedBy(userinfo); @@ -483,7 +483,7 @@ public class DictionaryImportController { } if (dictionaryName.startsWith("BRMSDependencyDictionary")) { for (int i = 1; i < dictSheet.size(); i++) { - BRMSDependency attribute = new BRMSDependency(); + BrmsDependency attribute = new BrmsDependency(); UserInfo userinfo = new UserInfo(); userinfo.setUserLoginId(userId); attribute.setUserCreatedBy(userinfo); @@ -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])) { @@ -801,7 +801,7 @@ public class DictionaryImportController { case VSCLAction: case ClosedLoopService: case ClosedLoopSite: - case PEPOptions: + case PepOptions: case VarbindDictionary: case BRMSParamDictionary: case BRMSControllerDictionary: