Subversion Repositories SmartDukaan

Rev

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

Rev 5752 Rev 5930
Line 51... Line 51...
51
    private Map<String, String> snippets;
51
    private Map<String, String> snippets;
52
    private List<String> unComparedSlides;
52
    private List<String> unComparedSlides;
53
    private List<String> commonSlides;
53
    private List<String> commonSlides;
54
    private Map<String, String> hyphenatedNames = new HashMap<String, String>();
54
    private Map<String, String> hyphenatedNames = new HashMap<String, String>();
55
    private String redirectUrl;
55
    private String redirectUrl;
-
 
56
    private boolean comparable = false;
56
    
57
    
57
    private Map<String, String> slideNameImportanceMap;
58
    private Map<String, String> slideNameImportanceMap;
58
    
59
    
59
    private Map<String, Map<String, Double>> productSlideScores;
60
    private Map<String, Map<String, Double>> productSlideScores;
60
    
61
    
Line 69... Line 70...
69
 
70
 
70
    @Actions({
71
    @Actions({
71
        @Action("/compare-mobile-phones"),
72
        @Action("/compare-mobile-phones"),
72
        @Action("/compare-laptops"),
73
        @Action("/compare-laptops"),
73
        @Action("/compare-tablets"),
74
        @Action("/compare-tablets"),
-
 
75
        @Action("/compare-compact-cameras"),
-
 
76
        @Action("/compare-battery"),
-
 
77
        @Action("/compare-bluetooth-headset"),
-
 
78
        @Action("/compare-external-dard-disks"),
-
 
79
        @Action("/compare-pen-drive"),
-
 
80
        @Action("/compare-memory-card"),
-
 
81
        @Action("/compare-face-plate"),
-
 
82
        @Action("/compare-car-charger"),
74
        @Action("/compare")
83
        @Action("/compare-decal"),
-
 
84
        @Action("/compare-headset"),
-
 
85
        @Action("/compare-data-cable"),
-
 
86
        @Action("/compare-carrying-case"),
-
 
87
        @Action("/compare-headphones"),
-
 
88
        @Action("/compare-speaker"),
-
 
89
        @Action("/compare-charger"),
-
 
90
        @Action("/compare-sceen-guard")
-
 
91
        
75
    })
92
    })
76
    
93
    
77
    public String index() throws SecurityException, IOException {
94
    public String index() throws SecurityException, IOException {
78
        productList = new ArrayList<String>();
95
        productList = new ArrayList<String>();
79
        StringBuffer prodNames = new StringBuffer("");
96
        StringBuffer prodNames = new StringBuffer("");
Line 187... Line 204...
187
                    double score = Double.parseDouble(parts[2]);
204
                    double score = Double.parseDouble(parts[2]);
188
                    if(score > 0){
205
                    if(score > 0){
189
                        if(!slideNameImportanceMap.containsKey(slideName)){
206
                        if(!slideNameImportanceMap.containsKey(slideName)){
190
                            if(!importance.equals("None")){
207
                            if(!importance.equals("None")){
191
                                slideNameImportanceMap.put(slideName, importance);
208
                                slideNameImportanceMap.put(slideName, importance);
-
 
209
                                comparable = true;
192
                            }
210
                            }
193
                        }
211
                        }
194
                        if(!slideScores.containsKey(slideName)){
212
                        if(!slideScores.containsKey(slideName)){
195
                            slideScores.put(slideName, score);
213
                            slideScores.put(slideName, score);
196
                        }
214
                        }
Line 386... Line 404...
386
    }
404
    }
387
    
405
    
388
    public String getActionName(){
406
    public String getActionName(){
389
    	return ActionContext.getContext().getName();
407
    	return ActionContext.getContext().getName();
390
    }
408
    }
-
 
409
    
-
 
410
    public boolean isComparable() {
-
 
411
    	return this.comparable;
-
 
412
    }
391
}
413
}