Subversion Repositories SmartDukaan

Rev

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

Rev 2542 Rev 2547
Line 18... Line 18...
18
 *
18
 *
19
 */
19
 */
20
public class ProductListGenerator {
20
public class ProductListGenerator {
21
	
21
	
22
	private String[] xmlIndentation = {"", "    ", "        ", "            ","                "};
22
	private String[] xmlIndentation = {"", "    ", "        ", "            ","                "};
23
	public static long MOBILE_PHONES = 10001;
-
 
24
	public Map<Long, List<Item>> entityIdItemMap;
23
	public Map<Long, List<Item>> entityIdItemMap;
25
	CategoryManager catm = CategoryManager.getCategoryManager();
24
	CategoryManager catm = CategoryManager.getCategoryManager();
26
	
25
	
27
	public ProductListGenerator(Map<Long, List<Item>> entityIdItemMap) throws Exception {
26
	public ProductListGenerator(Map<Long, List<Item>> entityIdItemMap) throws Exception {
28
		this.entityIdItemMap = entityIdItemMap;
27
		this.entityIdItemMap = entityIdItemMap;
Line 68... Line 67...
68
	 * @param item
67
	 * @param item
69
	 * @return
68
	 * @return
70
	 */
69
	 */
71
	private boolean isMobile(Item item){
70
	private boolean isMobile(Item item){
72
		long parentCategoryId = CategoryManager.getCategoryManager().getCategory(item.getCategory()).getParent_category_id();
71
		long parentCategoryId = CategoryManager.getCategoryManager().getCategory(item.getCategory()).getParent_category_id();
73
		if(parentCategoryId != MOBILE_PHONES){
72
		if(parentCategoryId == Utils.MOBILE_ACCESSORIES_CATEGORY){
74
			return false;
73
			return false;
75
		}
74
		}
76
		return true;
75
		return true;
77
	}
76
	}
78
	
77