public interface Product extends Serializable
Skus
which are specific items (for example: a XL Blue Hat) are sold or added to a cart.
ProductImpl.ProductImpl},{@link Sku}, {@link Category}| Modifier and Type | Method and Description |
|---|---|
void |
clearDynamicPrices()
Removes any currently stored dynamic pricing
|
Date |
getActiveEndDate()
Returns the last date a product will be available that is used to determine whether
to display the product.
|
Date |
getActiveStartDate()
Returns the first date a product will be available that is used to determine whether
to display the product.
|
List<Sku> |
getAdditionalSkus()
Gets all the additional Skus associated with this Product.
|
List<Category> |
getAllParentCategories()
Deprecated.
Use getAllParentCategoryXrefs() instead.
|
List<CategoryProductXref> |
getAllParentCategoryXrefs() |
Map<String,Media> |
getAllSkuMedia()
Convenience method for returning all of the media associated with this Product by adding
all the media in
getDefaultSku() as well as all the media in the Skus represented by
getAdditionalSkus() |
List<Sku> |
getAllSkus()
Returns all the
Skus that are associated with this Product (including getDefaultSku())
regardless of whether or not the Skus are active or not
Note: in the event that the default Sku was added to the list of getAdditionalSkus(), it is filtered out
so that only a single instance of getDefaultSku() is contained in the resulting list |
Boolean |
getCanSellWithoutOptions() |
ContainerShapeType |
getContainer()
Gets the dimension container shape
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
List<RelatedProduct> |
getCrossSaleProducts()
Returns a List of this product's related Cross Sales
|
List<RelatedProduct> |
getCumulativeCrossSaleProducts()
Returns a list of the cross sale products for this product as well
all cross sale products in all parent categories of this product.
|
List<RelatedProduct> |
getCumulativeUpSaleProducts()
Returns a list of the upsale products for this product as well as
all upsale products in all parent categories of this product.
|
Category |
getDefaultCategory()
Returns the default
Category this product is associated with. |
Sku |
getDefaultSku()
Gets the default
Sku associated with this Product. |
BigDecimal |
getDepth()
Returns the dimension depth
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
String |
getDescription()
Returns a brief description of the product that is used for display.
|
Dimension |
getDimension()
Returns the
Dimension for this product
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
String |
getDimensionString()
Returns a String representation of the dimension
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
String |
getDisplayTemplate()
Returns the name of a display template that is used to render this product.
|
String |
getGeneratedUrl()
Generates a URL that can be used to access the product.
|
BigDecimal |
getGirth()
Gets the dimension girth
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
BigDecimal |
getHeight()
Returns the dimension height
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
Long |
getId()
The id of the Product.
|
String |
getLongDescription()
Returns a long description of the product that is used for display.
|
String |
getManufacturer()
Returns the manufacture name for this product
|
Map<String,Media> |
getMedia()
Gets the media for this product.
|
String |
getModel()
Returns the model number of the product
|
String |
getName()
Returns the name of the product that is used for display purposes.
|
Map<String,ProductAttribute> |
getProductAttributes()
Generic key-value pair of attributes to associate to this Product for maximum
extensibility.
|
List<ProductOption> |
getProductOptions()
Deprecated.
use getProductOptionXrefs instead
|
List<ProductOptionXref> |
getProductOptionXrefs() |
String |
getPromoMessage()
Gets the promotional message for this Product.
|
ContainerSizeType |
getSize()
Returns the dimension container size
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
List<Sku> |
getSkus()
Returns a list of
Skus filtered by whether the Skus are active or not. |
String |
getTaxCode()
Returns the tax code of the product.
|
List<RelatedProduct> |
getUpSaleProducts()
Returns a List of this product's related Up Sales
|
String |
getUrl()
A product can have a designated URL.
|
String |
getUrlKey()
Sets a url-fragment.
|
Weight |
getWeight()
Returns the weight of the product
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
BigDecimal |
getWidth()
Returns the dimension width
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
boolean |
isActive()
Returns a boolean that indicates if the product is currently active.
|
boolean |
isFeaturedProduct()
Returns whether or not the product is featured
|
void |
setActiveEndDate(Date activeEndDate)
Sets the last date a product will be available that is used to determine whether
to display the product.
|
void |
setActiveStartDate(Date activeStartDate)
Sets the first date a product will be available that is used to determine whether
to display the product.
|
void |
setAdditionalSkus(List<Sku> skus)
Sets the additional Skus associated to this Product.
|
void |
setAllParentCategories(List<Category> allParentCategories)
Deprecated.
Use setAllParentCategoryXrefs() instead.
|
void |
setAllParentCategoryXrefs(List<CategoryProductXref> allParentCategories) |
void |
setCanSellWithoutOptions(Boolean canSellWithoutOptions)
Sets whether or not the default sku can be sold in the case that no product options are specified.
|
void |
setContainer(ContainerShapeType container)
Sets the dimension container shape
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
void |
setCrossSaleProducts(List<RelatedProduct> crossSaleProducts)
Sets the related Cross Sales
|
void |
setDefaultCategory(Category defaultCategory)
Sets the default
Category to associate this product with. |
void |
setDefaultSku(Sku defaultSku)
Sets the default Sku for this Product
Note: this operation is cascaded with CascadeType.ALL which saves from having to persist the Product in 2 operations: first persist the Sku and then take the merged Sku, set it as this Product's default Sku, and then persist this Product. |
void |
setDepth(BigDecimal depth)
Sets the dimension depth
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
void |
setDescription(String description)
Sets a brief description of the product that is used for display.
|
void |
setDimension(Dimension dimension)
Sets the
Dimension for this product
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
void |
setDisplayTemplate(String displayTemplate)
Sets the name of a display template that is used to render this product.
|
void |
setFeaturedProduct(boolean isFeaturedProduct)
Sets whether or not the product is featured
|
void |
setGirth(BigDecimal girth)
Sets the dimension girth
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
void |
setHeight(BigDecimal height)
Sets the dimension height
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
void |
setId(Long id)
Sets the id of the Product.
|
void |
setLongDescription(String longDescription)
Sets a long description of the product that is used for display.
|
void |
setManufacturer(String manufacturer)
Sets the manufacture for this product
|
void |
setMedia(Map<String,Media> media)
Gets the media for this product.
|
void |
setModel(String model)
Sets the model number of the product
|
void |
setName(String name)
Sets the name of the product that is used for display purposes.
|
void |
setProductAttributes(Map<String,ProductAttribute> productAttributes)
Sets a generic list of key-value pairs for Product
|
void |
setProductOptions(List<ProductOption> productOptions)
Deprecated.
use setProductOptionXrefs instead
|
void |
setProductOptionXrefs(List<ProductOptionXref> productOptions) |
void |
setPromoMessage(String promoMessage)
Sets the promotional message for this Product
|
void |
setSize(ContainerSizeType size)
Sets the dimension container size
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
void |
setTaxCode(String taxCode)
Sets the tax code for this product.
|
void |
setUpSaleProducts(List<RelatedProduct> upSaleProducts)
Sets the related Up Sales
|
void |
setUrl(String url)
Sets the URL that a customer could type in to reach this product.
|
void |
setUrlKey(String url)
Sets a url-fragment to be used with this product.
|
void |
setWeight(Weight weight)
Sets the product weight
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
void |
setWidth(BigDecimal width)
Sets the dimension width
Note: this is a convenience method that merely serves as a pass-through to the same method via getDefaultSku() |
Long getId()
void setId(Long id)
id - - the id of the productString getName()
getDefaultSku()void setName(String name)
getDefaultSku()name - - the name of the ProductString getDescription()
getDefaultSku()void setDescription(String description)
getDefaultSku()description - - a brief description of the productString getLongDescription()
getDefaultSku()void setLongDescription(String longDescription)
getDefaultSku()longDescription - the long descriptionDate getActiveStartDate()
getDefaultSku()void setActiveStartDate(Date activeStartDate)
getDefaultSku()activeStartDate - - the first day the product is availableDate getActiveEndDate()
getDefaultSku()void setActiveEndDate(Date activeEndDate)
getDefaultSku()activeEndDate - - the last day the product is availableboolean isActive()
getDefaultSku()Sku getDefaultSku()
Sku associated with this Product. A Product is
required to have a default Sku which holds specific information about the Product
like weight, dimensions, price, etc. Many of the Product attributes that
have getters and setters on Product are actually pass-through to the default Sku.
ProductOptions. For instance, a large, blue shirt. For more information on
that relationship see getAdditionalSkus().void setDefaultSku(Sku defaultSku)
defaultSku - - the Sku that should be the default for this ProductBoolean getCanSellWithoutOptions()
void setCanSellWithoutOptions(Boolean canSellWithoutOptions)
canSellWithoutOptions - List<Sku> getSkus()
Skus filtered by whether the Skus are active or not.
This list does not contain the getDefaultSku() and filters by Sku.isActive().getAdditionalSkus() for this ProductList<Sku> getAdditionalSkus()
ProductOption (like "small", "medium", "large") this would return 3 Skus
if you had different inventory or price constraints on each ProductOptionValue.
getDefaultSku() for this Product. For this functionality, see
getSkus() and getAllSkus(), respectively.ProductOption}, {@link ProductOptionValue}void setAdditionalSkus(List<Sku> skus)
ProductOptionValues and are used in instance where you need to track inventory
or change pricing on a per-option value basis.skus - - a List of Skus to associate with this Product, usually based off of ProductOptions#getAdditionalSkus()}, {@link ProductOption}, {@link ProductOptionValue}List<Sku> getAllSkus()
Skus that are associated with this Product (including getDefaultSku())
regardless of whether or not the Skus are active or not
getAdditionalSkus(), it is filtered out
so that only a single instance of getDefaultSku() is contained in the resulting listMap<String,Media> getMedia()
getDefaultSku() mediaSkuvoid setMedia(Map<String,Media> media)
getDefaultSku() mediamedia - Media map to set on the default Sku associated with this ProductSkuMap<String,Media> getAllSkuMedia()
getDefaultSku() as well as all the media in the Skus represented by
getAdditionalSkus()Category getDefaultCategory()
Category this product is associated with.void setDefaultCategory(Category defaultCategory)
Category to associate this product with.defaultCategory - - the default Category to associate this product withString getModel()
void setModel(String model)
model - String getManufacturer()
void setManufacturer(String manufacturer)
manufacturer - Dimension getDimension()
Dimension for this product
getDefaultSku()void setDimension(Dimension dimension)
Dimension for this product
getDefaultSku()dimension - BigDecimal getWidth()
getDefaultSku()void setWidth(BigDecimal width)
getDefaultSku()width - BigDecimal getHeight()
getDefaultSku()void setHeight(BigDecimal height)
getDefaultSku()height - BigDecimal getDepth()
getDefaultSku()void setDepth(BigDecimal depth)
getDefaultSku()depth - BigDecimal getGirth()
getDefaultSku()void setGirth(BigDecimal girth)
getDefaultSku()girth - ContainerSizeType getSize()
getDefaultSku()void setSize(ContainerSizeType size)
getDefaultSku()size - ContainerShapeType getContainer()
getDefaultSku()void setContainer(ContainerShapeType container)
getDefaultSku()container - String getDimensionString()
getDefaultSku()Weight getWeight()
getDefaultSku()void setWeight(Weight weight)
getDefaultSku()weight - List<RelatedProduct> getCrossSaleProducts()
void setCrossSaleProducts(List<RelatedProduct> crossSaleProducts)
crossSaleProducts - List<RelatedProduct> getUpSaleProducts()
void setUpSaleProducts(List<RelatedProduct> upSaleProducts)
upSaleProducts - boolean isFeaturedProduct()
void setFeaturedProduct(boolean isFeaturedProduct)
isFeaturedProduct - Map<String,ProductAttribute> getProductAttributes()
void setProductAttributes(Map<String,ProductAttribute> productAttributes)
productAttributes - String getPromoMessage()
void setPromoMessage(String promoMessage)
promoMessage - @Deprecated List<ProductOption> getProductOptions()
ProductOptions for this Product. For instance, if this
Product is a T-Shirt, you might be able to specify a size and color. This would
be modeled by 2 ProductOptions, each that could have multiple ProductOptionValues
(which could be "small" "medium" "large", "blue", "yellow", "green"). For specific pricing or
inventory needs on a per-value basis, multiple Skus can be associated to this Product based
off of the ProductOptionValuesProductOptions for this ProductProduct#getAdditionalSkus(), {@link ProductOption}, {@link ProductOptionValue}List<ProductOptionXref> getProductOptionXrefs()
@Deprecated void setProductOptions(List<ProductOption> productOptions)
productOptions - void setProductOptionXrefs(List<ProductOptionXref> productOptions)
String getUrl()
getDisplayTemplate().
Alternatively, most sites will rely on the getGeneratedUrl() to define the
url for a product page.org.broadleafcommerce.core.web.catalog.ProductHandlerMappingvoid setUrl(String url)
url - String getUrlKey()
Product.getName() and removing special characters and replacing
dashes with spaces.void setUrlKey(String url)
Product.getName() and removing special characters and replacing
dashes with spaces.String getDisplayTemplate()
void setDisplayTemplate(String displayTemplate)
displayTemplate - String getGeneratedUrl()
List<RelatedProduct> getCumulativeCrossSaleProducts()
List<RelatedProduct> getCumulativeUpSaleProducts()
void clearDynamicPrices()
List<CategoryProductXref> getAllParentCategoryXrefs()
void setAllParentCategoryXrefs(List<CategoryProductXref> allParentCategories)
@Deprecated List<Category> getAllParentCategories()
Category(s) this product is associated with.@Deprecated void setAllParentCategories(List<Category> allParentCategories)
Categorys this product is associated with.allParentCategories - - a List of all parent Category(s) to associate this product withString getTaxCode()
void setTaxCode(String taxCode)
taxCode - Copyright © 2015. All Rights Reserved.