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.io.UnsupportedEncodingException;
32 import java.util.List;
34 import javax.servlet.http.HttpServletRequest;
35 import javax.servlet.http.HttpServletResponse;
37 import org.apache.commons.compress.utils.IOUtils;
38 import org.onap.policy.rest.dao.CommonClassDao;
39 import org.onap.policy.rest.jpa.ActionList;
40 import org.onap.policy.rest.jpa.ActionPolicyDict;
41 import org.onap.policy.rest.jpa.AddressGroup;
42 import org.onap.policy.rest.jpa.Attribute;
43 import org.onap.policy.rest.jpa.BRMSParamTemplate;
44 import org.onap.policy.rest.jpa.Category;
45 import org.onap.policy.rest.jpa.Datatype;
46 import org.onap.policy.rest.jpa.DecisionSettings;
47 import org.onap.policy.rest.jpa.DescriptiveScope;
48 import org.onap.policy.rest.jpa.OnapName;
49 import org.onap.policy.rest.jpa.GroupServiceList;
50 import org.onap.policy.rest.jpa.PEPOptions;
51 import org.onap.policy.rest.jpa.PrefixList;
52 import org.onap.policy.rest.jpa.ProtocolList;
53 import org.onap.policy.rest.jpa.SecurityZone;
54 import org.onap.policy.rest.jpa.ServiceList;
55 import org.onap.policy.rest.jpa.TermList;
56 import org.onap.policy.rest.jpa.UserInfo;
57 import org.onap.policy.rest.jpa.VNFType;
58 import org.onap.policy.rest.jpa.VSCLAction;
59 import org.onap.policy.rest.jpa.VarbindDictionary;
60 import org.onap.policy.rest.jpa.Zone;
61 import org.springframework.beans.factory.annotation.Autowired;
62 import org.springframework.stereotype.Controller;
63 import org.springframework.web.bind.annotation.RequestMapping;
65 import com.fasterxml.jackson.databind.DeserializationFeature;
66 import com.fasterxml.jackson.databind.ObjectMapper;
68 import au.com.bytecode.opencsv.CSVReader;
72 public class DictionaryImportController {
73 private String newFile;
75 private static CommonClassDao commonClassDao;
78 public DictionaryImportController(CommonClassDao commonClassDao){
79 DictionaryImportController.commonClassDao = commonClassDao;
82 public DictionaryImportController(){}
85 @RequestMapping(value={"/dictionary/import_dictionary"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
86 public void ImportDictionaryData(HttpServletRequest request) throws IOException{
87 ObjectMapper mapper = new ObjectMapper();
88 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
89 String userId = request.getParameter("userId");
90 String dictionaryName = request.getParameter("dictionaryName");
92 File file = new File(dictionaryName);
93 OutputStream outputStream = new FileOutputStream(file);
94 IOUtils.copy(request.getInputStream(), outputStream);
96 this.newFile = file.toString();
97 CSVReader csvReader = new CSVReader(new FileReader(this.newFile));
98 List<String[]> dictSheet = csvReader.readAll();
99 if(dictionaryName.startsWith("Attribute")){
100 for(int i = 1; i< dictSheet.size(); i++){
101 Attribute attribute = new Attribute("");
102 UserInfo userinfo = new UserInfo();
103 userinfo.setUserLoginId(userId);
104 attribute.setUserCreatedBy(userinfo);
105 attribute.setUserModifiedBy(userinfo);
106 String[] rows = dictSheet.get(i);
107 for (int j=0 ; j<rows.length; j++ ){
108 if(("xacml_id").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Attribute ID").equalsIgnoreCase(dictSheet.get(0)[j])){
109 attribute.setXacmlId(rows[j]);
111 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
112 attribute.setDescription(rows[j]);
114 if(("priority").equalsIgnoreCase(dictSheet.get(0)[j])){
115 attribute.setPriority(rows[j]);
117 if(("datatype").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Data Type").equalsIgnoreCase(dictSheet.get(0)[j])){
118 Datatype dataType = new Datatype();
119 if(("string").equalsIgnoreCase(rows[j])){
121 }else if(("integer").equalsIgnoreCase(rows[j])){
123 }else if(("double").equalsIgnoreCase(rows[j])){
125 }else if(("boolean").equalsIgnoreCase(rows[j])){
127 }else if(("user").equalsIgnoreCase(rows[j])){
130 attribute.setDatatypeBean(dataType);
131 Category category = new Category();
133 attribute.setCategoryBean(category);
135 if(("attribute_value").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Attribute Value").equalsIgnoreCase(dictSheet.get(0)[j])){
136 attribute.setAttributeValue(rows[j]);
139 commonClassDao.save(attribute);
142 if(dictionaryName.startsWith("ActionPolicyDictionary")){
143 for(int i = 1; i< dictSheet.size(); i++){
144 ActionPolicyDict attribute = new ActionPolicyDict("", userId);
145 UserInfo userinfo = new UserInfo();
146 userinfo.setUserLoginId(userId);
147 attribute.setUserCreatedBy(userinfo);
148 attribute.setUserModifiedBy(userinfo);
149 String[] rows = dictSheet.get(i);
150 for (int j=0 ; j<rows.length; j++ ){
151 if(("attribute_name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Attribute Name").equalsIgnoreCase(dictSheet.get(0)[j])){
152 attribute.setAttributeName(rows[j]);
154 if(("body").equalsIgnoreCase(dictSheet.get(0)[j])){
155 attribute.setBody(rows[j]);
157 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
158 attribute.setDescription(rows[j]);
160 if(("headers").equalsIgnoreCase(dictSheet.get(0)[j])){
161 attribute.setHeader(rows[j]);
163 if(("method").equalsIgnoreCase(dictSheet.get(0)[j])){
164 attribute.setMethod(rows[j]);
166 if(("type").equalsIgnoreCase(dictSheet.get(0)[j])){
167 attribute.setMethod(rows[j]);
169 if(("url").equalsIgnoreCase(dictSheet.get(0)[j])){
170 attribute.setMethod(rows[j]);
173 commonClassDao.save(attribute);
176 if(dictionaryName.startsWith("OnapName")){
177 for(int i = 1; i< dictSheet.size(); i++){
178 OnapName attribute = new OnapName("", userId);
179 UserInfo userinfo = new UserInfo();
180 userinfo.setUserLoginId(userId);
181 attribute.setUserCreatedBy(userinfo);
182 attribute.setUserModifiedBy(userinfo);
183 String[] rows = dictSheet.get(i);
184 for (int j=0 ; j<rows.length; j++ ){
185 if(("onap_name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Onap Name").equalsIgnoreCase(dictSheet.get(0)[j])){
186 attribute.setOnapName(rows[j]);
188 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
189 attribute.setDescription(rows[j]);
192 commonClassDao.save(attribute);
195 if(dictionaryName.startsWith("VNFType")){
196 for(int i = 1; i< dictSheet.size(); i++){
197 VNFType attribute = new VNFType("", userId);
198 UserInfo userinfo = new UserInfo();
199 userinfo.setUserLoginId(userId);
200 attribute.setUserCreatedBy(userinfo);
201 attribute.setUserModifiedBy(userinfo);
202 String[] rows = dictSheet.get(i);
203 for (int j=0 ; j<rows.length; j++ ){
204 if(("vnf_type").equalsIgnoreCase(dictSheet.get(0)[j]) || ("VNF Type").equalsIgnoreCase(dictSheet.get(0)[j])){
205 attribute.setVnftype(rows[j]);
207 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
208 attribute.setDescription(rows[j]);
211 commonClassDao.save(attribute);
214 if(dictionaryName.startsWith("VSCLAction")){
215 for(int i = 1; i< dictSheet.size(); i++){
216 VSCLAction attribute = new VSCLAction("", userId);
217 UserInfo userinfo = new UserInfo();
218 userinfo.setUserLoginId(userId);
219 attribute.setUserCreatedBy(userinfo);
220 attribute.setUserModifiedBy(userinfo);
221 String[] rows = dictSheet.get(i);
222 for (int j=0 ; j<rows.length; j++ ){
223 if(("vscl_action").equalsIgnoreCase(dictSheet.get(0)[j]) || ("VSCL Action").equalsIgnoreCase(dictSheet.get(0)[j])){
224 attribute.setVsclaction(rows[j]);
226 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
227 attribute.setDescription(rows[j]);
230 commonClassDao.save(attribute);
233 if(dictionaryName.startsWith("PEPOptions")){
234 for(int i = 1; i< dictSheet.size(); i++){
235 PEPOptions attribute = new PEPOptions("", userId);
236 UserInfo userinfo = new UserInfo();
237 userinfo.setUserLoginId(userId);
238 attribute.setUserCreatedBy(userinfo);
239 attribute.setUserModifiedBy(userinfo);
240 String[] rows = dictSheet.get(i);
241 for (int j=0 ; j<rows.length; j++ ){
242 if(("PEP_NAME").equalsIgnoreCase(dictSheet.get(0)[j]) || ("PEP Name").equalsIgnoreCase(dictSheet.get(0)[j])){
243 attribute.setPepName(rows[j]);
245 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
246 attribute.setDescription(rows[j]);
248 if(("Actions").equalsIgnoreCase(dictSheet.get(0)[j])){
249 attribute.setActions(rows[j]);
252 commonClassDao.save(attribute);
255 if(dictionaryName.startsWith("VarbindDictionary")){
256 for(int i = 1; i< dictSheet.size(); i++){
257 VarbindDictionary attribute = new VarbindDictionary("", userId);
258 UserInfo userinfo = new UserInfo();
259 userinfo.setUserLoginId(userId);
260 attribute.setUserCreatedBy(userinfo);
261 attribute.setUserModifiedBy(userinfo);
262 String[] rows = dictSheet.get(i);
263 for (int j=0 ; j<rows.length; j++ ){
264 if(("varbind_Name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Varbind Name").equalsIgnoreCase(dictSheet.get(0)[j])){
265 attribute.setVarbindName(rows[j]);
267 if(("varbind_Description").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Varbind Description").equalsIgnoreCase(dictSheet.get(0)[j])){
268 attribute.setVarbindDescription(rows[j]);
270 if(("varbind_oid").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Varbind OID").equalsIgnoreCase(dictSheet.get(0)[j])){
271 attribute.setVarbindOID(rows[j]);
274 commonClassDao.save(attribute);
277 if(dictionaryName.startsWith("BRMSParamDictionary")){
278 for(int i = 1; i< dictSheet.size(); i++){
279 BRMSParamTemplate attribute = new BRMSParamTemplate();
280 UserInfo userinfo = new UserInfo();
281 userinfo.setUserLoginId(userId);
282 attribute.setUserCreatedBy(userinfo);
283 String[] rows = dictSheet.get(i);
284 for (int j=0 ; j<rows.length; j++ ){
285 if(("param_template_name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Rule Name").equalsIgnoreCase(dictSheet.get(0)[j])){
286 attribute.setRuleName(rows[j]);
288 if(("DESCRIPTION").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Description").equalsIgnoreCase(dictSheet.get(0)[j])){
289 attribute.setDescription(rows[j]);
291 if(("rule").equalsIgnoreCase(dictSheet.get(0)[j])){
292 attribute.setRule(rows[j]);
295 commonClassDao.save(attribute);
298 if(dictionaryName.startsWith("Settings")){
299 for(int i = 1; i< dictSheet.size(); i++){
300 DecisionSettings attribute = new DecisionSettings("", userId);
301 UserInfo userinfo = new UserInfo();
302 userinfo.setUserLoginId(userId);
303 attribute.setUserCreatedBy(userinfo);
304 attribute.setUserModifiedBy(userinfo);
305 String[] rows = dictSheet.get(i);
306 for (int j=0 ; j<rows.length; j++ ){
307 if(("xacml_id").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Settings ID").equalsIgnoreCase(dictSheet.get(0)[j])){
308 attribute.setXacmlId(rows[j]);
310 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
311 attribute.setDescription(rows[j]);
313 if(("priority").equalsIgnoreCase(dictSheet.get(0)[j])){
314 attribute.setPriority(rows[j]);
316 if(("datatype").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Data Type").equalsIgnoreCase(dictSheet.get(0)[j])){
317 Datatype dataType = new Datatype();
318 if(("string").equalsIgnoreCase(rows[j])){
320 }else if(("integer").equalsIgnoreCase(rows[j])){
322 }else if(("double").equalsIgnoreCase(rows[j])){
324 }else if(("boolean").equalsIgnoreCase(rows[j])){
326 }else if(("user").equalsIgnoreCase(rows[j])){
329 attribute.setDatatypeBean(dataType);
332 commonClassDao.save(attribute);
335 if(dictionaryName.startsWith("PrefixList")){
336 for(int i = 1; i< dictSheet.size(); i++){
337 PrefixList attribute = new PrefixList("", userId);
338 String[] rows = dictSheet.get(i);
339 for (int j=0 ; j<rows.length; j++ ){
340 if(("prefixListName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("PrefixList Name").equalsIgnoreCase(dictSheet.get(0)[j])){
341 attribute.setPrefixListName(rows[j]);
343 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
344 attribute.setPrefixListValue(rows[j]);
346 if(("prefixListValue").equalsIgnoreCase(dictSheet.get(0)[j]) || ("PrefixList Value").equalsIgnoreCase(dictSheet.get(0)[j])){
347 attribute.setDescription(rows[j]);
350 commonClassDao.save(attribute);
353 if(dictionaryName.startsWith("SecurityZone")){
354 for(int i = 1; i< dictSheet.size(); i++){
355 SecurityZone attribute = new SecurityZone("", userId);
356 String[] rows = dictSheet.get(i);
357 for (int j=0 ; j<rows.length; j++ ){
358 if(("zoneName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Zone Name").equalsIgnoreCase(dictSheet.get(0)[j])){
359 attribute.setZoneName(rows[j]);
361 if(("zoneValue").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Zone Value").equalsIgnoreCase(dictSheet.get(0)[j])){
362 attribute.setZoneValue(rows[j]);
365 commonClassDao.save(attribute);
368 if(dictionaryName.startsWith("Zone")){
369 for(int i = 1; i< dictSheet.size(); i++){
370 Zone attribute = new Zone("", userId);
371 String[] rows = dictSheet.get(i);
372 for (int j=0 ; j<rows.length; j++ ){
373 if(("zoneName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Zone Name").equalsIgnoreCase(dictSheet.get(0)[j])){
374 attribute.setZoneName(rows[j]);
376 if(("zoneValue").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Zone Value").equalsIgnoreCase(dictSheet.get(0)[j])){
377 attribute.setZoneValue(rows[j]);
380 commonClassDao.save(attribute);
383 if(dictionaryName.startsWith("ServiceList")){
384 for(int i = 1; i< dictSheet.size(); i++){
385 ServiceList attribute = new ServiceList("", userId);
386 String[] rows = dictSheet.get(i);
387 for (int j=0 ; j<rows.length; j++ ){
388 if(("serviceName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Service Name").equalsIgnoreCase(dictSheet.get(0)[j])){
389 attribute.setServiceName(rows[j]);
391 if(("serviceDesc").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Description").equalsIgnoreCase(dictSheet.get(0)[j])){
392 attribute.setServiceDescription(rows[j]);
394 if(("serviceType").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Service Type").equalsIgnoreCase(dictSheet.get(0)[j])){
395 attribute.setServiceType(rows[j]);
397 if(("serviceTrasProtocol").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Transport Protocol").equalsIgnoreCase(dictSheet.get(0)[j])){
398 attribute.setServiceTransProtocol(rows[j]);
400 if(("serviceAppProtocol").equalsIgnoreCase(dictSheet.get(0)[j]) || ("APP Protocol").equalsIgnoreCase(dictSheet.get(0)[j])){
401 attribute.setServiceAppProtocol(rows[j]);
403 if(("servicePorts").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Ports").equalsIgnoreCase(dictSheet.get(0)[j])){
404 attribute.setServicePorts(rows[j]);
407 commonClassDao.save(attribute);
410 if(dictionaryName.startsWith("ServiceGroup")){
411 for(int i = 1; i< dictSheet.size(); i++){
412 GroupServiceList attribute = new GroupServiceList("", userId);
413 String[] rows = dictSheet.get(i);
414 for (int j=0 ; j<rows.length; j++ ){
415 if(("name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Group Name").equalsIgnoreCase(dictSheet.get(0)[j])){
416 attribute.setGroupName(rows[j]);
418 if(("serviceList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Service List").equalsIgnoreCase(dictSheet.get(0)[j])){
419 attribute.setServiceList(rows[j]);
422 commonClassDao.save(attribute);
425 if(dictionaryName.startsWith("AddressGroup")){
426 for(int i = 1; i< dictSheet.size(); i++){
427 AddressGroup attribute = new AddressGroup("", userId);
428 String[] rows = dictSheet.get(i);
429 for (int j=0 ; j<rows.length; j++ ){
430 if(("name").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Group Name").equalsIgnoreCase(dictSheet.get(0)[j])){
431 attribute.setGroupName(rows[j]);
433 if(("serviceList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Prefix List").equalsIgnoreCase(dictSheet.get(0)[j])){
434 attribute.setServiceList(rows[j]);
436 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
437 attribute.setDescription(rows[j]);
440 commonClassDao.save(attribute);
443 if(dictionaryName.startsWith("ProtocolList")){
444 for(int i = 1; i< dictSheet.size(); i++){
445 ProtocolList attribute = new ProtocolList("", userId);
446 String[] rows = dictSheet.get(i);
447 for (int j=0 ; j<rows.length; j++ ){
448 if(("protocolName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Protocol Name").equalsIgnoreCase(dictSheet.get(0)[j])){
449 attribute.setProtocolName(rows[j]);
451 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
452 attribute.setDescription(rows[j]);
455 commonClassDao.save(attribute);
458 if(dictionaryName.startsWith("ActionList")){
459 for(int i = 1; i< dictSheet.size(); i++){
460 ActionList attribute = new ActionList("", userId);
461 String[] rows = dictSheet.get(i);
462 for (int j=0 ; j<rows.length; j++ ){
463 if(("actionName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Action Name").equalsIgnoreCase(dictSheet.get(0)[j])){
464 attribute.setActionName(rows[j]);
466 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
467 attribute.setDescription(rows[j]);
470 commonClassDao.save(attribute);
473 if(dictionaryName.startsWith("TermList")){
474 for(int i = 1; i< dictSheet.size(); i++){
475 TermList attribute = new TermList("", userId);
476 UserInfo userinfo = new UserInfo();
477 userinfo.setUserLoginId(userId);
478 attribute.setUserCreatedBy(userinfo);
479 attribute.setUserModifiedBy(userinfo);
480 String[] rows = dictSheet.get(i);
481 for (int j=0 ; j<rows.length; j++ ){
482 if(("termName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Term-Name").equalsIgnoreCase(dictSheet.get(0)[j])){
483 attribute.setTermName(rows[j]);
485 if(("Term-Description").equalsIgnoreCase(dictSheet.get(0)[j]) || ("termDescription").equalsIgnoreCase(dictSheet.get(0)[j])){
486 attribute.setDescription(rows[j]);
488 if(("fromZone").equalsIgnoreCase(dictSheet.get(0)[j]) || ("From Zone").equalsIgnoreCase(dictSheet.get(0)[j])){
489 attribute.setFromZones(rows[j]);
491 if(("toZone").equalsIgnoreCase(dictSheet.get(0)[j]) || ("To Zone").equalsIgnoreCase(dictSheet.get(0)[j])){
492 attribute.setToZones(rows[j]);
494 if(("srcIPList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Source-IP-List").equalsIgnoreCase(dictSheet.get(0)[j])){
495 attribute.setSrcIPList(rows[j]);
497 if(("destIPList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Destination-IP-List").equalsIgnoreCase(dictSheet.get(0)[j])){
498 attribute.setDestIPList(rows[j]);
500 if(("srcPortList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Source-Port-List").equalsIgnoreCase(dictSheet.get(0)[j])){
501 attribute.setSrcPortList(rows[j]);
503 if(("destPortList").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Destination-Port-List").equalsIgnoreCase(dictSheet.get(0)[j])){
504 attribute.setDestPortList(rows[j]);
506 if(("action").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Action List").equalsIgnoreCase(dictSheet.get(0)[j])){
507 attribute.setAction(rows[j]);
510 commonClassDao.save(attribute);
513 if(dictionaryName.startsWith("SearchCriteria")){
514 for(int i = 1; i< dictSheet.size(); i++){
515 DescriptiveScope attribute = new DescriptiveScope("", userId);
516 UserInfo userinfo = new UserInfo();
517 userinfo.setUserLoginId(userId);
518 attribute.setUserCreatedBy(userinfo);
519 attribute.setUserModifiedBy(userinfo);
520 String[] rows = dictSheet.get(i);
521 for (int j=0 ; j<rows.length; j++ ){
522 if(("descriptiveScopeName").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Descriptive ScopeName").equalsIgnoreCase(dictSheet.get(0)[j])){
523 attribute.setScopeName(rows[j]);
525 if(("description").equalsIgnoreCase(dictSheet.get(0)[j])){
526 attribute.setDescription(rows[j]);
528 if(("search").equalsIgnoreCase(dictSheet.get(0)[j]) || ("Search Criteria").equalsIgnoreCase(dictSheet.get(0)[j])){
529 attribute.setSearch(rows[j]);
532 commonClassDao.save(attribute);