org.broadleafcommerce.core.catalog.domain
Class ProductBundleImpl

java.lang.Object
  extended by org.broadleafcommerce.core.catalog.domain.ProductImpl
      extended by org.broadleafcommerce.core.catalog.domain.ProductBundleImpl
All Implemented Interfaces:
Serializable, Status, Product, ProductBundle

@Entity
public class ProductBundleImpl
extends ProductImpl
implements ProductBundle

See Also:
Serialized Form

Field Summary
protected  Boolean autoBundle
           
protected  Boolean bundlePromotable
           
protected  Boolean itemsPromotable
           
protected  String pricingModel
           
protected  int priority
           
protected  List<SkuBundleItem> skuBundleItems
           
 
Fields inherited from class org.broadleafcommerce.core.catalog.domain.ProductImpl
additionalSkus, allParentCategories, archiveStatus, canSellWithoutOptions, crossSaleProducts, defaultCategory, defaultSku, displayTemplate, id, isFeaturedProduct, manufacturer, model, productAttributes, productOptions, promoMessage, skus, upSaleProducts, url, urlKey
 
Constructor Summary
ProductBundleImpl()
           
 
Method Summary
 Boolean getAutoBundle()
          Gets whether or not this should be bundled together if the individual Products are added to the cart.
 Money getBundleItemsRetailPrice()
           
 Money getBundleItemsSalePrice()
           
 Boolean getBundlePromotable()
          Gets whether or not the bundle itself should be promotable.
 Boolean getItemsPromotable()
          Gets whether or not the items in this bundle should be considered for promotions using the promotion engine

Note: this is only applicable when the pricing model is the sum of the bundle items NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF
 BigDecimal getPotentialSavings()
          Calculates the potential savings by summing up the retail prices of the contained items and comparing to the actual bundle prices.
 ProductBundlePricingModelType getPricingModel()
           
 Integer getPriority()
          Used to determine the order for automatic bundling.
 Money getRetailPrice()
           
 Money getSalePrice()
           
 List<SkuBundleItem> getSkuBundleItems()
           
 boolean isOnSale()
           
 void setAutoBundle(Boolean autoBundle)
          Sets whether or not this should be bundled together if the individual Products are added to the cart.
 void setBundlePromotable(Boolean bundlePromotable)
          Gets whether or not the bundle itself should be promotable.
 void setItemsPromotable(Boolean itemsPromotable)
          Sets whether or not the items in this bundle should be considered for promotions using the promotion engine NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF
 void setPricingModel(ProductBundlePricingModelType pricingModel)
           
 void setPriority(Integer priority)
           
 void setSkuBundleItems(List<SkuBundleItem> skuBundleItems)
           
 
Methods inherited from class org.broadleafcommerce.core.catalog.domain.ProductImpl
equals, getActiveEndDate, getActiveStartDate, getAdditionalSkus, getAllParentCategories, getAllSkuMedia, getAllSkus, getArchived, getCanSellWithoutOptions, getContainer, getCrossSaleProducts, getCumulativeCrossSaleProducts, getCumulativeUpSaleProducts, getDefaultCategory, getDefaultSku, getDepth, getDescription, getDimension, getDimensionString, getDisplayTemplate, getGeneratedUrl, getGirth, getHeight, getId, getLongDescription, getManufacturer, getMappedProductAttributes, getMedia, getModel, getName, getProductAttributeByName, getProductAttributes, getProductOptions, getPromoMessage, getSize, getSkus, getUpSaleProducts, getUrl, getUrlKey, getWeight, getWidth, hashCode, isActive, isFeaturedProduct, setActiveEndDate, setActiveStartDate, setAdditionalSkus, setAllParentCategories, setArchived, setCanSellWithoutOptions, setContainer, setCrossSaleProducts, setDefaultCategory, setDefaultSku, setDepth, setDescription, setDimension, setDisplayTemplate, setFeaturedProduct, setGirth, setHeight, setId, setLongDescription, setManufacturer, setMedia, setModel, setName, setProductAttributes, setProductOptions, setPromoMessage, setSize, setUpSaleProducts, setUrl, setUrlKey, setWeight, setWidth
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.broadleafcommerce.core.catalog.domain.Product
getActiveEndDate, getActiveStartDate, getAdditionalSkus, getAllParentCategories, getAllSkuMedia, getAllSkus, getCanSellWithoutOptions, getContainer, getCrossSaleProducts, getCumulativeCrossSaleProducts, getCumulativeUpSaleProducts, getDefaultCategory, getDefaultSku, getDepth, getDescription, getDimension, getDimensionString, getDisplayTemplate, getGeneratedUrl, getGirth, getHeight, getId, getLongDescription, getManufacturer, getMappedProductAttributes, getMedia, getModel, getName, getProductAttributeByName, getProductAttributes, getProductOptions, getPromoMessage, getSize, getSkus, getUpSaleProducts, getUrl, getUrlKey, getWeight, getWidth, isActive, isFeaturedProduct, setActiveEndDate, setActiveStartDate, setAdditionalSkus, setAllParentCategories, setCanSellWithoutOptions, setContainer, setCrossSaleProducts, setDefaultCategory, setDefaultSku, setDepth, setDescription, setDimension, setDisplayTemplate, setFeaturedProduct, setGirth, setHeight, setId, setLongDescription, setManufacturer, setMedia, setModel, setName, setProductAttributes, setProductOptions, setPromoMessage, setSize, setUpSaleProducts, setUrl, setUrlKey, setWeight, setWidth
 

Field Detail

pricingModel

protected String pricingModel

autoBundle

protected Boolean autoBundle

itemsPromotable

protected Boolean itemsPromotable

bundlePromotable

protected Boolean bundlePromotable

priority

protected int priority

skuBundleItems

protected List<SkuBundleItem> skuBundleItems
Constructor Detail

ProductBundleImpl

public ProductBundleImpl()
Method Detail

isOnSale

public boolean isOnSale()
Specified by:
isOnSale in interface ProductBundle
Returns:
whether or not the product bundle is on sale

getPricingModel

public ProductBundlePricingModelType getPricingModel()
Specified by:
getPricingModel in interface ProductBundle
Returns:
The pricing model for this bundle ITEM_SUM indicates that the bundle is priced by the sum of the contained items. BUNDLE indicates that the bundle is priced by the price on the bundle itself.

setPricingModel

public void setPricingModel(ProductBundlePricingModelType pricingModel)
Specified by:
setPricingModel in interface ProductBundle
Parameters:
pricingModel - ITEM_SUM if the retailPrice and salePrice of this bundle should be the composition of its items, BUNDLE if this retailPrice and salePrice should come from the default Sku

getRetailPrice

public Money getRetailPrice()

getSalePrice

public Money getSalePrice()

getBundleItemsRetailPrice

public Money getBundleItemsRetailPrice()
Specified by:
getBundleItemsRetailPrice in interface ProductBundle
Returns:
the sum of the retail prices of the bundle items

getBundleItemsSalePrice

public Money getBundleItemsSalePrice()
Specified by:
getBundleItemsSalePrice in interface ProductBundle
Returns:
the sum of the sale prices of the bundle items

getAutoBundle

public Boolean getAutoBundle()
Description copied from interface: ProductBundle
Gets whether or not this should be bundled together if the individual Products are added to the cart. For instance, if this Bundle is composed of Item1 and Item2, and the user adds Item1 and Item2 to the cart separately, if this is true then these items will be bundled into a single BundleOrderItem instead of unique items in the cart NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF

Specified by:
getAutoBundle in interface ProductBundle
Returns:
true if the items in this bundle should be automatically bundled together when added to the cart separately, false otherwise

setAutoBundle

public void setAutoBundle(Boolean autoBundle)
Description copied from interface: ProductBundle
Sets whether or not this should be bundled together if the individual Products are added to the cart. For instance, if this Bundle is composed of Item1 and Item2, and the user adds Item1 and Item2 to the cart separately, if this is true then these items will be bundled into a single BundleOrderItem instead of unique items in the cart NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF

Specified by:
setAutoBundle in interface ProductBundle
Parameters:
autoBundle - Whether or not the items in the bundle should be auto-bundled if added to the cart separately

getItemsPromotable

public Boolean getItemsPromotable()
Description copied from interface: ProductBundle
Gets whether or not the items in this bundle should be considered for promotions using the promotion engine

Note: this is only applicable when the pricing model is the sum of the bundle items NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF

Specified by:
getItemsPromotable in interface ProductBundle
Returns:
true if the items should be included in the promotion engine, false otherwise

setItemsPromotable

public void setItemsPromotable(Boolean itemsPromotable)
Description copied from interface: ProductBundle
Sets whether or not the items in this bundle should be considered for promotions using the promotion engine NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF

Specified by:
setItemsPromotable in interface ProductBundle
Parameters:
itemsPromotable - Whether or not the items in the bundle should be considered for promotions

getBundlePromotable

public Boolean getBundlePromotable()
Description copied from interface: ProductBundle
Gets whether or not the bundle itself should be promotable.
Note: this should only be used if the pricing model for the bundle uses the pricing on the bundle itself and not on the sum of its bundle items NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF

Specified by:
getBundlePromotable in interface ProductBundle
Returns:
true if the bundle itself should be available for promotion, false otherwise

setBundlePromotable

public void setBundlePromotable(Boolean bundlePromotable)
Description copied from interface: ProductBundle
Gets whether or not the bundle itself should be promotable.
Note: this should only be used if the pricing model for the bundle uses the pricing on the bundle itself and not on the sum of its bundle items NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF

Specified by:
setBundlePromotable in interface ProductBundle
Parameters:
bundlePromotable - Whether or not the bundle itself should be available for promotion

getSkuBundleItems

public List<SkuBundleItem> getSkuBundleItems()
Specified by:
getSkuBundleItems in interface ProductBundle

setSkuBundleItems

public void setSkuBundleItems(List<SkuBundleItem> skuBundleItems)
Specified by:
setSkuBundleItems in interface ProductBundle

getPriority

public Integer getPriority()
Description copied from interface: ProductBundle
Used to determine the order for automatic bundling.

Specified by:
getPriority in interface ProductBundle
Returns:

setPriority

public void setPriority(Integer priority)
Specified by:
setPriority in interface ProductBundle

getPotentialSavings

public BigDecimal getPotentialSavings()
Description copied from interface: ProductBundle
Calculates the potential savings by summing up the retail prices of the contained items and comparing to the actual bundle prices. Used to determine the order for automatic bundling in case items might qualify for multiple bundles.

Specified by:
getPotentialSavings in interface ProductBundle
Returns:


Copyright © 2013. All Rights Reserved.