Subversion Repositories SmartDukaan

Rev

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

Rev 2511 Rev 2944
Line 31... Line 31...
31
@Result(name = "show", location = "compare-show.vm")
31
@Result(name = "show", location = "compare-show.vm")
32
public class CompareController extends BaseController {
32
public class CompareController extends BaseController {
33
 
33
 
34
    private static final long serialVersionUID = 1L;
34
    private static final long serialVersionUID = 1L;
35
 
35
 
36
    private static Logger log = Logger.getLogger(Class.class);
36
    private static Logger logger = Logger.getLogger(Class.class);
37
    
37
    
38
    List<String> slides = new ArrayList<String>();
38
    List<String> slides = new ArrayList<String>();
39
    
39
    
40
    private List<String> productList;
40
    private List<String> productList;
41
    private List<String> productNames;
41
    private List<String> productNames;
Line 124... Line 124...
124
                        slides.add(slideName);
124
                        slides.add(slideName);
125
                    }
125
                    }
126
                    
126
                    
127
                }
127
                }
128
            } catch (IOException e) {
128
            } catch (IOException e) {
129
                e.printStackTrace();
129
                logger.error("Error while reading snippet", e);
130
            }
130
            }
131
        }
131
        }
132
        log.info(productNames);
132
        logger.info(productNames);
133
        
133
        
134
        unComparedSlides = new ArrayList<String>();
134
        unComparedSlides = new ArrayList<String>();
135
        for(String slideName: slides){
135
        for(String slideName: slides){
136
            if(!slideNameImportanceMap.containsKey(slideName)){
136
            if(!slideNameImportanceMap.containsKey(slideName)){
137
                unComparedSlides.add(slideName);
137
                unComparedSlides.add(slideName);
Line 191... Line 191...
191
            snippets = new LinkedHashMap<String, String>();
191
            snippets = new LinkedHashMap<String, String>();
192
            for (String productId : productList) {
192
            for (String productId : productList) {
193
                try {
193
                try {
194
                    snippets.put(productId, FileUtils.read(Utils.EXPORT_ENTITIES_PATH + productId + File.separator + "ComparisonSnippet.html"));
194
                    snippets.put(productId, FileUtils.read(Utils.EXPORT_ENTITIES_PATH + productId + File.separator + "ComparisonSnippet.html"));
195
                } catch (IOException e) {
195
                } catch (IOException e) {
196
                    log.error(e);
196
                    logger.error(e);
197
                }
197
                }
198
            }
198
            }
199
        }
199
        }
200
        this.commonSlides = new ArrayList<String>();
200
        this.commonSlides = new ArrayList<String>();
201
        
201
        
Line 207... Line 207...
207
            snippets = new LinkedHashMap<String, String>();
207
            snippets = new LinkedHashMap<String, String>();
208
            for (String productId : productList) {
208
            for (String productId : productList) {
209
                try {
209
                try {
210
                    snippets.put(productId, FileUtils.read(Utils.EXPORT_ENTITIES_PATH + productId + File.separator + "CompareProductSummarySnippet.html"));
210
                    snippets.put(productId, FileUtils.read(Utils.EXPORT_ENTITIES_PATH + productId + File.separator + "CompareProductSummarySnippet.html"));
211
                } catch (IOException e) {
211
                } catch (IOException e) {
212
                    log.error(e);
212
                    logger.error(e);
213
                }
213
                }
214
            }
214
            }
215
        }
215
        }
216
        return snippets;
216
        return snippets;
217
    }
217
    }
Line 220... Line 220...
220
            snippets = new LinkedHashMap<String, String>();
220
            snippets = new LinkedHashMap<String, String>();
221
            for (String productId : productList) {
221
            for (String productId : productList) {
222
                try {
222
                try {
223
                    snippets.put(productId, FileUtils.read(Utils.EXPORT_ENTITIES_PATH + productId + File.separator + "CompareProductSnippet.html"));
223
                    snippets.put(productId, FileUtils.read(Utils.EXPORT_ENTITIES_PATH + productId + File.separator + "CompareProductSnippet.html"));
224
                } catch (IOException e) {
224
                } catch (IOException e) {
225
                    log.error(e);
225
                    logger.error(e);
226
                }
226
                }
227
            }
227
            }
228
 
228
 
229
        }
229
        }
230
        return snippets;
230
        return snippets;