org.broadleafcommerce.core.catalog.domain
Interface Product

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
ProductSku
All Known Implementing Classes:
ProductImpl, ProductSkuImpl

public interface Product
extends java.io.Serializable

Implementations of this interface are used to hold data for a Product. A product is a general description of an item that can be sold (for example: a hat). Products are not sold or added to a cart. Skus which are specific items (for example: a XL Blue Hat) are sold or added to a cart.

You should implement this class if you want to make significant changes to how the Product is persisted. If you just want to add additional fields then you should extend ProductImpl.

Author:
btaylor
See Also:
ProductImpl},{@link Sku}, {@link Category}

Method Summary
 java.util.Date getActiveEndDate()
          Returns the last date a product will be available that is used to determine whether to display the product.
 java.util.Date getActiveStartDate()
          Returns the first date a product will be available that is used to determine whether to display the product.
 java.util.List<Category> getAllParentCategories()
          Returns all parent Category(s) this product is associated with.
 java.util.List<Sku> getAllSkus()
           
 ContainerShapeType getContainer()
           
 java.util.List<RelatedProduct> getCrossSaleProducts()
          Returns a List of this product's related Cross Sales
 Category getDefaultCategory()
          Returns the default Category this product is associated with.
 java.math.BigDecimal getDepth()
          Returns the product dimension depth
 java.lang.String getDescription()
          Returns a brief description of the product that is used for display.
 ProductDimension getDimension()
          Returns the ProductDimension for this product
 java.lang.String getDimensionString()
          Returns a String representation of the product dimension
 java.math.BigDecimal getGirth()
           
 java.math.BigDecimal getHeight()
          Returns the product dimension height
 java.lang.Long getId()
          The id of the Product.
 java.lang.String getLongDescription()
          Returns a long description of the product that is used for display.
 java.lang.String getManufacturer()
          Returns the manufacture name for this product
 java.lang.String getModel()
          Returns the model number of the product
 java.lang.String getName()
          Returns the name of the product that is used for display purposes.
 java.util.List<ProductAttribute> getProductAttributes()
           
 java.lang.String getProductImage(java.lang.String imageKey)
          Deprecated. 
 java.util.Map<java.lang.String,java.lang.String> getProductImages()
          Deprecated. 
 java.util.Map<java.lang.String,Media> getProductMedia()
          Returns a map of key/value pairs that associate the media name (key) with the Media object(value)
 java.lang.String getPromoMessage()
           
 ContainerSizeType getSize()
           
 java.util.List<Sku> getSkus()
          Returns a list of Skus that are part of this product.
 java.util.List<RelatedProduct> getUpSaleProducts()
          Returns a List of this product's related Up Sales
 ProductWeight getWeight()
          Returns the weight of the product
 java.math.BigDecimal getWidth()
          Returns the product dimension width
 boolean isActive()
          Returns a boolean that indicates if the product is currently active.
 boolean isFeaturedProduct()
          Returns whether or not the product is featured
 boolean isMachineSortable()
           
 void setActiveEndDate(java.util.Date activeEndDate)
          Sets the last date a product will be available that is used to determine whether to display the product.
 void setActiveStartDate(java.util.Date activeStartDate)
          Sets the first date a product will be available that is used to determine whether to display the product.
 void setAllParentCategories(java.util.List<Category> allParentCategories)
          Sets all parent Categorys this product is associated with.
 void setAllSkus(java.util.List<Sku> skus)
          Sets the Skus that are to be associated with this product.
 void setContainer(ContainerShapeType container)
           
 void setCrossSaleProducts(java.util.List<RelatedProduct> crossSaleProducts)
          Sets the related Cross Sales
 void setDefaultCategory(Category defaultCategory)
          Sets the default Category to associate this product with.
 void setDepth(java.math.BigDecimal depth)
          Sets the product dimension depth
 void setDescription(java.lang.String description)
          Sets a brief description of the product that is used for display.
 void setDimension(ProductDimension dimension)
          Sets the ProductDimension for this product
 void setFeaturedProduct(boolean isFeaturedProduct)
          Sets whether or not the product is featured
 void setGirth(java.math.BigDecimal girth)
           
 void setHeight(java.math.BigDecimal height)
          Sets the product dimension height
 void setId(java.lang.Long id)
          Sets the id of the Product.
 void setLongDescription(java.lang.String longDescription)
          Sets a long description of the product that is used for display.
 void setMachineSortable(boolean isMachineSortable)
           
 void setManufacturer(java.lang.String manufacturer)
          Sets the manufacture for this product
 void setModel(java.lang.String model)
          Sets the model number of the product
 void setName(java.lang.String name)
          Sets the name of the product that is used for display purposes.
 void setProductAttributes(java.util.List<ProductAttribute> productAttributes)
           
 void setProductImages(java.util.Map<java.lang.String,java.lang.String> productImages)
          Deprecated. 
 void setProductMedia(java.util.Map<java.lang.String,Media> productMedia)
          Sets the product media map.
 void setPromoMessage(java.lang.String promoMessage)
           
 void setSize(ContainerSizeType size)
           
 void setUpSaleProducts(java.util.List<RelatedProduct> upSaleProducts)
          Sets the related Up Sales
 void setWeight(ProductWeight weight)
          Sets the product weight
 void setWidth(java.math.BigDecimal width)
          Sets the product dimension width
 

Method Detail

getId

java.lang.Long getId()
The id of the Product.

Returns:
the id of the Product

setId

void setId(java.lang.Long id)
Sets the id of the Product.

Parameters:
id - - the id of the product

getName

java.lang.String getName()
Returns the name of the product that is used for display purposes.

Returns:
the name of the product

setName

void setName(java.lang.String name)
Sets the name of the product that is used for display purposes.

Parameters:
name - - the name of the Product

getDescription

java.lang.String getDescription()
Returns a brief description of the product that is used for display.

Returns:
a brief description of the product

setDescription

void setDescription(java.lang.String description)
Sets a brief description of the product that is used for display.

Parameters:
description - - a brief description of the product

getLongDescription

java.lang.String getLongDescription()
Returns a long description of the product that is used for display.

Returns:
a long description of the product

setLongDescription

void setLongDescription(java.lang.String longDescription)
Sets a long description of the product that is used for display.

Parameters:
longDescription - the long description

getActiveStartDate

java.util.Date getActiveStartDate()
Returns the first date a product will be available that is used to determine whether to display the product.

Returns:
the first date the product will be available

setActiveStartDate

void setActiveStartDate(java.util.Date activeStartDate)
Sets the first date a product will be available that is used to determine whether to display the product.

Parameters:
activeStartDate - - the first day the product is available

getActiveEndDate

java.util.Date getActiveEndDate()
Returns the last date a product will be available that is used to determine whether to display the product.

Returns:
the last day the product is available

setActiveEndDate

void setActiveEndDate(java.util.Date activeEndDate)
Sets the last date a product will be available that is used to determine whether to display the product.

Parameters:
activeEndDate - - the last day the product is available

isActive

boolean isActive()
Returns a boolean that indicates if the product is currently active.

Returns:
a boolean indicates if the product is active.

getSkus

java.util.List<Sku> getSkus()
Returns a list of Skus that are part of this product.

Returns:
a list of Skus associated with this product

setAllSkus

void setAllSkus(java.util.List<Sku> skus)
Sets the Skus that are to be associated with this product.

Parameters:
skus - - a List of Skus to associate with this product.

getAllSkus

java.util.List<Sku> getAllSkus()

getProductImages

@Deprecated
java.util.Map<java.lang.String,java.lang.String> getProductImages()
Deprecated. 

Returns a map of key/value pairs that associate the image name (key) with the URL to the image (value) for display purposes. This method is deprecated. Use getProductMedia instead.

Returns:
a map of product images

getProductImage

@Deprecated
java.lang.String getProductImage(java.lang.String imageKey)
Deprecated. 

Returns a string URL to an image given the string key passed in for this product.

Parameters:
imageKey - - a string key to lookup the image for the product
Returns:
a URL to the image associated witht he key passed in.

setProductImages

@Deprecated
void setProductImages(java.util.Map<java.lang.String,java.lang.String> productImages)
Deprecated. 

Sets the product images map. This method is deprecated. Use setProductMedia instead.

Parameters:
productImages - - a map of product images

getProductMedia

java.util.Map<java.lang.String,Media> getProductMedia()
Returns a map of key/value pairs that associate the media name (key) with the Media object(value)

Returns:
a map of product media

setProductMedia

void setProductMedia(java.util.Map<java.lang.String,Media> productMedia)
Sets the product media map.

Parameters:
productImages - - a map of product images

getAllParentCategories

java.util.List<Category> getAllParentCategories()
Returns all parent Category(s) this product is associated with.

Returns:
the all parent categories for this product

setAllParentCategories

void setAllParentCategories(java.util.List<Category> allParentCategories)
Sets all parent Categorys this product is associated with.

Parameters:
allParentCategories - - a List of all parent Category(s) to associate this product with

getDefaultCategory

Category getDefaultCategory()
Returns the default Category this product is associated with.

Parameters:
defaultCategory - - the default Category to associate this product with

setDefaultCategory

void setDefaultCategory(Category defaultCategory)
Sets the default Category to associate this product with.

Parameters:
defaultCategory - - the default Category to associate this product with

getModel

java.lang.String getModel()
Returns the model number of the product

Returns:
the model number

setModel

void setModel(java.lang.String model)
Sets the model number of the product

Parameters:
model -

getManufacturer

java.lang.String getManufacturer()
Returns the manufacture name for this product

Returns:
the manufacture name

setManufacturer

void setManufacturer(java.lang.String manufacturer)
Sets the manufacture for this product

Parameters:
manufacturer -

getDimension

ProductDimension getDimension()
Returns the ProductDimension for this product

Returns:
a ProductDimensions object

setDimension

void setDimension(ProductDimension dimension)
Sets the ProductDimension for this product

Parameters:
dimension -

getWidth

java.math.BigDecimal getWidth()
Returns the product dimension width

Returns:
width dimension of the product

setWidth

void setWidth(java.math.BigDecimal width)
Sets the product dimension width

Parameters:
width -

getHeight

java.math.BigDecimal getHeight()
Returns the product dimension height

Returns:
height dimension of the product

setHeight

void setHeight(java.math.BigDecimal height)
Sets the product dimension height

Parameters:
height -

getDepth

java.math.BigDecimal getDepth()
Returns the product dimension depth

Returns:
width depth of the product

setDepth

void setDepth(java.math.BigDecimal depth)
Sets the product dimension depth

Parameters:
depth -

getWeight

ProductWeight getWeight()
Returns the weight of the product

Returns:
weight of product

setWeight

void setWeight(ProductWeight weight)
Sets the product weight

Parameters:
weight -

getDimensionString

java.lang.String getDimensionString()
Returns a String representation of the product dimension

Returns:
a product dimension String

getCrossSaleProducts

java.util.List<RelatedProduct> getCrossSaleProducts()
Returns a List of this product's related Cross Sales

Returns:

setCrossSaleProducts

void setCrossSaleProducts(java.util.List<RelatedProduct> crossSaleProducts)
Sets the related Cross Sales

Parameters:
crossSaleProducts -

getUpSaleProducts

java.util.List<RelatedProduct> getUpSaleProducts()
Returns a List of this product's related Up Sales

Returns:

setUpSaleProducts

void setUpSaleProducts(java.util.List<RelatedProduct> upSaleProducts)
Sets the related Up Sales

Parameters:
upSaleProducts -

isFeaturedProduct

boolean isFeaturedProduct()
Returns whether or not the product is featured

Returns:
isFeaturedProduct as Boolean

setFeaturedProduct

void setFeaturedProduct(boolean isFeaturedProduct)
Sets whether or not the product is featured

Parameters:
isFeaturedProduct -

isMachineSortable

boolean isMachineSortable()

setMachineSortable

void setMachineSortable(boolean isMachineSortable)

setGirth

void setGirth(java.math.BigDecimal girth)

getGirth

java.math.BigDecimal getGirth()

getSize

ContainerSizeType getSize()

setSize

void setSize(ContainerSizeType size)

getContainer

ContainerShapeType getContainer()

setContainer

void setContainer(ContainerShapeType container)

getProductAttributes

java.util.List<ProductAttribute> getProductAttributes()

setProductAttributes

void setProductAttributes(java.util.List<ProductAttribute> productAttributes)

getPromoMessage

java.lang.String getPromoMessage()

setPromoMessage

void setPromoMessage(java.lang.String promoMessage)


Copyright © 2012. All Rights Reserved.