diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/DisctionaryNames.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/DictionaryNames.java
similarity index 97%
rename from ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/DisctionaryNames.java
rename to ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/DictionaryNames.java
index f0dfa0a..3735316 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/DisctionaryNames.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/DictionaryNames.java
@@ -26,7 +26,7 @@
  * MessageCodes contains all the valid Dictionary names
  *
  */
-public enum DisctionaryNames {
+public enum DictionaryNames {
 	
 	Attribute,
 	ActionPolicyDictionary,
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 142f72b..f3c78ff 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
@@ -19,10 +19,7 @@
  */
 
 package org.onap.policy.pap.xacml.rest.controller;
- /*
-  * 
-  * 
-  * */
+
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.FileReader;
@@ -36,7 +33,7 @@
 import org.apache.commons.compress.utils.IOUtils;
 import org.onap.policy.common.logging.flexlogger.FlexLogger;
 import org.onap.policy.common.logging.flexlogger.Logger;
-import org.onap.policy.pap.xacml.rest.DisctionaryNames;
+import org.onap.policy.pap.xacml.rest.DictionaryNames;
 import org.onap.policy.rest.dao.CommonClassDao;
 import org.onap.policy.rest.jpa.ActionList;
 import org.onap.policy.rest.jpa.ActionPolicyDict;
@@ -68,6 +65,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -79,8 +77,6 @@
 public class DictionaryImportController {
 	private static final Logger LOGGER  = FlexLogger.getLogger(DictionaryImportController.class);
 	
-	private String newFile;
-
 	private static CommonClassDao commonClassDao;
 	private static final String DESCRIPTION= "description";
 	
@@ -89,11 +85,13 @@
 		DictionaryImportController.commonClassDao = commonClassDao;
 	}
 	
-	public DictionaryImportController(){}	
+	public DictionaryImportController(){
+		super();
+	}	
 
 
-	@RequestMapping(value={"/dictionary/import_dictionary"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
-	public void ImportDictionaryData(HttpServletRequest request, HttpServletResponse response) throws IOException{
+	@RequestMapping(value={"/dictionary/import_dictionary"}, method={RequestMethod.POST})
+	public void importDictionaryData(HttpServletRequest request, HttpServletResponse response) throws IOException{
 		ObjectMapper mapper = new ObjectMapper();
 		mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
 		String userId = request.getParameter("userId");
@@ -109,22 +107,16 @@
 		// fix Fortify Path Manipulation issue
 		if(!isValidDictionaryName(dictionaryName)){
 			LOGGER.error("dictionaryName is invalid");
-			response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
-			response.getWriter().write("Error");
+			response.setStatus(HttpServletResponse.SC_OK);
+			response.getWriter().write("Dictionary Import failed. Hence the following dictionary doen't support import function  : "+ dictionaryName);
 			return;			
 		}
-				
-		boolean dictionaryImportExists = false;
-		try{
-			File file = new File(dictionaryName);
-			OutputStream outputStream = new FileOutputStream(file);
+		File file = new File(dictionaryName);	
+		try(OutputStream outputStream = new FileOutputStream(file); FileReader fileReader = new FileReader(file.toString())){
 			IOUtils.copy(request.getInputStream(), outputStream);
-			outputStream.close();
-			this.newFile = file.toString();
-			CSVReader csvReader = new CSVReader(new FileReader(this.newFile));
+			CSVReader csvReader = new CSVReader(fileReader);
 			List<String[]> dictSheet = csvReader.readAll();
 			if(dictionaryName.startsWith("Attribute")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					Attribute attribute = new Attribute("");
 					UserInfo userinfo = new UserInfo();
@@ -133,26 +125,26 @@
 					attribute.setUserModifiedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("xacml_id").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Attribute ID").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("xacml_id".equalsIgnoreCase(dictSheet.get(0)[j]) || "Attribute ID".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setXacmlId(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
-						if(("priority").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("priority".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setPriority(rows[j]);
 						}
-						if(("datatype").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Data Type").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("datatype".equalsIgnoreCase(dictSheet.get(0)[j]) || "Data Type".equalsIgnoreCase(dictSheet.get(0)[j])){
 							Datatype dataType = new Datatype();
-							if(("string").equalsIgnoreCase(rows[j])){
+							if("string".equalsIgnoreCase(rows[j])){
 								dataType.setId(26);
-							}else if(("integer").equalsIgnoreCase(rows[j])){
+							}else if("integer".equalsIgnoreCase(rows[j])){
 								dataType.setId(12);
-							}else if(("double").equalsIgnoreCase(rows[j])){
+							}else if("double".equalsIgnoreCase(rows[j])){
 								dataType.setId(25);
-							}else if(("boolean").equalsIgnoreCase(rows[j])){
+							}else if("boolean".equalsIgnoreCase(rows[j])){
 								dataType.setId(18);
-							}else if(("user").equalsIgnoreCase(rows[j])){
+							}else if("user".equalsIgnoreCase(rows[j])){
 								dataType.setId(29);
 							}
 							attribute.setDatatypeBean(dataType);
@@ -160,7 +152,7 @@
 							category.setId(5);
 							attribute.setCategoryBean(category);
 						}
-						if(("attribute_value").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Attribute Value").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("attribute_value".equalsIgnoreCase(dictSheet.get(0)[j]) || "Attribute Value".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setAttributeValue(rows[j]);
 						}
 					}
@@ -168,7 +160,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("ActionPolicyDictionary")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					ActionPolicyDict attribute = new ActionPolicyDict();
 					UserInfo userinfo = new UserInfo();
@@ -177,25 +168,25 @@
 					attribute.setUserModifiedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("attribute_name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Attribute Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("attribute_name".equalsIgnoreCase(dictSheet.get(0)[j]) || "Attribute Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setAttributeName(rows[j]);
 						}
-						if(("body").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("body".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setBody(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
-						if(("headers").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("headers".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setHeader(rows[j]);
 						}
-						if(("method").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("method".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setMethod(rows[j]);
 						}
-						if(("type").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("type".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setType(rows[j]);
 						}
-						if(("url").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("url".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setUrl(rows[j]);
 						}
 					}
@@ -203,7 +194,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("OnapName")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					OnapName attribute = new OnapName();
 					UserInfo userinfo = new UserInfo();
@@ -212,10 +202,10 @@
 					attribute.setUserModifiedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("onap_name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Onap Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("onap_name".equalsIgnoreCase(dictSheet.get(0)[j]) || "Onap Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setOnapName(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
 					}
@@ -224,7 +214,6 @@
 			}
 
 			if(dictionaryName.startsWith("MSPolicyDictionary")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					MicroServiceModels attribute = new MicroServiceModels();
 					UserInfo userinfo = new UserInfo();
@@ -232,28 +221,28 @@
 					attribute.setUserCreatedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("modelName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Micro Service Model").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("modelName".equalsIgnoreCase(dictSheet.get(0)[j]) || "Micro Service Model".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setModelName(rows[j]);
 						}
-						if(("version").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Model Version").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("version".equalsIgnoreCase(dictSheet.get(0)[j]) || "Model Version".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setVersion(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
-						if(("dependency").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("dependency".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDependency(rows[j]);
 						}
-						if(("attributes").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("attributes".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setAttributes(rows[j]);
 						}
-						if(("enumValues").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("enumValues".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setEnumValues(rows[j]);
 						}
-						if(("Ref Attributes").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("Ref Attributes".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setRef_attributes(rows[j]);
 						}
-						if(("Sub Attributes").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("Sub Attributes".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setSub_attributes(rows[j]);
 						}
 					}
@@ -263,7 +252,6 @@
 			}		
 
 			if(dictionaryName.startsWith("VNFType")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					VNFType attribute = new VNFType();
 					UserInfo userinfo = new UserInfo();
@@ -272,10 +260,10 @@
 					attribute.setUserModifiedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("vnf_type").equalsIgnoreCase(dictSheet.get(0)[j]) || ("VNF Type").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("vnf_type".equalsIgnoreCase(dictSheet.get(0)[j]) || "VNF Type".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setVnftype(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
 					}
@@ -283,7 +271,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("VSCLAction")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					VSCLAction attribute = new VSCLAction();
 					UserInfo userinfo = new UserInfo();
@@ -292,10 +279,10 @@
 					attribute.setUserModifiedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("vscl_action").equalsIgnoreCase(dictSheet.get(0)[j]) || ("VSCL Action").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("vscl_action".equalsIgnoreCase(dictSheet.get(0)[j]) || "VSCL Action".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setVsclaction(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
 					}
@@ -303,7 +290,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("ClosedLoopService")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					ClosedLoopD2Services attribute = new ClosedLoopD2Services();
 					UserInfo userinfo = new UserInfo();
@@ -312,10 +298,10 @@
 					attribute.setUserModifiedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("serviceName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Service Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("serviceName".equalsIgnoreCase(dictSheet.get(0)[j]) || "Service Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setServiceName(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
 					}
@@ -323,7 +309,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("ClosedLoopSite")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					ClosedLoopSite attribute = new ClosedLoopSite();
 					UserInfo userinfo = new UserInfo();
@@ -332,10 +317,10 @@
 					attribute.setUserModifiedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("siteName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Site Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("siteName".equalsIgnoreCase(dictSheet.get(0)[j]) || "Site Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setSiteName(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
 					}
@@ -343,7 +328,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("PEPOptions")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					PEPOptions attribute = new PEPOptions();
 					UserInfo userinfo = new UserInfo();
@@ -352,13 +336,13 @@
 					attribute.setUserModifiedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("PEP_NAME").equalsIgnoreCase(dictSheet.get(0)[j]) || ("PEP Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("PEP_NAME".equalsIgnoreCase(dictSheet.get(0)[j]) || "PEP Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setPepName(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
-						if(("Actions").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("Actions".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setActions(rows[j]);
 						}
 					}
@@ -366,7 +350,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("VarbindDictionary")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					VarbindDictionary attribute = new VarbindDictionary();
 					UserInfo userinfo = new UserInfo();
@@ -375,13 +358,13 @@
 					attribute.setUserModifiedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("varbind_Name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Varbind Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("varbind_Name".equalsIgnoreCase(dictSheet.get(0)[j]) || "Varbind Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setVarbindName(rows[j]);
 						}
-						if(("varbind_Description").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Varbind Description").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("varbind_Description".equalsIgnoreCase(dictSheet.get(0)[j]) || "Varbind Description".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setVarbindDescription(rows[j]);
 						}
-						if(("varbind_oid").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Varbind OID").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("varbind_oid".equalsIgnoreCase(dictSheet.get(0)[j]) || "Varbind OID".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setVarbindOID(rows[j]);
 						}
 					}
@@ -389,7 +372,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("BRMSParamDictionary")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					BRMSParamTemplate attribute = new BRMSParamTemplate();
 					UserInfo userinfo = new UserInfo();
@@ -397,13 +379,13 @@
 					attribute.setUserCreatedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("param_template_name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Rule Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("param_template_name".equalsIgnoreCase(dictSheet.get(0)[j]) || "Rule Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setRuleName(rows[j]);
 						}
-						if(("Description").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
-						if(("rule").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("rule".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setRule(rows[j]);
 						}
 					}
@@ -411,7 +393,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("BRMSControllerDictionary")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					BRMSController attribute = new BRMSController();
 					UserInfo userinfo = new UserInfo();
@@ -419,13 +400,13 @@
 					attribute.setUserCreatedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("controllerName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Controller Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("controllerName".equalsIgnoreCase(dictSheet.get(0)[j]) || "Controller Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setControllerName(rows[j]);
 						}
-						if(("DESCRIPTION").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
-						if(("controller").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("controller".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setController(rows[j]);
 						}
 					}
@@ -433,7 +414,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("BRMSDependencyDictionary")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					BRMSDependency attribute = new BRMSDependency();
 					UserInfo userinfo = new UserInfo();
@@ -441,13 +421,13 @@
 					attribute.setUserCreatedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("dependencyName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Dependency Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("dependencyName".equalsIgnoreCase(dictSheet.get(0)[j]) || "Dependency Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDependencyName(rows[j]);
 						}
-						if(("DESCRIPTION").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
-						if(("dependency").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("dependency".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDependency(rows[j]);
 						}
 					}
@@ -455,7 +435,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("Settings")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					DecisionSettings attribute = new DecisionSettings();
 					UserInfo userinfo = new UserInfo();
@@ -464,26 +443,26 @@
 					attribute.setUserModifiedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("xacml_id").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Settings ID").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("xacml_id".equalsIgnoreCase(dictSheet.get(0)[j]) || "Settings ID".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setXacmlId(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
-						if(("priority").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("priority".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setPriority(rows[j]);
 						}
-						if(("datatype").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Data Type").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("datatype".equalsIgnoreCase(dictSheet.get(0)[j]) || "Data Type".equalsIgnoreCase(dictSheet.get(0)[j])){
 							Datatype dataType = new Datatype();
-							if(("string").equalsIgnoreCase(rows[j])){
+							if("string".equalsIgnoreCase(rows[j])){
 								dataType.setId(26);
-							}else if(("integer").equalsIgnoreCase(rows[j])){
+							}else if("integer".equalsIgnoreCase(rows[j])){
 								dataType.setId(12);
-							}else if(("double").equalsIgnoreCase(rows[j])){
+							}else if("double".equalsIgnoreCase(rows[j])){
 								dataType.setId(25);
-							}else if(("boolean").equalsIgnoreCase(rows[j])){
+							}else if("boolean".equalsIgnoreCase(rows[j])){
 								dataType.setId(18);
-							}else if(("user").equalsIgnoreCase(rows[j])){
+							}else if("user".equalsIgnoreCase(rows[j])){
 								dataType.setId(29);
 							}
 							attribute.setDatatypeBean(dataType);
@@ -493,18 +472,17 @@
 				}
 			}
 			if(dictionaryName.startsWith("PrefixList")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					PrefixList attribute = new PrefixList();
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("prefixListName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("PrefixList Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("prefixListName".equalsIgnoreCase(dictSheet.get(0)[j]) || "PrefixList Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setPrefixListName(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setPrefixListValue(rows[j]);
 						}
-						if(("prefixListValue").equalsIgnoreCase(dictSheet.get(0)[j]) || ("PrefixList Value").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("prefixListValue".equalsIgnoreCase(dictSheet.get(0)[j]) || "PrefixList Value".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
 					}
@@ -512,15 +490,14 @@
 				}
 			}
 			if(dictionaryName.startsWith("SecurityZone")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					SecurityZone attribute = new SecurityZone();
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("zoneName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Zone Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("zoneName".equalsIgnoreCase(dictSheet.get(0)[j]) || "Zone Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setZoneName(rows[j]);
 						}
-						if(("zoneValue").equalsIgnoreCase(dictSheet.get(0)[j])  || ("Zone Value").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("zoneValue".equalsIgnoreCase(dictSheet.get(0)[j])  || "Zone Value".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setZoneValue(rows[j]);
 						}
 					}
@@ -528,15 +505,14 @@
 				}
 			}
 			if(dictionaryName.startsWith("Zone")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					Zone attribute = new Zone();
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("zoneName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Zone Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("zoneName".equalsIgnoreCase(dictSheet.get(0)[j]) || "Zone Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setZoneName(rows[j]);
 						}
-						if(("zoneValue").equalsIgnoreCase(dictSheet.get(0)[j])  || ("Zone Value").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("zoneValue".equalsIgnoreCase(dictSheet.get(0)[j])  || "Zone Value".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setZoneValue(rows[j]);
 						}
 					}
@@ -544,27 +520,26 @@
 				}
 			}
 			if(dictionaryName.startsWith("ServiceList")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					ServiceList attribute = new ServiceList();
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("serviceName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Service Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("serviceName".equalsIgnoreCase(dictSheet.get(0)[j]) || "Service Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setServiceName(rows[j]);
 						}
-						if(("serviceDesc").equalsIgnoreCase(dictSheet.get(0)[j])  || ("Description").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("serviceDesc".equalsIgnoreCase(dictSheet.get(0)[j])  || DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setServiceDescription(rows[j]);
 						}
-						if(("serviceType").equalsIgnoreCase(dictSheet.get(0)[j])  || ("Service Type").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("serviceType".equalsIgnoreCase(dictSheet.get(0)[j])  || "Service Type".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setServiceType(rows[j]);
 						}
-						if(("serviceTrasProtocol").equalsIgnoreCase(dictSheet.get(0)[j])  || ("Transport Protocol").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("serviceTrasProtocol".equalsIgnoreCase(dictSheet.get(0)[j])  || "Transport Protocol".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setServiceTransProtocol(rows[j]);
 						}
-						if(("serviceAppProtocol").equalsIgnoreCase(dictSheet.get(0)[j])  || ("APP Protocol").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("serviceAppProtocol".equalsIgnoreCase(dictSheet.get(0)[j])  || "APP Protocol".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setServiceAppProtocol(rows[j]);
 						}
-						if(("servicePorts").equalsIgnoreCase(dictSheet.get(0)[j])  || ("Ports").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("servicePorts".equalsIgnoreCase(dictSheet.get(0)[j])  || "Ports".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setServicePorts(rows[j]);
 						}
 					}
@@ -572,15 +547,14 @@
 				}
 			}
 			if(dictionaryName.startsWith("ServiceGroup")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					GroupServiceList attribute = new GroupServiceList();
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Group Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("name".equalsIgnoreCase(dictSheet.get(0)[j]) || "Group Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setGroupName(rows[j]);
 						}
-						if(("serviceList").equalsIgnoreCase(dictSheet.get(0)[j])  || ("Service List").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("serviceList".equalsIgnoreCase(dictSheet.get(0)[j])  || "Service List".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setServiceList(rows[j]);
 						}
 					}
@@ -588,18 +562,17 @@
 				}
 			}
 			if(dictionaryName.startsWith("AddressGroup")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					AddressGroup attribute = new AddressGroup();
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Group Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("name".equalsIgnoreCase(dictSheet.get(0)[j]) || "Group Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setGroupName(rows[j]);
 						}
-						if(("serviceList").equalsIgnoreCase(dictSheet.get(0)[j])  || ("Prefix List").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("serviceList".equalsIgnoreCase(dictSheet.get(0)[j])  || "Prefix List".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setServiceList(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
 					}
@@ -607,15 +580,14 @@
 				}
 			}
 			if(dictionaryName.startsWith("ProtocolList")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					ProtocolList attribute = new ProtocolList();
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("protocolName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Protocol Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("protocolName".equalsIgnoreCase(dictSheet.get(0)[j]) || "Protocol Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setProtocolName(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
 					}
@@ -623,15 +595,14 @@
 				}
 			}
 			if(dictionaryName.startsWith("ActionList")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					ActionList attribute = new ActionList();
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("actionName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Action Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("actionName".equalsIgnoreCase(dictSheet.get(0)[j]) || "Action Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setActionName(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
 					}
@@ -639,7 +610,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("TermList")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					TermList attribute = new TermList();
 					UserInfo userinfo = new UserInfo();
@@ -648,31 +618,31 @@
 					attribute.setUserModifiedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("termName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Term-Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("termName".equalsIgnoreCase(dictSheet.get(0)[j]) || "Term-Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setTermName(rows[j]);
 						}
-						if(("Term-Description").equalsIgnoreCase(dictSheet.get(0)[j]) || ("termDescription").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("Term-Description".equalsIgnoreCase(dictSheet.get(0)[j]) || "termDescription".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
-						if(("fromZone").equalsIgnoreCase(dictSheet.get(0)[j])  || ("From Zone").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("fromZone".equalsIgnoreCase(dictSheet.get(0)[j])  || "From Zone".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setFromZones(rows[j]);
 						}
-						if(("toZone").equalsIgnoreCase(dictSheet.get(0)[j]) || ("To Zone").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("toZone".equalsIgnoreCase(dictSheet.get(0)[j]) || "To Zone".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setToZones(rows[j]);
 						}
-						if(("srcIPList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Source-IP-List").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("srcIPList".equalsIgnoreCase(dictSheet.get(0)[j]) || "Source-IP-List".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setSrcIPList(rows[j]);
 						}
-						if(("destIPList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Destination-IP-List").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("destIPList".equalsIgnoreCase(dictSheet.get(0)[j]) || "Destination-IP-List".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDestIPList(rows[j]);
 						}
-						if(("srcPortList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Source-Port-List").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("srcPortList".equalsIgnoreCase(dictSheet.get(0)[j]) || "Source-Port-List".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setSrcPortList(rows[j]);
 						}
-						if(("destPortList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Destination-Port-List").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("destPortList".equalsIgnoreCase(dictSheet.get(0)[j]) || "Destination-Port-List".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDestPortList(rows[j]);
 						}
-						if(("action").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Action List").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("action".equalsIgnoreCase(dictSheet.get(0)[j]) || "Action List".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setAction(rows[j]);
 						}
 					}
@@ -680,7 +650,6 @@
 				}
 			}
 			if(dictionaryName.startsWith("SearchCriteria")){
-				dictionaryImportExists = true;
 				for(int i = 1; i< dictSheet.size(); i++){
 					DescriptiveScope attribute = new DescriptiveScope();
 					UserInfo userinfo = new UserInfo();
@@ -689,13 +658,13 @@
 					attribute.setUserModifiedBy(userinfo);
 					String[] rows = dictSheet.get(i);
 					for (int j=0 ; j<rows.length; j++ ){
-						if(("descriptiveScopeName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Descriptive Scope Name").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("descriptiveScopeName".equalsIgnoreCase(dictSheet.get(0)[j]) || "Descriptive Scope Name".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setScopeName(rows[j]);
 						}
-						if((DESCRIPTION).equalsIgnoreCase(dictSheet.get(0)[j])){
+						if(DESCRIPTION.equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setDescription(rows[j]);
 						}
-						if(("search").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Search Criteria").equalsIgnoreCase(dictSheet.get(0)[j])){
+						if("search".equalsIgnoreCase(dictSheet.get(0)[j]) || "Search Criteria".equalsIgnoreCase(dictSheet.get(0)[j])){
 							attribute.setSearch(rows[j]);
 						}
 					}
@@ -703,97 +672,57 @@
 				}
 			}
 			csvReader.close();
-			if(file.exists()){
-				file.delete();
-			}
-			if(!dictionaryImportExists){
-				response.setStatus(HttpServletResponse.SC_OK);
-				response.getWriter().write("Dictionary Import failed. Hence the following dictionary doen't support import function  : "+ dictionaryName);
-			}else{
-				response.setStatus(HttpServletResponse.SC_OK);
-				response.getWriter().write("Success");
-			}
+			response.setStatus(HttpServletResponse.SC_OK);
+			response.getWriter().write("Success");
 		}catch(Exception e){
 			LOGGER.error("Exception Occured while importing dictionary"+e);
 			response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
 			response.getWriter().write("Error");
+		}finally{
+			if(file != null && file.exists()){
+				boolean deleted = file.delete();
+				LOGGER.error("Imported File has been deleted: "+deleted);
+			}
 		}
 	}
 	
 	public boolean isValidDictionaryName(String dictionaryName){
 		
-		if(dictionaryName.startsWith(DisctionaryNames.Attribute.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.ActionPolicyDictionary.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.OnapName.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.MSPolicyDictionary.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.VNFType.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.VSCLAction.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.ClosedLoopService.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.ClosedLoopSite.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.PEPOptions.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.VarbindDictionary.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.BRMSParamDictionary.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.BRMSControllerDictionary.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.BRMSDependencyDictionary.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.Settings.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.PrefixList.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.SecurityZone.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.Zone.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.ServiceList.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.ServiceGroup.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.AddressGroup.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.ProtocolList.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.ActionList.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.TermList.toString())){
-			return true;
-		}
-		if(dictionaryName.startsWith(DisctionaryNames.SearchCriteria.toString())){
-			return true;
-		}
-		return false;
+		String nameCheck = dictionaryName.replace(".csv", "");
+		try{
+			DictionaryNames mode = DictionaryNames.valueOf(nameCheck);
+			switch (mode){
+				case Attribute:
+				case ActionPolicyDictionary:
+				case OnapName:
+				case MSPolicyDictionary:
+				case VNFType:
+				case VSCLAction:
+				case ClosedLoopService:
+				case ClosedLoopSite:
+				case PEPOptions:
+				case VarbindDictionary:
+				case BRMSParamDictionary:
+				case BRMSControllerDictionary:
+				case BRMSDependencyDictionary:
+				case Settings:
+				case PrefixList:
+				case SecurityZone:
+				case Zone:
+				case ServiceList:
+				case ServiceGroup:
+				case AddressGroup:
+				case ProtocolList:
+				case ActionList:
+				case TermList:
+				case SearchCriteria:
+					return true;
+				default:
+					return false;
+			}
+		}catch(Exception e){
+			LOGGER.error("Dictionary not exits: " +dictionaryName +e);
+			return false;
+		}	
 	}
 }
\ No newline at end of file
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 561dea8..23450cb 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
@@ -21,24 +21,17 @@
 package org.onap.policy.pap.xacml.rest.controller;
 
 import java.io.IOException;
-import java.io.PrintWriter;
 import java.util.Date;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.json.JSONObject;
-import org.onap.policy.common.logging.flexlogger.FlexLogger;
-import org.onap.policy.common.logging.flexlogger.Logger;
-import org.onap.policy.pap.xacml.rest.util.JsonMessage;
+import org.onap.policy.pap.xacml.rest.util.DictionaryUtils;
 import org.onap.policy.rest.dao.CommonClassDao;
 import org.onap.policy.rest.jpa.RiskType;
 import org.onap.policy.rest.jpa.SafePolicyWarning;
 import org.onap.policy.rest.jpa.UserInfo;
-import org.onap.policy.utils.PolicyUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
 import org.springframework.stereotype.Controller;
@@ -53,14 +46,11 @@
 @Controller
 public class SafePolicyController {
 
-	private static final Logger LOGGER  = FlexLogger.getLogger(SafePolicyController.class);
-	
 	private static CommonClassDao commonClassDao;
 	private static String duplicateResponseString = "Duplicate";
 	private static String operation = "operation";
-	private static String apiflag = "apiflag";
-	private static String utf8 = "UTF-8";
-	private static String applicationJsonContentType = "application / json";
+	private static String riskTypeDatas = "riskTypeDictionaryDatas";
+	private static String safePolicyWarningDatas = "safePolicyWarningDatas";
 
 	@Autowired
 	public SafePolicyController(CommonClassDao commonClassDao){
@@ -72,310 +62,149 @@
 	}
 	
 	public SafePolicyController(){
-		//Empty Constructor
+		super();
 	}	
 	
-	public UserInfo getUserInfo(String loginId){
-		return (UserInfo) commonClassDao.getEntityItem(UserInfo.class, "userLoginId", loginId);
+	private DictionaryUtils getDictionaryUtilsInstance(){
+		return DictionaryUtils.dictionaryUtils != null ? DictionaryUtils.getDictionaryUtils() : new DictionaryUtils();
 	}
 	
 	@RequestMapping(value = { "/get_RiskTypeDataByName" }, method = {RequestMethod.GET }, produces = MediaType.APPLICATION_JSON_VALUE)
 	public void getRiskTypeDictionaryByNameEntityData(HttpServletResponse response) {
-		try {
-			Map<String, Object> model = new HashMap<>();
-			ObjectMapper mapper = new ObjectMapper();
-			model.put("riskTypeDictionaryDatas", mapper.writeValueAsString(commonClassDao.getDataByColumn(RiskType.class, "name")));
-			JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
-			JSONObject j = new JSONObject(msg);
-			response.getWriter().write(j.toString());
-		} catch (Exception e) {
-			LOGGER.error("Exception Occured"+e);
-		}
+		DictionaryUtils utils = getDictionaryUtilsInstance();
+		utils.getDataByEntity(response, riskTypeDatas, "name", RiskType.class);
 	}
 
 	@RequestMapping(value = { "/get_RiskTypeData" }, method = {RequestMethod.GET }, produces = MediaType.APPLICATION_JSON_VALUE)
 	public void getRiskTypeDictionaryEntityData(HttpServletResponse response) {
-		try {
-			Map<String, Object> model = new HashMap<>();
-			ObjectMapper mapper = new ObjectMapper();
-			model.put("riskTypeDictionaryDatas", mapper.writeValueAsString(commonClassDao.getData(RiskType.class)));
-			JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
-			JSONObject j = new JSONObject(msg);
-            response.addHeader("successMapKey", "success"); 
-            response.addHeader(operation, "getDictionary");
-			response.getWriter().write(j.toString());
-		} catch (Exception e) {
-            LOGGER.error(e);
-            response.setStatus(HttpServletResponse.SC_BAD_REQUEST);                             
-            response.addHeader("error", "dictionaryDBQuery");
-		}
+		DictionaryUtils utils = getDictionaryUtilsInstance();
+		utils.getData(response, riskTypeDatas, RiskType.class);
 	}
 
 	@RequestMapping(value = { "/sp_dictionary/save_riskType" }, method = {RequestMethod.POST })
 	public ModelAndView saveRiskTypeDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException {
+		DictionaryUtils utils = getDictionaryUtilsInstance();
 		try {
-			boolean duplicateflag = false;
-            boolean isFakeUpdate = false;
-            boolean fromAPI = false;
-            if (request.getParameter(apiflag)!=null && ("api").equalsIgnoreCase(request.getParameter(apiflag))) {
-                fromAPI = true;
-            }
+			boolean fromAPI = utils.isRequestFromAPI(request);
 			ObjectMapper mapper = new ObjectMapper();
 			mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
 			JsonNode root = mapper.readTree(request.getReader());
             RiskType riskTypeData;
             String userId = null;
             if (fromAPI) {
-                riskTypeData = mapper.readValue(root.get("dictionaryFields").toString(),
-                        RiskType.class);
+                riskTypeData = mapper.readValue(root.get("dictionaryFields").toString(), RiskType.class);
                 userId = "API";
-                
-                //check if update operation or create, get id for data to be updated and update attributeData
-                if ("update".equalsIgnoreCase(request.getParameter(operation))){
-                    List<Object> duplicateData =  commonClassDao.checkDuplicateEntry(riskTypeData.getRiskName(), "name", RiskType.class);
-                    RiskType data = (RiskType) duplicateData.get(0);
-                    int id = data.getId();
-                    
-                    if(id==0){
-                        isFakeUpdate=true;
-                        riskTypeData.setId(1);
-                    } else {
-                        riskTypeData.setId(id);
-                    }
-                    
-                    riskTypeData.setUserCreatedBy(this.getUserInfo(userId));
-                }
             } else {
             	riskTypeData = mapper.readValue(root.get("riskTypeDictionaryData").toString(), RiskType.class);
             	userId = root.get("userid").textValue();
             }
-			 
-			if (riskTypeData.getId() == 0) {
-				List<Object> duplicateData =  commonClassDao.checkDuplicateEntry(riskTypeData.getRiskName(), "name", RiskType.class);
-				if(!duplicateData.isEmpty()){
+            UserInfo userInfo = utils.getUserInfo(userId);
+            List<Object> duplicateData =  commonClassDao.checkDuplicateEntry(riskTypeData.getRiskName(), "name", RiskType.class);
+			boolean duplicateflag = false;
+            if(!duplicateData.isEmpty()){
+            	RiskType data = (RiskType) duplicateData.get(0);
+				if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
+					riskTypeData.setId(data.getId());
+				}else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) || 
+						(request.getParameter(operation) == null && (data.getId() != riskTypeData.getId()))){
 					duplicateflag = true;
-				}else{
-					riskTypeData.setUserCreatedBy(getUserInfo(userId));
-					riskTypeData.setUserModifiedBy(getUserInfo(userId));
-					commonClassDao.save(riskTypeData);
-				}
-			} else {
-				if (!isFakeUpdate) {
-					riskTypeData.setUserModifiedBy(this.getUserInfo(userId));
-					riskTypeData.setModifiedDate(new Date());
-					commonClassDao.update(riskTypeData);
 				}
 			}
-            String responseString = "";
-            if(duplicateflag){
-                responseString = duplicateResponseString;
-            }else{
-                responseString = mapper.writeValueAsString(commonClassDao.getData(RiskType.class));
-            }
-            
-            if (fromAPI) {
-                if (responseString!=null && !responseString.equals(duplicateResponseString)) {
-                    if(isFakeUpdate){
-                        responseString = "Exists";
-                    } else {
-                        responseString = "Success";
-                    }
-                }
-                ModelAndView result = new ModelAndView();
-                result.setViewName(responseString);
-                return result;
-            } else {
-                response.setCharacterEncoding(utf8);
-                response.setContentType(applicationJsonContentType);
-                request.setCharacterEncoding(utf8);
- 
-                PrintWriter out = response.getWriter();
-                JSONObject j = new JSONObject("{riskTypeDictionaryDatas: " + responseString + "}");
-                out.write(j.toString());
-                return null;
-            }
+            String responseString = null;
+			if(!duplicateflag){
+				riskTypeData.setUserModifiedBy(userInfo);
+				if(riskTypeData.getId() == 0){
+					riskTypeData.setUserCreatedBy(userInfo);
+					commonClassDao.save(riskTypeData);
+				}else{
+					riskTypeData.setModifiedDate(new Date());
+					commonClassDao.update(riskTypeData); 
+				} 
+				responseString = mapper.writeValueAsString(commonClassDao.getData(RiskType.class));
+			}else{
+				responseString = duplicateResponseString;
+			}
+			if(fromAPI){
+				return utils.getResultForApi(responseString);
+			}else{
+				utils.setResponseData(response, riskTypeDatas, responseString);
+			}
         }catch (Exception e) {
-        	LOGGER.error(e);
-			response.setCharacterEncoding(utf8);
-			request.setCharacterEncoding(utf8);
-			PrintWriter out = response.getWriter();
-			out.write(PolicyUtils.CATCH_EXCEPTION);
+        	utils.setErrorResponseData(response, e);
 		}
 		return null;
 	}
 
 	@RequestMapping(value = { "/sp_dictionary/remove_riskType" }, method = {RequestMethod.POST })
-	public ModelAndView removeRiskTypeDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
-		try {
-			ObjectMapper mapper = new ObjectMapper();
-			mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-			JsonNode root = mapper.readTree(request.getReader());
-			RiskType onapData = mapper.readValue(root.get("data").toString(), RiskType.class);
-			commonClassDao.delete(onapData);
-			response.setCharacterEncoding(utf8);
-			response.setContentType(applicationJsonContentType);
-			request.setCharacterEncoding(utf8);
-
-			PrintWriter out = response.getWriter();
-
-			String responseString = mapper.writeValueAsString(commonClassDao.getData(RiskType.class));
-			JSONObject j = new JSONObject("{riskTypeDictionaryDatas: " + responseString + "}");
-			out.write(j.toString());
-
-			return null;
-		} catch (Exception e) {
-			LOGGER.error(e);
-			response.setCharacterEncoding(utf8);
-			request.setCharacterEncoding(utf8);
-			PrintWriter out = response.getWriter();
-			out.write(PolicyUtils.CATCH_EXCEPTION);
-		}
-		return null;
+	public void removeRiskTypeDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException{
+		DictionaryUtils utils = getDictionaryUtilsInstance();
+		utils.removeData(request, response, riskTypeDatas, RiskType.class);
 	}
-
+	
 	@RequestMapping(value = { "/get_SafePolicyWarningDataByName" }, method = {RequestMethod.GET }, produces = MediaType.APPLICATION_JSON_VALUE)
 	public void getSafePolicyWarningEntityDataByName(HttpServletResponse response) {
-		try {
-			Map<String, Object> model = new HashMap<>();
-			ObjectMapper mapper = new ObjectMapper();
-			model.put("safePolicyWarningDatas",
-					mapper.writeValueAsString(commonClassDao.getDataByColumn(SafePolicyWarning.class, "name")));
-			JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
-			JSONObject j = new JSONObject(msg);
-			response.getWriter().write(j.toString());
-		} catch (Exception e) {
-			LOGGER.error("Exception Occured"+e);
-		}
+		DictionaryUtils utils = getDictionaryUtilsInstance();
+		utils.getDataByEntity(response, safePolicyWarningDatas, "name", SafePolicyWarning.class);
 	}
 
 	@RequestMapping(value = { "/get_SafePolicyWarningData" }, method = {RequestMethod.GET }, produces = MediaType.APPLICATION_JSON_VALUE)
 	public void getSafePolicyWarningeEntityData(HttpServletResponse response) {
-		try {
-			Map<String, Object> model = new HashMap<>();
-			ObjectMapper mapper = new ObjectMapper();
-			model.put("safePolicyWarningDatas",
-					mapper.writeValueAsString(commonClassDao.getData(SafePolicyWarning.class)));
-			JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
-			JSONObject j = new JSONObject(msg);
-            response.addHeader("successMapKey", "success"); 
-            response.addHeader(operation, "getDictionary");
-			response.getWriter().write(j.toString());
-		} catch (Exception e) {
-			LOGGER.error(e);
-            response.setStatus(HttpServletResponse.SC_BAD_REQUEST);                             
-            response.addHeader("error", "dictionaryDBQuery");
-		}
+		DictionaryUtils utils = getDictionaryUtilsInstance();
+		utils.getData(response, safePolicyWarningDatas, SafePolicyWarning.class);
 	}
 
 	@RequestMapping(value = { "/sp_dictionary/save_safePolicyWarning" }, method = {RequestMethod.POST })
 	public ModelAndView saveSafePolicyWarningDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException {
+		DictionaryUtils utils = getDictionaryUtilsInstance();
 		try {
-			boolean duplicateflag = false;
-            boolean isFakeUpdate = false;
-            boolean fromAPI = false;
-            if (request.getParameter(apiflag)!=null && ("api").equalsIgnoreCase(request.getParameter(apiflag))) {
-                fromAPI = true;
-            }
+			boolean fromAPI = utils.isRequestFromAPI(request);
 			ObjectMapper mapper = new ObjectMapper();
 			mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
 			JsonNode root = mapper.readTree(request.getReader());
 			SafePolicyWarning safePolicyWarning;
             if (fromAPI) {
                 safePolicyWarning = mapper.readValue(root.get("dictionaryFields").toString(), SafePolicyWarning.class);
-                
-                //check if update operation or create, get id for data to be updated and update attributeData
-                if (("update").equals(request.getParameter(operation))) {
-                    List<Object> duplicateData =  commonClassDao.checkDuplicateEntry(safePolicyWarning.getName(), "name", SafePolicyWarning.class);
-                    SafePolicyWarning data = (SafePolicyWarning) duplicateData.get(0);
-                    int id = data.getId();
-                    
-                    if(id==0){
-                        isFakeUpdate=true;
-                        safePolicyWarning.setId(1);
-                    } else {
-                        safePolicyWarning.setId(id);
-                    } 
-                }
             } else {
             	safePolicyWarning = mapper.readValue(root.get("safePolicyWarningData").toString(), SafePolicyWarning.class);
             }
 
-			if (safePolicyWarning.getId() == 0) {
-				List<Object> duplicateData =  commonClassDao.checkDuplicateEntry(safePolicyWarning.getName(), "name", SafePolicyWarning.class);
-				if(!duplicateData.isEmpty()){
+            List<Object> duplicateData =  commonClassDao.checkDuplicateEntry(safePolicyWarning.getName(), "name", SafePolicyWarning.class);
+			boolean duplicateflag = false;
+			if(!duplicateData.isEmpty()){
+				SafePolicyWarning data = (SafePolicyWarning) duplicateData.get(0);
+				if(request.getParameter(operation) != null && "update".equals(request.getParameter(operation))){
+					safePolicyWarning.setId(data.getId());
+				}else if((request.getParameter(operation) != null && !"update".equals(request.getParameter(operation))) || 
+						(request.getParameter(operation) == null && (data.getId() != safePolicyWarning.getId()))){
 					duplicateflag = true;
-				}else{
-					commonClassDao.save(safePolicyWarning);
-				}
-			} else {
-				if(!isFakeUpdate) {
-					commonClassDao.update(safePolicyWarning);
 				}
 			}
-            String responseString = "";
-            if(duplicateflag){
-                responseString = duplicateResponseString;
-            }else{
-                responseString = mapper.writeValueAsString(commonClassDao.getData(SafePolicyWarning.class));
-            }
-            
-            if (fromAPI) {
-                if (responseString!=null && !responseString.equals(duplicateResponseString)) {
-                    if(isFakeUpdate){
-                        responseString = "Exists";
-                    } else {
-                        responseString = "Success";
-                    }
-                }
-                ModelAndView result = new ModelAndView();
-                result.setViewName(responseString);
-                return result;
-            } else {
-                response.setCharacterEncoding(utf8);
-                response.setContentType(applicationJsonContentType);
-                request.setCharacterEncoding(utf8);
- 
-                PrintWriter out = response.getWriter();
-                JSONObject j = new JSONObject("{safePolicyWarningDatas: " + responseString + "}");
-                out.write(j.toString());
-                return null;
-            }
- 
+			String responseString = null;
+			if(!duplicateflag){
+				if(safePolicyWarning.getId() == 0){
+					commonClassDao.save(safePolicyWarning);
+				}else{
+					commonClassDao.update(safePolicyWarning); 
+				} 
+				responseString = mapper.writeValueAsString(commonClassDao.getData(SafePolicyWarning.class));
+			}else{
+				responseString = duplicateResponseString;
+			}
+			if(fromAPI){
+				return utils.getResultForApi(responseString);
+			}else{
+				utils.setResponseData(response, safePolicyWarningDatas, responseString);
+			}
         }catch (Exception e) {
-        	LOGGER.error(e);
-			response.setCharacterEncoding(utf8);
-			request.setCharacterEncoding(utf8);
-			PrintWriter out = response.getWriter();
-			out.write(PolicyUtils.CATCH_EXCEPTION);
+        	utils.setErrorResponseData(response, e);
 		}
 		return null;
 	}
 
 	@RequestMapping(value = { "/sp_dictionary/remove_SafePolicyWarning" }, method = {RequestMethod.POST })
 	public void removeSafePolicyWarningDictionary(HttpServletRequest request, HttpServletResponse response) throws IOException {
-		try {
-			ObjectMapper mapper = new ObjectMapper();
-			mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-			JsonNode root = mapper.readTree(request.getReader());
-			SafePolicyWarning safePolicyWarningData = mapper.readValue(root.get("data").toString(),
-					SafePolicyWarning.class);
-			commonClassDao.delete(safePolicyWarningData);
-			response.setCharacterEncoding(utf8);
-			response.setContentType(applicationJsonContentType);
-			request.setCharacterEncoding(utf8);
-
-			PrintWriter out = response.getWriter();
-
-			String responseString = mapper.writeValueAsString(commonClassDao.getData(SafePolicyWarning.class));
-			JSONObject j = new JSONObject("{safePolicyWarningDatas: " + responseString + "}");
-			out.write(j.toString());
-		} catch (Exception e) {
-			LOGGER.error(e);
-			response.setCharacterEncoding(utf8);
-			request.setCharacterEncoding(utf8);
-			PrintWriter out = response.getWriter();
-			out.write(PolicyUtils.CATCH_EXCEPTION);
-		}
+		DictionaryUtils utils = getDictionaryUtilsInstance();
+		utils.removeData(request, response, safePolicyWarningDatas, SafePolicyWarning.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 53616aa..c444596 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
@@ -22,6 +22,7 @@
 
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import static org.mockito.Mockito.when;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -47,13 +48,21 @@
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.onap.policy.pap.xacml.rest.XACMLPapServlet;
+import org.onap.policy.pap.xacml.rest.controller.ActionPolicyDictionaryController;
 import org.onap.policy.pap.xacml.rest.controller.ClosedLoopDictionaryController;
+import org.onap.policy.pap.xacml.rest.controller.DecisionPolicyDictionaryController;
+import org.onap.policy.pap.xacml.rest.controller.DescriptiveDictionaryController;
+import org.onap.policy.pap.xacml.rest.controller.DictionaryController;
 import org.onap.policy.pap.xacml.rest.controller.FirewallDictionaryController;
+import org.onap.policy.pap.xacml.rest.controller.MicroServiceDictionaryController;
+import org.onap.policy.pap.xacml.rest.controller.PolicyScopeDictionaryController;
+import org.onap.policy.pap.xacml.rest.controller.SafePolicyController;
 import org.onap.policy.pap.xacml.rest.daoimpl.CommonClassDaoImpl;
 import org.onap.policy.pap.xacml.rest.policycontroller.PolicyCreation;
 import org.onap.policy.pap.xacml.rest.util.DictionaryUtils;
 import org.onap.policy.rest.dao.CommonClassDao;
 import org.onap.policy.rest.jpa.BRMSParamTemplate;
+import org.onap.policy.rest.jpa.Category;
 import org.onap.policy.rest.jpa.PolicyEditorScopes;
 import org.onap.policy.rest.jpa.UserInfo;
 import org.onap.policy.utils.PolicyUtils;
@@ -75,6 +84,7 @@
     private ServletConfig servletConfig;
     private XACMLPapServlet pap;
     private SessionFactory sessionFactory;
+    private CommonClassDao commonClassDao;
 
     @Before
     public void setUp() throws ServletException {
@@ -90,7 +100,7 @@
                 .thenReturn("src/test/resources/xacml.pap.properties");
         pap = new XACMLPapServlet();
         pap.init(servletConfig);
-        CommonClassDao commonClassDao = Mockito.mock(CommonClassDao.class);
+        commonClassDao = Mockito.mock(CommonClassDao.class);
         new DictionaryUtils(commonClassDao);
         DictionaryUtils.setDictionaryUtils(new DictionaryUtils());
         Mockito.mock(DictionaryUtils.class);  
@@ -523,6 +533,170 @@
         Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
     }
     
+    @Test
+    public void testCommonCreateDictionary() throws IOException, SQLException, ServletException {
+    	new DictionaryController(commonClassDao);
+    	new ActionPolicyDictionaryController(commonClassDao);
+    	new SafePolicyController(commonClassDao);
+    	new DescriptiveDictionaryController(commonClassDao);
+    	List<Object> object = new ArrayList<>();
+        object.add(new Category());
+        when(commonClassDao.getDataById(Category.class, "shortName", "resource")).thenReturn(object);
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	String json = "{\"dictionaryFields\": {\"onapName\": \"testMMRestAPI1\",\"description\": \"testing update response message\"}}";
+    	dictionaryTestSetup(false, "OnapName", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\": {\"xacmlId\": \"testMMRestAPI1\",\"datatypeBean\": {\"shortName\": \"string\"}, \"description\": \"testing update\",\"priority\": \"High\",\"userDataTypeValues\": [{\"attributeValues\": \"testAttr\"}, {\"attributeValues\": \"testAttr2\"}, {\"attributeValues\": \"testAttr3\"}]}}";
+    	dictionaryTestSetup(false, "Attribute", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\":{\"attributeName\":\"TestMMrestAPI1\",\"type\":\"REST\",\"url\":\"testsomeurl.com\",\"method\":\"GET\",\"description\":\"test create\",\"body\":\"Testing Create\",\"headers\":[{\"option\":\"test1\",\"number\":\"test\"},{\"option\":\"test2\",\"number\":\"test\"}]}}";
+    	dictionaryTestSetup(false, "Action", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\":{\"scopeName\":\"testMMRestAPI1\",\"description\":\"test\",\"attributes\":[{\"option\":\"test1\",\"number\":\"test\"},{\"option\":\"test2\",\"number\":\"test\"}]}}";
+    	dictionaryTestSetup(false, "DescriptiveScope", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\":{\"riskName\":\"testMMrestAPI1\",\"description\":\"test\"}}";
+    	dictionaryTestSetup(false, "RiskType", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\":{\"name\":\"testMMrestAPI1\",\"message\":\"test\",\"riskType\":\"testMMrestAPI1\"}}";
+    	dictionaryTestSetup(false, "SafePolicyWarning", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    }
+    
+    @Test
+    public void testDecisionCreateDictionary() throws IOException, SQLException, ServletException {
+    	new DecisionPolicyDictionaryController(commonClassDao);
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	String json = "{\"dictionaryFields\":{\"xacmlId\":\"testMMRestAPI1\",\"datatypeBean\":{\"shortName\":\"string\"},\"description\":\"test\",\"priority\":\"High\"}}";
+    	dictionaryTestSetup(false, "Settings", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\":{\"bbid\":\"BB1\",\"workstep\":\"1\",\"treatments\":\"Manual Handling,Abort,Retry\"}}";
+    	dictionaryTestSetup(false, "RainyDayTreatments", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    }
+    
+    @Test
+    public void testMSCreateDictionary() throws IOException, SQLException, ServletException {
+    	new MicroServiceDictionaryController(commonClassDao);
+    	new PolicyScopeDictionaryController(commonClassDao);
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	String json = "{\"dictionaryFields\":{\"name\":\"testMMrestAPI1\",\"descriptionValue\":\"test\"}}";
+    	dictionaryTestSetup(false, "MicroServiceLocation", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\":{\"name\":\"testMMrestAPI1\",\"descriptionValue\":\"test\"}}";
+    	dictionaryTestSetup(false, "MicroServiceConfigName", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\":{\"name\":\"testMMrestAPI1\",\"description\":\"test\"}}";
+    	dictionaryTestSetup(false, "DCAEUUID", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\":{\"name\":\"testApiANY\",\"descriptionValue\":\"default test\"}}";
+    	dictionaryTestSetup(false, "PolicyScopeService", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\":{\"name\":\"testApiANY\",\"descriptionValue\":\"default test\"}}";
+    	dictionaryTestSetup(false, "PolicyScopeResource", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\":{\"name\":\"testApiANY\",\"descriptionValue\":\"default test\"}}";
+    	dictionaryTestSetup(false, "PolicyScopeType", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\":{\"name\":\"testApiANY\",\"descriptionValue\":\"default test\"}}";
+    	dictionaryTestSetup(false, "PolicyScopeClosedLoop", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    	
+    	httpServletRequest = Mockito.mock(HttpServletRequest.class);
+    	httpServletResponse = Mockito.mock(MockHttpServletResponse.class);
+    	json = "{\"dictionaryFields\":{\"groupName\":\"testMMrestAPI1\",\"description\":\"testing\"},\"groupPolicyScopeListData1\":{\"resource\":\"ANY\",\"type\":\"ANY\",\"service\":\"ANY\",\"closedloop\":\"ANY\"}}";
+    	dictionaryTestSetup(false, "GroupPolicyScopeList", json);
+    	// send Request to PAP
+    	pap.service(httpServletRequest, httpServletResponse);
+    	// Verify 
+    	Mockito.verify(httpServletResponse).setStatus(HttpServletResponse.SC_OK);
+    }
+    
     private void dictionaryTestSetup(Boolean updateFlag, String dictionaryType, String json) throws IOException, SQLException {
         Mockito.when(httpServletRequest.getHeader(ENVIRONMENT_HEADER)).thenReturn("DEVL");
         Mockito.when(httpServletRequest.getHeader("ClientScope")).thenReturn("dictionaryItem");
@@ -566,6 +740,27 @@
     }
 
     @Test
+    public void getDictionary() throws ServletException, IOException{
+    	String[] dictionarys = new String[]{"Attribute", "OnapName", "Action", "BRMSParamTemplate","VSCLAction"
+    			,"VNFType","PEPOptions","Varbind","Service","Site", "Settings", "RainyDayTreatments",
+    			"DescriptiveScope", "ActionList", "ProtocolList", "Zone", "SecurityZone",
+    			"PrefixList", "AddressGroup", "ServiceGroup", "ServiceList", "TermList",
+    			"MicroServiceLocation", "MicroServiceConfigName", "DCAEUUID", "MicroServiceModels",
+    			"PolicyScopeService", "PolicyScopeResource", "PolicyScopeType", "PolicyScopeClosedLoop",
+    			"GroupPolicyScopeList", "RiskType", "SafePolicyWarning", "MicroServiceDictionary"};
+    	for(String dictionary : dictionarys){
+    		httpServletRequest = Mockito.mock(HttpServletRequest.class);
+        	httpServletResponse = new MockHttpServletResponse();
+        	Mockito.when(httpServletRequest.getHeader(ENVIRONMENT_HEADER)).thenReturn("DEVL");
+        	Mockito.when(httpServletRequest.getMethod()).thenReturn("GET");
+        	Mockito.when(httpServletRequest.getParameter("apiflag")).thenReturn("api");
+        	Mockito.when(httpServletRequest.getParameter("dictionaryType")).thenReturn(dictionary);
+        	pap.service(httpServletRequest, httpServletResponse);
+        	assertTrue(HttpServletResponse.SC_OK == httpServletResponse.getStatus());
+    	}
+    }
+    
+    @Test
     public void testDummy() throws ServletException, IOException {
 
         Mockito.when(httpServletRequest.getMethod()).thenReturn("POST");
diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/DictionaryImportControllerTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/DictionaryImportControllerTest.java
index e8d602c..7c1c507 100644
--- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/DictionaryImportControllerTest.java
+++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/DictionaryImportControllerTest.java
@@ -20,20 +20,46 @@
 package org.onap.policy.pap.xacml.rest.controller;
 
 import static org.junit.Assert.assertTrue;
-import org.onap.policy.pap.xacml.rest.controller.DictionaryImportController;
-import org.junit.After;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 import org.junit.Before;
 import org.junit.Test;
+import org.mockito.Mockito;
 import org.onap.policy.common.logging.flexlogger.FlexLogger;
 import org.onap.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.rest.dao.CommonClassDao;
+import org.springframework.mock.web.MockHttpServletResponse;
 
-public class DictionaryImportControllerTest {
+public class DictionaryImportControllerTest  extends Mockito{
 	
 	private static Logger logger = FlexLogger.getLogger(DictionaryImportController.class);
 
+	private static CommonClassDao commonClassDao;
+	private HttpServletRequest request = null;
+	private HttpServletResponse response = null;
+	private DictionaryImportController controller = null;
+	
 	@Before
 	public void setUp() throws Exception {
 		logger.info("setUp: Entering");
+		commonClassDao = Mockito.mock(CommonClassDao.class);
+		doNothing().when(commonClassDao).save(new Object());
+		controller = new DictionaryImportController(); 
+		new DictionaryImportController(commonClassDao);
+		request = Mockito.mock(HttpServletRequest.class);
+		response =  new MockHttpServletResponse();
 	}
 	
 	@Test
@@ -45,8 +71,69 @@
 		assertTrue(cotroller.isValidDictionaryName("ActionList"));
 	}
 	
-	@After
-	 public void destroy(){
-
-	 }
+	@Test
+	public void testImportDictionaryData() throws ServletException, IOException{
+		List<String> fileNames = new ArrayList<>();
+		fileNames.add("Attribute.csv");
+		fileNames.add("ActionPolicyDictionary.csv");
+		fileNames.add("OnapName.csv");
+		fileNames.add("MSPolicyDictionary.csv");
+		fileNames.add("ClosedLoopService.csv");
+		fileNames.add("ClosedLoopSite.csv");
+		fileNames.add("VarbindDictionary.csv");
+		fileNames.add("BRMSParamDictionary.csv");
+		fileNames.add("BRMSControllerDictionary.csv");
+		fileNames.add("BRMSDependencyDictionary.csv");
+		fileNames.add("PrefixList.csv");
+		fileNames.add("SecurityZone.csv");
+		fileNames.add("ServiceList.csv");
+		fileNames.add("ServiceGroup.csv");
+		fileNames.add("AddressGroup.csv");
+		fileNames.add("ProtocolList.csv");
+		fileNames.add("TermList.csv");
+		fileNames.add("SearchCriteria.csv");
+		fileNames.add("VNFType.csv");
+		fileNames.add("VSCLAction.csv");
+		fileNames.add("PEPOptions.csv");
+		fileNames.add("Settings.csv");
+		fileNames.add("Zone.csv");
+		fileNames.add("ActionList.csv");
+		for(int i =0; i < fileNames.size(); i++){
+			File file = new File("src/test/resources/dictionaryImport/"+fileNames.get(i));
+			try(FileInputStream targetStream = new FileInputStream(file)){
+				PushPolicyControllerTest pushController = new PushPolicyControllerTest();
+				when(request.getInputStream()).thenReturn(pushController.getInputStream(getBytes(targetStream)));
+				when(request.getParameter("userId")).thenReturn("demo");
+				when(request.getParameter("dictionaryName")).thenReturn(fileNames.get(i));
+				controller.importDictionaryData(request, response);
+				assertTrue(HttpServletResponse.SC_OK == response.getStatus());
+			} catch (IOException e) {
+				fail();
+			}
+		}
+		when(request.getParameter("dictionaryName")).thenReturn("WrongName");
+		controller.importDictionaryData(request, response);
+		assertTrue(HttpServletResponse.SC_OK == response.getStatus());
+		
+		when(request.getParameter("dictionaryName")).thenReturn("");
+		controller.importDictionaryData(request, response);
+		assertTrue(HttpServletResponse.SC_BAD_REQUEST == response.getStatus());
+		
+		when(request.getInputStream()).thenReturn(null);
+		when(request.getParameter("dictionaryName")).thenReturn("Attribute.csv");
+		controller.importDictionaryData(request, response);
+		assertTrue(HttpServletResponse.SC_INTERNAL_SERVER_ERROR == response.getStatus());
+	}
+	
+	public static byte[] getBytes(InputStream is) throws IOException {
+		int len;
+		int size = 1024;
+		byte[] buf;
+		ByteArrayOutputStream bos = new ByteArrayOutputStream();
+		buf = new byte[size];
+		while ((len = is.read(buf, 0, size)) != -1)
+			bos.write(buf, 0, len);
+		buf = bos.toByteArray();
+		return buf;
+	}
 }
diff --git a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/SafePolicyControllerTest.java b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/SafePolicyControllerTest.java
index 48af244..7d23475 100644
--- a/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/SafePolicyControllerTest.java
+++ b/ONAP-PAP-REST/src/test/java/org/onap/policy/pap/xacml/rest/controller/SafePolicyControllerTest.java
@@ -22,6 +22,7 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
 import java.io.BufferedReader;
@@ -36,6 +37,7 @@
 import org.mockito.Mockito;
 import org.onap.policy.common.logging.flexlogger.FlexLogger;
 import org.onap.policy.common.logging.flexlogger.Logger;
+import org.onap.policy.pap.xacml.rest.util.DictionaryUtils;
 import org.onap.policy.rest.dao.CommonClassDao;
 import org.onap.policy.rest.jpa.RiskType;
 import org.onap.policy.rest.jpa.SafePolicyWarning;
@@ -57,20 +59,22 @@
 	public void setUp() throws Exception {
 		logger.info("setUp: Entering");
 		commonClassDao = Mockito.mock(CommonClassDao.class);
-		
+
 		data = new ArrayList<>();
 		data.add("Test");
-		
+
 		userInfo = new UserInfo();
 		userInfo.setUserLoginId("Test");
 		userInfo.setUserName("Test");
-	
+
 		doNothing().when(commonClassDao).delete(new RiskType());
 		doNothing().when(commonClassDao).save(new RiskType());
-		
+
 		controller = new SafePolicyController();
 		controller.setCommonClassDao(commonClassDao);
-		
+		new DictionaryUtils(commonClassDao);
+		DictionaryUtils.setDictionaryUtils(new DictionaryUtils());
+		mock(DictionaryUtils.class);
 		request = Mockito.mock(HttpServletRequest.class);
 		response =  new MockHttpServletResponse();  
 		logger.info("setUp: exit");
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/ActionList.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ActionList.csv
new file mode 100644
index 0000000..4e17605
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ActionList.csv
@@ -0,0 +1,2 @@
+"Id","Action Name","Description"
+104443,"1234","43234"
\ No newline at end of file
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/ActionPolicyDictionary.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ActionPolicyDictionary.csv
new file mode 100644
index 0000000..4c447d6
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ActionPolicyDictionary.csv
@@ -0,0 +1,2 @@
+Id,Attribute Name,Type,Url,Method,Headers,Description,Created By,Modified By,Created Date,Modified Date,,body
+10051,AttribName5,REST,www.testitc.com,PUT,TestHeader=TestHeaderVal,Action policy attribute for GET method ,demo,demo ,Mon Jun 20 2016 11:10:05 GMT-0400 (Eastern Daylight Time),Mon Jun 20 2016 11:10:05 GMT-0400 (Eastern Daylight Time),,"{""a"":""b""}"
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/AddressGroup.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/AddressGroup.csv
new file mode 100644
index 0000000..9225592
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/AddressGroup.csv
@@ -0,0 +1,2 @@
+"Id","Group Name","Prefix List","Description"
+66782,"Group_1702_Address0Group_37_new","testMMRestAPI1,testMMRestAPI2","testing"
\ No newline at end of file
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/Attribute.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/Attribute.csv
new file mode 100644
index 0000000..e51e4d2
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/Attribute.csv
@@ -0,0 +1,6 @@
+Id,Attribute ID,Data Type,Attribute Value,Description,Priority,Created By,Modified By,Created Date,Modified Date
+7,Test,string,"test,test",test,High,Demo,Demo,Mon Feb 26 2018 23:26:24 GMT-0500 (Eastern Standard Time),Mon Feb 26 2018 23:26:37 GMT-0500 (Eastern Standard Time)
+1,Test,integer,,,,,,,
+2,Test,double,,,,,,,
+3,Test,boolean,,,,,,,
+4,Test,user,,,,,,,
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/BRMSControllerDictionary.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/BRMSControllerDictionary.csv
new file mode 100644
index 0000000..81e6da1
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/BRMSControllerDictionary.csv
@@ -0,0 +1,2 @@
+Id,Controller Name,Description,Created By,Created Date,Modified By,Modified Date,controller
+2833,BRMSController_GA_21_New_2018_02_23_20_13_15,BRMSTest,demo,Fri Feb 23 2018 09:43:23 GMT-0500 (Eastern Standard Time),demo,Fri Feb 23 2018 09:43:23 GMT-0500 (Eastern Standard Time),test
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/BRMSDependencyDictionary.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/BRMSDependencyDictionary.csv
new file mode 100644
index 0000000..dfd5b2f
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/BRMSDependencyDictionary.csv
@@ -0,0 +1,2 @@
+Id,Dependency Name,Description,Created By,Created Date,Modified By,Modified Date,dependency
+391,BRMSDependency_GA_02,BRMSDependenctTest01,demo,Thu Sep 07 2017 14:36:36 GMT-0400 (Eastern Daylight Time),demo,Thu Sep 07 2017 14:36:36 GMT-0400 (Eastern Daylight Time),test
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/BRMSParamDictionary.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/BRMSParamDictionary.csv
new file mode 100644
index 0000000..c3e3c3d
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/BRMSParamDictionary.csv
@@ -0,0 +1,2 @@
+Id,Rule Name,Description,Created By,Created Date,rule
+58537,CLeNodeB,BRMS template for eNodeB guard 1802.48.3-1,demo,Fri Feb 02 2018 12:47:54 GMT-0500 (Eastern Standard Time),test
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/ClosedLoopService.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ClosedLoopService.csv
new file mode 100644
index 0000000..4239425
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ClosedLoopService.csv
@@ -0,0 +1,2 @@
+Id,Service Name,Description,Created By,Modified By,Created Date,Modified Date
+10952,vSCP,,demo,demo,Tue Jun 28 2016 14:42:17 GMT-0400 (Eastern Daylight Time),Tue Jun 28 2016 14:42:17 GMT-0400 (Eastern Daylight Time)
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/ClosedLoopSite.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ClosedLoopSite.csv
new file mode 100644
index 0000000..c3bda56
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ClosedLoopSite.csv
@@ -0,0 +1,2 @@
+Id,Site Name,Description,Created By,Modified By,Created Date,Modified Date
+5651,Default,,demo,demo,Thu Mar 17 2016 17:45:20 GMT-0400 (Eastern Daylight Time),Thu Mar 17 2016 17:45:20 GMT-0400 (Eastern Daylight Time)
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/MSPolicyDictionary.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/MSPolicyDictionary.csv
new file mode 100644
index 0000000..cce3942
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/MSPolicyDictionary.csv
@@ -0,0 +1,2 @@
+Id,Micro Service Model,Description,Model Version,Imported By,dependency,attributes,enumValues,Ref Attributes,Sub Attributes
+16857,PolicyBody,PolicyBody,0.1.0-SNAPSHOT,demo,test,test,test,test,test
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/OnapName.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/OnapName.csv
new file mode 100644
index 0000000..5260044
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/OnapName.csv
@@ -0,0 +1,2 @@
+Id,Onap Name,Description,Created By,Modified By,Created Date,Modified Date
+19369,PDPD,for PDPD,demo,demo,Wed Aug 30 2017 10:50:18 GMT-0400 (Eastern Daylight Time),Wed Aug 30 2017 10:50:18 GMT-0400 (Eastern Daylight Time)
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/PEPOptions.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/PEPOptions.csv
new file mode 100644
index 0000000..61adca1
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/PEPOptions.csv
@@ -0,0 +1,2 @@
+"Id","PEP Name","Actions","Description","Created By","Modified By","Created Date","Modified Date"
+108274,"PEPoptions_110920172059","test1=#@test:#@test2=#@test","testing create","API","API","Mon Sep 11 2017 11:29:48 GMT-0400 (Eastern Daylight Time)","Mon Sep 11 2017 11:29:48 GMT-0400 (Eastern Daylight Time)"
\ No newline at end of file
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/PrefixList.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/PrefixList.csv
new file mode 100644
index 0000000..bacfe85
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/PrefixList.csv
@@ -0,0 +1,2 @@
+"Id","PrefixList Name","Description","PrefixList Value"
+122155,"221120170105","testing","12.81.230.32/27"
\ No newline at end of file
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/ProtocolList.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ProtocolList.csv
new file mode 100644
index 0000000..8ef6555
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ProtocolList.csv
@@ -0,0 +1,2 @@
+"Id","Protocol Name","Description"
+5497,"221120170105","test"
\ No newline at end of file
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/SearchCriteria.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/SearchCriteria.csv
new file mode 100644
index 0000000..b8bf7af
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/SearchCriteria.csv
@@ -0,0 +1,2 @@
+Id,Descriptive Scope Name,Search Criteria,Description,Created By,Modified By,Created Date,Modified Date
+108925,check_8901,12:test,,demo,demo,Wed Oct 25 2017 17:39:01 GMT-0400 (Eastern Daylight Time),Wed Oct 25 2017 17:39:01 GMT-0400 (Eastern Daylight Time)
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/SecurityZone.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/SecurityZone.csv
new file mode 100644
index 0000000..edb09a0
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/SecurityZone.csv
@@ -0,0 +1,2 @@
+"Id","Zone Name","Zone Value"
+105205,"check_new","Description"
\ No newline at end of file
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/ServiceGroup.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ServiceGroup.csv
new file mode 100644
index 0000000..2fe18d9
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ServiceGroup.csv
@@ -0,0 +1,2 @@
+"Id","Group Name","Service List"
+66589,"Group_Group2017","telnet"
\ No newline at end of file
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/ServiceList.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ServiceList.csv
new file mode 100644
index 0000000..e4fd75f
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/ServiceList.csv
@@ -0,0 +1,2 @@
+"Id","Service Name","Description","Service Type","Transport Protocol","APP Protocol","Ports"
+100024,"BillTesting1","BillTesting","SERVICE","IP2","","80"
\ No newline at end of file
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/Settings.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/Settings.csv
new file mode 100644
index 0000000..b73db2d
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/Settings.csv
@@ -0,0 +1,6 @@
+Id,Settings ID,Data Type,Description,Created By,Modified By,Created Date,Modified Date,priority
+7681,2.2112E+11,string,test,API,API,Tue Nov 21 2017 14:33:28 GMT-0500 (Eastern Standard Time),Tue Nov 21 2017 14:33:28 GMT-0500 (Eastern Standard Time),high
+1,test,integer,,,,,,
+2,test,double,,,,,,
+3,test,boolean,,,,,,
+4,test,user,,,,,,
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/TermList.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/TermList.csv
new file mode 100644
index 0000000..06338a2
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/TermList.csv
@@ -0,0 +1,2 @@
+Id,Term-Name,Term-Description,From Zone,To Zone,Source-IP-List,Destination-IP-List,Source-Port-List,Destination-Port-List,Action List,Created By,Modified By,Created Date,Modified Date
+118837,basicRule,BasicRule,Trusted,UnTrusted,PL_Astra,PL_CCE,,snmp,deny,demo,demo,Fri Dec 01 2017 10:30:45 GMT-0500 (Eastern Standard Time),Fri Dec 01 2017 10:30:45 GMT-0500 (Eastern Standard Time)
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/VNFType.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/VNFType.csv
new file mode 100644
index 0000000..8dca6b7
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/VNFType.csv
@@ -0,0 +1,2 @@
+"Id","VNF Type","Description","Created By","Modified By","Created Date","Modified Date"
+108043,"221120170101","testing create","API","API","Tue Nov 21 2017 14:31:24 GMT-0500 (Eastern Standard Time)","Tue Nov 21 2017 14:31:24 GMT-0500 (Eastern Standard Time)"
\ No newline at end of file
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/VSCLAction.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/VSCLAction.csv
new file mode 100644
index 0000000..b0d7d86
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/VSCLAction.csv
@@ -0,0 +1,2 @@
+"Id","VSCL Action","Description","Created By","Modified By","Created Date","Modified Date"
+56419,"221120170102","default test","API","API","Tue Nov 21 2017 14:32:14 GMT-0500 (Eastern Standard Time)","Tue Nov 21 2017 14:32:33 GMT-0500 (Eastern Standard Time)"
\ No newline at end of file
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/VarbindDictionary.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/VarbindDictionary.csv
new file mode 100644
index 0000000..61166a0
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/VarbindDictionary.csv
@@ -0,0 +1,2 @@
+Id,Varbind Name,Varbind Description,Varbind OID,Created By,Modified By,Created Date,Modified Date
+15760,A1,test,test,demo,demo,Mon Sep 26 2016 12:37:25 GMT-0400 (Eastern Daylight Time),Mon Sep 26 2016 12:37:25 GMT-0400 (Eastern Daylight Time)
diff --git a/ONAP-PAP-REST/src/test/resources/dictionaryImport/Zone.csv b/ONAP-PAP-REST/src/test/resources/dictionaryImport/Zone.csv
new file mode 100644
index 0000000..d563a6b
--- /dev/null
+++ b/ONAP-PAP-REST/src/test/resources/dictionaryImport/Zone.csv
@@ -0,0 +1,2 @@
+"Id","Zone Name","Zone Value"
+57889,"2017","2017"
\ No newline at end of file
