2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.pap.xacml.rest.controller;
27 import java.io.FileOutputStream;
28 import java.io.FileReader;
29 import java.io.IOException;
30 import java.io.OutputStream;
31 import java.util.List;
33 import javax.servlet.http.HttpServletRequest;
35 import org.apache.commons.compress.utils.IOUtils;
36 import org.onap.policy.rest.dao.CommonClassDao;
37 import org.onap.policy.rest.jpa.ActionList;
38 import org.onap.policy.rest.jpa.ActionPolicyDict;
39 import org.onap.policy.rest.jpa.AddressGroup;
40 import org.onap.policy.rest.jpa.Attribute;
41 import org.onap.policy.rest.jpa.BRMSParamTemplate;
42 import org.onap.policy.rest.jpa.Category;
43 import org.onap.policy.rest.jpa.Datatype;
44 import org.onap.policy.rest.jpa.DecisionSettings;
45 import org.onap.policy.rest.jpa.DescriptiveScope;
46 import org.onap.policy.rest.jpa.GroupServiceList;
47 import org.onap.policy.rest.jpa.OnapName;
48 import org.onap.policy.rest.jpa.PEPOptions;
49 import org.onap.policy.rest.jpa.PrefixList;
50 import org.onap.policy.rest.jpa.ProtocolList;
51 import org.onap.policy.rest.jpa.SecurityZone;
52 import org.onap.policy.rest.jpa.ServiceList;
53 import org.onap.policy.rest.jpa.TermList;
54 import org.onap.policy.rest.jpa.UserInfo;
55 import org.onap.policy.rest.jpa.VNFType;
56 import org.onap.policy.rest.jpa.VSCLAction;
57 import org.onap.policy.rest.jpa.VarbindDictionary;
58 import org.onap.policy.rest.jpa.Zone;
59 import org.springframework.beans.factory.annotation.Autowired;
60 import org.springframework.stereotype.Controller;
61 import org.springframework.web.bind.annotation.RequestMapping;
63 import com.fasterxml.jackson.databind.DeserializationFeature;
64 import com.fasterxml.jackson.databind.ObjectMapper;
66 import au.com.bytecode.opencsv.CSVReader;
70 public class DictionaryImportController {
71 private String newFile;
73 private static CommonClassDao commonClassDao;
76 public DictionaryImportController(CommonClassDao commonClassDao){
77 DictionaryImportController.commonClassDao = commonClassDao;
80 public DictionaryImportController(){}
83 @RequestMapping(value={"/dictionary/import_dictionary"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
84 public void ImportDictionaryData(HttpServletRequest request) throws IOException{
85 ObjectMapper mapper = new ObjectMapper();
86 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
87 String userId = request.getParameter("userId");
88 String dictionaryName = request.getParameter("dictionaryName");
90 File file = new File(dictionaryName);
91 OutputStream outputStream = new FileOutputStream(file);
92 IOUtils.copy(request.getInputStream(), outputStream);
94 this.newFile = file.toString();
95 CSVReader csvReader = new CSVReader(new FileReader(this.newFile));
96 List<String[]> dictSheet = csvReader.readAll();
97 if(dictionaryName.startsWith("Attribute")){
98 for(int i = 1; i< dictSheet.size(); i++){
99 Attribute attribute = new Attribute("");
100 UserInfo userinfo = new UserInfo();
101 userinfo.setUserLoginId(userId);
102 attribute.setUserCreatedBy(userinfo);
103 attribute.setUserModifiedBy(userinfo);
104 String[] rows = dictSheet.get(i);
105 for (int j=0 ; j<rows.length; j++ ){
106 if(("xacml_id").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Attribute ID").equalsIgnoreCase(dictSheet.get(0)[j])){
107 attribute.setXacmlId(rows[j]);
109 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
110 attribute.setDescription(rows[j]);
112 if(("priority").equalsIgnoreCase(dictSheet.get(0)[j])){
113 attribute.setPriority(rows[j]);
115 if(("datatype").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Data Type").equalsIgnoreCase(dictSheet.get(0)[j])){
116 Datatype dataType = new Datatype();
117 if(("string").equalsIgnoreCase(rows[j])){
119 }else if(("integer").equalsIgnoreCase(rows[j])){
121 }else if(("double").equalsIgnoreCase(rows[j])){
123 }else if(("boolean").equalsIgnoreCase(rows[j])){
125 }else if(("user").equalsIgnoreCase(rows[j])){
128 attribute.setDatatypeBean(dataType);
129 Category category = new Category();
131 attribute.setCategoryBean(category);
133 if(("attribute_value").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Attribute Value").equalsIgnoreCase(dictSheet.get(0)[j])){
134 attribute.setAttributeValue(rows[j]);
137 commonClassDao.save(attribute);
140 if(dictionaryName.startsWith("ActionPolicyDictionary")){
141 for(int i = 1; i< dictSheet.size(); i++){
142 ActionPolicyDict attribute = new ActionPolicyDict("", userId);
143 UserInfo userinfo = new UserInfo();
144 userinfo.setUserLoginId(userId);
145 attribute.setUserCreatedBy(userinfo);
146 attribute.setUserModifiedBy(userinfo);
147 String[] rows = dictSheet.get(i);
148 for (int j=0 ; j<rows.length; j++ ){
149 if(("attribute_name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Attribute Name").equalsIgnoreCase(dictSheet.get(0)[j])){
150 attribute.setAttributeName(rows[j]);
152 if(("body").equalsIgnoreCase(dictSheet.get(0)[j])){
153 attribute.setBody(rows[j]);
155 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
156 attribute.setDescription(rows[j]);
158 if(("headers").equalsIgnoreCase(dictSheet.get(0)[j])){
159 attribute.setHeader(rows[j]);
161 if(("method").equalsIgnoreCase(dictSheet.get(0)[j])){
162 attribute.setMethod(rows[j]);
164 if(("type").equalsIgnoreCase(dictSheet.get(0)[j])){
165 attribute.setMethod(rows[j]);
167 if(("url").equalsIgnoreCase(dictSheet.get(0)[j])){
168 attribute.setMethod(rows[j]);
171 commonClassDao.save(attribute);
174 if(dictionaryName.startsWith("OnapName")){
175 for(int i = 1; i< dictSheet.size(); i++){
176 OnapName attribute = new OnapName("", userId);
177 UserInfo userinfo = new UserInfo();
178 userinfo.setUserLoginId(userId);
179 attribute.setUserCreatedBy(userinfo);
180 attribute.setUserModifiedBy(userinfo);
181 String[] rows = dictSheet.get(i);
182 for (int j=0 ; j<rows.length; j++ ){
183 if(("onap_name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Onap Name").equalsIgnoreCase(dictSheet.get(0)[j])){
184 attribute.setOnapName(rows[j]);
186 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
187 attribute.setDescription(rows[j]);
190 commonClassDao.save(attribute);
193 if(dictionaryName.startsWith("VNFType")){
194 for(int i = 1; i< dictSheet.size(); i++){
195 VNFType attribute = new VNFType("", userId);
196 UserInfo userinfo = new UserInfo();
197 userinfo.setUserLoginId(userId);
198 attribute.setUserCreatedBy(userinfo);
199 attribute.setUserModifiedBy(userinfo);
200 String[] rows = dictSheet.get(i);
201 for (int j=0 ; j<rows.length; j++ ){
202 if(("vnf_type").equalsIgnoreCase(dictSheet.get(0)[j]) || ("VNF Type").equalsIgnoreCase(dictSheet.get(0)[j])){
203 attribute.setVnftype(rows[j]);
205 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
206 attribute.setDescription(rows[j]);
209 commonClassDao.save(attribute);
212 if(dictionaryName.startsWith("VSCLAction")){
213 for(int i = 1; i< dictSheet.size(); i++){
214 VSCLAction attribute = new VSCLAction("", userId);
215 UserInfo userinfo = new UserInfo();
216 userinfo.setUserLoginId(userId);
217 attribute.setUserCreatedBy(userinfo);
218 attribute.setUserModifiedBy(userinfo);
219 String[] rows = dictSheet.get(i);
220 for (int j=0 ; j<rows.length; j++ ){
221 if(("vscl_action").equalsIgnoreCase(dictSheet.get(0)[j]) || ("VSCL Action").equalsIgnoreCase(dictSheet.get(0)[j])){
222 attribute.setVsclaction(rows[j]);
224 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
225 attribute.setDescription(rows[j]);
228 commonClassDao.save(attribute);
231 if(dictionaryName.startsWith("PEPOptions")){
232 for(int i = 1; i< dictSheet.size(); i++){
233 PEPOptions attribute = new PEPOptions("", userId);
234 UserInfo userinfo = new UserInfo();
235 userinfo.setUserLoginId(userId);
236 attribute.setUserCreatedBy(userinfo);
237 attribute.setUserModifiedBy(userinfo);
238 String[] rows = dictSheet.get(i);
239 for (int j=0 ; j<rows.length; j++ ){
240 if(("PEP_NAME").equalsIgnoreCase(dictSheet.get(0)[j]) || ("PEP Name").equalsIgnoreCase(dictSheet.get(0)[j])){
241 attribute.setPepName(rows[j]);
243 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
244 attribute.setDescription(rows[j]);
246 if(("Actions").equalsIgnoreCase(dictSheet.get(0)[j])){
247 attribute.setActions(rows[j]);
250 commonClassDao.save(attribute);
253 if(dictionaryName.startsWith("VarbindDictionary")){
254 for(int i = 1; i< dictSheet.size(); i++){
255 VarbindDictionary attribute = new VarbindDictionary("", userId);
256 UserInfo userinfo = new UserInfo();
257 userinfo.setUserLoginId(userId);
258 attribute.setUserCreatedBy(userinfo);
259 attribute.setUserModifiedBy(userinfo);
260 String[] rows = dictSheet.get(i);
261 for (int j=0 ; j<rows.length; j++ ){
262 if(("varbind_Name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Varbind Name").equalsIgnoreCase(dictSheet.get(0)[j])){
263 attribute.setVarbindName(rows[j]);
265 if(("varbind_Description").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Varbind Description").equalsIgnoreCase(dictSheet.get(0)[j])){
266 attribute.setVarbindDescription(rows[j]);
268 if(("varbind_oid").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Varbind OID").equalsIgnoreCase(dictSheet.get(0)[j])){
269 attribute.setVarbindOID(rows[j]);
272 commonClassDao.save(attribute);
275 if(dictionaryName.startsWith("BRMSParamDictionary")){
276 for(int i = 1; i< dictSheet.size(); i++){
277 BRMSParamTemplate attribute = new BRMSParamTemplate();
278 UserInfo userinfo = new UserInfo();
279 userinfo.setUserLoginId(userId);
280 attribute.setUserCreatedBy(userinfo);
281 String[] rows = dictSheet.get(i);
282 for (int j=0 ; j<rows.length; j++ ){
283 if(("param_template_name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Rule Name").equalsIgnoreCase(dictSheet.get(0)[j])){
284 attribute.setRuleName(rows[j]);
286 if(("DESCRIPTION").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Description").equalsIgnoreCase(dictSheet.get(0)[j])){
287 attribute.setDescription(rows[j]);
289 if(("rule").equalsIgnoreCase(dictSheet.get(0)[j])){
290 attribute.setRule(rows[j]);
293 commonClassDao.save(attribute);
296 if(dictionaryName.startsWith("Settings")){
297 for(int i = 1; i< dictSheet.size(); i++){
298 DecisionSettings attribute = new DecisionSettings("", userId);
299 UserInfo userinfo = new UserInfo();
300 userinfo.setUserLoginId(userId);
301 attribute.setUserCreatedBy(userinfo);
302 attribute.setUserModifiedBy(userinfo);
303 String[] rows = dictSheet.get(i);
304 for (int j=0 ; j<rows.length; j++ ){
305 if(("xacml_id").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Settings ID").equalsIgnoreCase(dictSheet.get(0)[j])){
306 attribute.setXacmlId(rows[j]);
308 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
309 attribute.setDescription(rows[j]);
311 if(("priority").equalsIgnoreCase(dictSheet.get(0)[j])){
312 attribute.setPriority(rows[j]);
314 if(("datatype").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Data Type").equalsIgnoreCase(dictSheet.get(0)[j])){
315 Datatype dataType = new Datatype();
316 if(("string").equalsIgnoreCase(rows[j])){
318 }else if(("integer").equalsIgnoreCase(rows[j])){
320 }else if(("double").equalsIgnoreCase(rows[j])){
322 }else if(("boolean").equalsIgnoreCase(rows[j])){
324 }else if(("user").equalsIgnoreCase(rows[j])){
327 attribute.setDatatypeBean(dataType);
330 commonClassDao.save(attribute);
333 if(dictionaryName.startsWith("PrefixList")){
334 for(int i = 1; i< dictSheet.size(); i++){
335 PrefixList attribute = new PrefixList("", userId);
336 String[] rows = dictSheet.get(i);
337 for (int j=0 ; j<rows.length; j++ ){
338 if(("prefixListName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("PrefixList Name").equalsIgnoreCase(dictSheet.get(0)[j])){
339 attribute.setPrefixListName(rows[j]);
341 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
342 attribute.setPrefixListValue(rows[j]);
344 if(("prefixListValue").equalsIgnoreCase(dictSheet.get(0)[j]) || ("PrefixList Value").equalsIgnoreCase(dictSheet.get(0)[j])){
345 attribute.setDescription(rows[j]);
348 commonClassDao.save(attribute);
351 if(dictionaryName.startsWith("SecurityZone")){
352 for(int i = 1; i< dictSheet.size(); i++){
353 SecurityZone attribute = new SecurityZone("", userId);
354 String[] rows = dictSheet.get(i);
355 for (int j=0 ; j<rows.length; j++ ){
356 if(("zoneName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Zone Name").equalsIgnoreCase(dictSheet.get(0)[j])){
357 attribute.setZoneName(rows[j]);
359 if(("zoneValue").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Zone Value").equalsIgnoreCase(dictSheet.get(0)[j])){
360 attribute.setZoneValue(rows[j]);
363 commonClassDao.save(attribute);
366 if(dictionaryName.startsWith("Zone")){
367 for(int i = 1; i< dictSheet.size(); i++){
368 Zone attribute = new Zone("", userId);
369 String[] rows = dictSheet.get(i);
370 for (int j=0 ; j<rows.length; j++ ){
371 if(("zoneName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Zone Name").equalsIgnoreCase(dictSheet.get(0)[j])){
372 attribute.setZoneName(rows[j]);
374 if(("zoneValue").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Zone Value").equalsIgnoreCase(dictSheet.get(0)[j])){
375 attribute.setZoneValue(rows[j]);
378 commonClassDao.save(attribute);
381 if(dictionaryName.startsWith("ServiceList")){
382 for(int i = 1; i< dictSheet.size(); i++){
383 ServiceList attribute = new ServiceList("", userId);
384 String[] rows = dictSheet.get(i);
385 for (int j=0 ; j<rows.length; j++ ){
386 if(("serviceName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Service Name").equalsIgnoreCase(dictSheet.get(0)[j])){
387 attribute.setServiceName(rows[j]);
389 if(("serviceDesc").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Description").equalsIgnoreCase(dictSheet.get(0)[j])){
390 attribute.setServiceDescription(rows[j]);
392 if(("serviceType").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Service Type").equalsIgnoreCase(dictSheet.get(0)[j])){
393 attribute.setServiceType(rows[j]);
395 if(("serviceTrasProtocol").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Transport Protocol").equalsIgnoreCase(dictSheet.get(0)[j])){
396 attribute.setServiceTransProtocol(rows[j]);
398 if(("serviceAppProtocol").equalsIgnoreCase(dictSheet.get(0)[j]) || ("APP Protocol").equalsIgnoreCase(dictSheet.get(0)[j])){
399 attribute.setServiceAppProtocol(rows[j]);
401 if(("servicePorts").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Ports").equalsIgnoreCase(dictSheet.get(0)[j])){
402 attribute.setServicePorts(rows[j]);
405 commonClassDao.save(attribute);
408 if(dictionaryName.startsWith("ServiceGroup")){
409 for(int i = 1; i< dictSheet.size(); i++){
410 GroupServiceList attribute = new GroupServiceList("", userId);
411 String[] rows = dictSheet.get(i);
412 for (int j=0 ; j<rows.length; j++ ){
413 if(("name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Group Name").equalsIgnoreCase(dictSheet.get(0)[j])){
414 attribute.setGroupName(rows[j]);
416 if(("serviceList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Service List").equalsIgnoreCase(dictSheet.get(0)[j])){
417 attribute.setServiceList(rows[j]);
420 commonClassDao.save(attribute);
423 if(dictionaryName.startsWith("AddressGroup")){
424 for(int i = 1; i< dictSheet.size(); i++){
425 AddressGroup attribute = new AddressGroup("", userId);
426 String[] rows = dictSheet.get(i);
427 for (int j=0 ; j<rows.length; j++ ){
428 if(("name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Group Name").equalsIgnoreCase(dictSheet.get(0)[j])){
429 attribute.setGroupName(rows[j]);
431 if(("serviceList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Prefix List").equalsIgnoreCase(dictSheet.get(0)[j])){
432 attribute.setServiceList(rows[j]);
434 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
435 attribute.setDescription(rows[j]);
438 commonClassDao.save(attribute);
441 if(dictionaryName.startsWith("ProtocolList")){
442 for(int i = 1; i< dictSheet.size(); i++){
443 ProtocolList attribute = new ProtocolList("", userId);
444 String[] rows = dictSheet.get(i);
445 for (int j=0 ; j<rows.length; j++ ){
446 if(("protocolName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Protocol Name").equalsIgnoreCase(dictSheet.get(0)[j])){
447 attribute.setProtocolName(rows[j]);
449 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
450 attribute.setDescription(rows[j]);
453 commonClassDao.save(attribute);
456 if(dictionaryName.startsWith("ActionList")){
457 for(int i = 1; i< dictSheet.size(); i++){
458 ActionList attribute = new ActionList("", userId);
459 String[] rows = dictSheet.get(i);
460 for (int j=0 ; j<rows.length; j++ ){
461 if(("actionName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Action Name").equalsIgnoreCase(dictSheet.get(0)[j])){
462 attribute.setActionName(rows[j]);
464 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
465 attribute.setDescription(rows[j]);
468 commonClassDao.save(attribute);
471 if(dictionaryName.startsWith("TermList")){
472 for(int i = 1; i< dictSheet.size(); i++){
473 TermList attribute = new TermList("", userId);
474 UserInfo userinfo = new UserInfo();
475 userinfo.setUserLoginId(userId);
476 attribute.setUserCreatedBy(userinfo);
477 attribute.setUserModifiedBy(userinfo);
478 String[] rows = dictSheet.get(i);
479 for (int j=0 ; j<rows.length; j++ ){
480 if(("termName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Term-Name").equalsIgnoreCase(dictSheet.get(0)[j])){
481 attribute.setTermName(rows[j]);
483 if(("Term-Description").equalsIgnoreCase(dictSheet.get(0)[j]) || ("termDescription").equalsIgnoreCase(dictSheet.get(0)[j])){
484 attribute.setDescription(rows[j]);
486 if(("fromZone").equalsIgnoreCase(dictSheet.get(0)[j]) || ("From Zone").equalsIgnoreCase(dictSheet.get(0)[j])){
487 attribute.setFromZones(rows[j]);
489 if(("toZone").equalsIgnoreCase(dictSheet.get(0)[j]) || ("To Zone").equalsIgnoreCase(dictSheet.get(0)[j])){
490 attribute.setToZones(rows[j]);
492 if(("srcIPList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Source-IP-List").equalsIgnoreCase(dictSheet.get(0)[j])){
493 attribute.setSrcIPList(rows[j]);
495 if(("destIPList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Destination-IP-List").equalsIgnoreCase(dictSheet.get(0)[j])){
496 attribute.setDestIPList(rows[j]);
498 if(("srcPortList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Source-Port-List").equalsIgnoreCase(dictSheet.get(0)[j])){
499 attribute.setSrcPortList(rows[j]);
501 if(("destPortList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Destination-Port-List").equalsIgnoreCase(dictSheet.get(0)[j])){
502 attribute.setDestPortList(rows[j]);
504 if(("action").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Action List").equalsIgnoreCase(dictSheet.get(0)[j])){
505 attribute.setAction(rows[j]);
508 commonClassDao.save(attribute);
511 if(dictionaryName.startsWith("SearchCriteria")){
512 for(int i = 1; i< dictSheet.size(); i++){
513 DescriptiveScope attribute = new DescriptiveScope("", userId);
514 UserInfo userinfo = new UserInfo();
515 userinfo.setUserLoginId(userId);
516 attribute.setUserCreatedBy(userinfo);
517 attribute.setUserModifiedBy(userinfo);
518 String[] rows = dictSheet.get(i);
519 for (int j=0 ; j<rows.length; j++ ){
520 if(("descriptiveScopeName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Descriptive ScopeName").equalsIgnoreCase(dictSheet.get(0)[j])){
521 attribute.setScopeName(rows[j]);
523 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
524 attribute.setDescription(rows[j]);
526 if(("search").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Search Criteria").equalsIgnoreCase(dictSheet.get(0)[j])){
527 attribute.setSearch(rows[j]);
530 commonClassDao.save(attribute);