Subversion Repositories SmartDukaan

Rev

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

Rev 2652 Rev 2662
Line 37... Line 37...
37
	        logger.error("File not found : " + Utils.EXPORT_ENTITIES_PATH + id + File.separator +"RelatedAccessories.html");
37
	        logger.error("File not found : " + Utils.EXPORT_ENTITIES_PATH + id + File.separator +"RelatedAccessories.html");
38
	    }
38
	    }
39
	    catch (IOException e) {
39
	    catch (IOException e) {
40
	        logger.error("IO exception : " + Utils.EXPORT_ENTITIES_PATH + id + File.separator +"RelatedAccessories.html");
40
	        logger.error("IO exception : " + Utils.EXPORT_ENTITIES_PATH + id + File.separator +"RelatedAccessories.html");
41
	    }
41
	    }
42
	    logger.info(itemIds);
-
 
43
	    if(!itemIds.equals("")){
42
	    if(!itemIds.equals("")){
44
	    	String[] items = itemIds.split("\\s|\\n|\\t");
43
	    	String[] items = itemIds.split("\\s|\\n|\\t");
45
	    	for(String item: items){
44
	    	for(String item: items){
46
	    		logger.info(item);
45
	    		logger.info("Getting widget snippet for item: " + item);
47
	    		try{
46
	    		try{
48
	    			long itemId = Long.parseLong(item.trim());
47
	    			long itemId = Long.parseLong(item.trim());
49
		    		try {
48
		    		try {
50
						snippets += FileUtils.read( Utils.EXPORT_ENTITIES_PATH + itemId + File.separator + "WidgetSnippet.html");
49
						snippets += FileUtils.read( Utils.EXPORT_ENTITIES_PATH + itemId + File.separator + "WidgetSnippet.html");
51
			    	}
50
			    	}
52
		            catch (FileNotFoundException e) {
51
		            catch (FileNotFoundException e) {
53
		                logger.error("File not found : " + Utils.EXPORT_ENTITIES_PATH + itemId + File.separator +"WidgetSnippet.html");
52
		                logger.warn("File not found : " + Utils.EXPORT_ENTITIES_PATH + itemId + File.separator +"WidgetSnippet.html");
54
		            }
53
		            }
55
		            catch (IOException e) {
54
		            catch (IOException e) {
56
		                logger.error("IO exception : " + Utils.EXPORT_ENTITIES_PATH + itemId + File.separator +"WidgetSnippet.html");
55
		            	logger.warn("IO exception : " + Utils.EXPORT_ENTITIES_PATH + itemId + File.separator +"WidgetSnippet.html");
57
		            }	
56
		            }	
58
	    		}catch (NumberFormatException nf){
57
	    		}catch (NumberFormatException nf){
59
	    			logger.error("Unable to convert string to long");
58
	    			logger.error("Unable to convert string to long");
60
	    		}
59
	    		}
61
	    	}
60
	    	}
62
	    }
61
	    }
63
	    logger.info(snippets);
-
 
64
	    return snippets;
62
	    return snippets;
65
    }
63
    }
66
}
64
}
67
65