Subversion Repositories SmartDukaan

Rev

Rev 5074 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5074 Rev 5075
Line 51... Line 51...
51
    	String value = (String)this.reqparams.get("value")[0];
51
    	String value = (String)this.reqparams.get("value")[0];
52
    	String type = (String)this.reqparams.get("type")[0];
52
    	String type = (String)this.reqparams.get("type")[0];
53
    	this.setStatus(true);
53
    	this.setStatus(true);
54
    	try{
54
    	try{
55
    		Map<String, Map<String, String>> synMap = CreationUtils.getSynonyms();
55
    		Map<String, Map<String, String>> synMap = CreationUtils.getSynonyms();
-
 
56
    		if(synMap==null){
-
 
57
    			synMap = new HashMap<String, Map<String,String>>();
-
 
58
    		}
56
    		Map<String,String> typeMap = synMap.get(type);
59
    		Map<String,String> typeMap = synMap.get(type);
-
 
60
    		if(typeMap==null){
-
 
61
    			typeMap = new HashMap<String,String>();
-
 
62
    		}
57
    		typeMap.put(key,value);
63
    		typeMap.put(key,value);
58
    		CreationUtils.storeSynonyms(synMap);
64
    		CreationUtils.storeSynonyms(synMap);
59
    	} catch(Exception e){
65
    	} catch(Exception e){
60
    		e.printStackTrace();
66
    		e.printStackTrace();
61
    		this.setStatus(false);
67
    		this.setStatus(false);