Subversion Repositories SmartDukaan

Rev

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

Rev 5367 Rev 6602
Line 507... Line 507...
507
			String brand = expEntity.getBrand();
507
			String brand = expEntity.getBrand();
508
			
508
			
509
			
509
			
510
			
510
			
511
			//Create zero slide
511
			//Create zero slide
512
			Slide zeroSlide = createZeroSlide(brand, minPrice, mainCategory, subCategory);
512
			Slide zeroSlide = createZeroSlide(brand, minPrice, mainCategory, subCategory, "In Stock");
513
			ExpandedSlide expandedZeroSlide = new ExpandedSlide(zeroSlide);
513
			ExpandedSlide expandedZeroSlide = new ExpandedSlide(zeroSlide);
514
			expSlides.add(expandedZeroSlide);
514
			expSlides.add(expandedZeroSlide);
515
			
515
			
516
			for(ExpandedSlide expSlide: expSlides){
516
			for(ExpandedSlide expSlide: expSlides){
517
				System.out.println(expSlide.getSlideDefinitionID());
517
				System.out.println(expSlide.getSlideDefinitionID());
Line 557... Line 557...
557
		
557
		
558
		
558
		
559
		
559
		
560
	}
560
	}
561
		
561
		
562
	private Slide createZeroSlide(String brand, double price, String mainCategory, String subCategory) {
562
	private Slide createZeroSlide(String brand, double price, String mainCategory, String subCategory, String availability) {
563
		Slide zeroSlide = new Slide(Utils.ZERO_SLIDE_DEFINITION_ID);
563
		Slide zeroSlide = new Slide(Utils.ZERO_SLIDE_DEFINITION_ID);
564
		List<Feature> zeroSlideFeatures = new ArrayList<Feature>();
564
		List<Feature> zeroSlideFeatures = new ArrayList<Feature>();
565
		
565
		
566
		Feature brandFeature = new Feature(Utils.BRAND_FEATURE_DEFINITION_ID);
566
		Feature brandFeature = new Feature(Utils.BRAND_FEATURE_DEFINITION_ID);
567
		Bullet brandBullet = new Bullet(new PrimitiveDataObject(brand));
567
		Bullet brandBullet = new Bullet(new PrimitiveDataObject(brand));
568
		List<Bullet> brandBullets = new ArrayList<Bullet>();
568
		List<Bullet> brandBullets = new ArrayList<Bullet>();
569
		brandBullets.add(brandBullet);
569
		brandBullets.add(brandBullet);
570
		brandFeature.setBullets(brandBullets);
570
		brandFeature.setBullets(brandBullets);
571
		zeroSlideFeatures.add(brandFeature);
571
		zeroSlideFeatures.add(brandFeature);
572
		
572
		
-
 
573
		
-
 
574
		Feature availabilityFeature = new Feature(Utils.AVAILABILITY_FEATURE_DEFINITION_ID);
-
 
575
		Bullet availabilityBullet = new Bullet(new PrimitiveDataObject(availability));
-
 
576
		List<Bullet> availabilityBullets = new ArrayList<Bullet>();
-
 
577
		brandBullets.add(availabilityBullet);
-
 
578
		brandFeature.setBullets(availabilityBullets);
-
 
579
		zeroSlideFeatures.add(availabilityFeature);
-
 
580
		
573
		Feature priceFeature = new Feature(120128);
581
		Feature priceFeature = new Feature(120128);
574
		Bullet priceBullet = new Bullet(new PrimitiveDataObject((new Double(price)).toString()));
582
		Bullet priceBullet = new Bullet(new PrimitiveDataObject((new Double(price)).toString()));
575
		List<Bullet> priceBullets = new ArrayList<Bullet>();
583
		List<Bullet> priceBullets = new ArrayList<Bullet>();
576
		priceBullets.add(priceBullet);
584
		priceBullets.add(priceBullet);
577
		priceFeature.setBullets(priceBullets);
585
		priceFeature.setBullets(priceBullets);