public class Product extends Object implements Serializable, com.broadleafcommerce.money.jackson.CurrencyContextAware
Constructor and Description |
---|
Product() |
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalAttribute(String name,
Object value)
Takes in any additional attributes passed in the request not matching any defined properties.
|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
Map<String,Object> |
getAdditionalAttribute()
Return any additional attributes passed in the request not matching any defined properties.
|
Map<String,Object> |
getAdditionalAttributes()
Map holding any additional attributes passed in the request not matching any defined
properties.
|
List<com.broadleafcommerce.cart.client.domain.ImageAssetRef> |
getAssets()
All
ProductAssets for this product. |
Map<String,Attribute> |
getAttributes()
Dynamic attributes that are a part of the product.
|
DataDrivenEnum |
getBrand() |
javax.money.CurrencyUnit |
getCurrency() |
com.broadleafcommerce.money.CurrencyContext |
getCurrencyContext()
Transient ability to have a currency initialized
|
Map<String,FulfillmentFlatRate> |
getFulfillmentFlatRates()
A map of flat rates for fulfilling (e.g., shipping) this product for a particular fulfillment
option type (e.g., standard shipping).
|
String |
getId()
The ID of the Product.
|
List<IncludedProduct> |
getIncludedProducts()
Additional products that are always included with the product, no matter what.
|
String |
getInventoryCheckStrategy()
Describes when the product's inventory should be checked for availability.
|
String |
getInventoryReservationStrategy()
Describes when the product's inventory should be reserved.
|
String |
getInventoryType()
Describes the product's type of fulfillment - ie is it a physical or virtual item?
|
Integer |
getMaximumThreshold()
The maximum count of this product that must be added in a cart.
|
DataDrivenEnum |
getMerchandisingType() |
String |
getMergingType()
Determines how this Product should merge with other similar items when it gets added to a
cart.
|
Integer |
getMinimumThreshold()
The minimum count of this product that must be added in a cart.
|
String |
getName()
The name of the product.
|
List<ProductOption> |
getOptions()
Drives additional information that the customer should enter when purchasing this product.
|
Set<Category> |
getParentCategories()
All
Categories that include the product. |
com.broadleafcommerce.pricing.client.domain.PriceInfo |
getPriceInfo()
Summary of the
pricing information related to the product. |
String |
getPricingKey()
System-wide unique identifier to configure specific pricing for the product.
|
com.broadleafcommerce.cart.client.domain.ImageAssetRef |
getPrimaryAsset()
The asset associated with this product marked as primary.
|
String |
getProductType()
Defines the type of the product.
|
String |
getSku()
This uniquely identifies this product in the catalog when it is sold and is used for other
contexts like inventory and pricing.
|
List<String> |
getTags()
A list of simple labels used to categorize the product
|
DataDrivenEnum |
getTargetDemographic() |
String |
getUri()
The navigable uri of this product.
|
List<Variant> |
getVariants()
All
Variants for this product. |
String |
getVendorRef()
Soft reference to the vendor associated with this catalog.
|
Weight |
getWeight() |
int |
hashCode() |
boolean |
isAvailableOnline()
Whether or not this product is available online - ie inventory is available somewhere to
fulfill this product.
|
boolean |
isDiscountable()
Whether or not this product be applied to any offers or promotions.
|
boolean |
isIndividuallySold()
If this product or any of its variants can be sold individually in the store, or if they must
be apart of another product as an add-on.
|
void |
setAdditionalAttributes(Map<String,Object> additionalAttributes)
Map holding any additional attributes passed in the request not matching any defined
properties.
|
void |
setAssets(List<com.broadleafcommerce.cart.client.domain.ImageAssetRef> assets)
All
ProductAssets for this product. |
void |
setAttributes(Map<String,Attribute> attributes)
Dynamic attributes that are a part of the product.
|
void |
setAvailableOnline(boolean availableOnline)
Whether or not this product is available online - ie inventory is available somewhere to
fulfill this product.
|
void |
setBrand(DataDrivenEnum brand) |
void |
setCurrencyContext(com.broadleafcommerce.money.CurrencyContext currencyContext)
Transient ability to have a currency initialized
|
void |
setDiscountable(boolean discountable)
Whether or not this product be applied to any offers or promotions.
|
void |
setFulfillmentFlatRates(Map<String,FulfillmentFlatRate> fulfillmentFlatRates)
A map of flat rates for fulfilling (e.g., shipping) this product for a particular fulfillment
option type (e.g., standard shipping).
|
void |
setId(String id)
The ID of the Product.
|
void |
setIncludedProducts(List<IncludedProduct> includedProducts)
Additional products that are always included with the product, no matter what.
|
void |
setIndividuallySold(boolean individuallySold)
If this product or any of its variants can be sold individually in the store, or if they must
be apart of another product as an add-on.
|
void |
setInventoryCheckStrategy(String inventoryCheckStrategy)
Describes when the product's inventory should be checked for availability.
|
void |
setInventoryReservationStrategy(String inventoryReservationStrategy)
Describes when the product's inventory should be reserved.
|
void |
setInventoryType(String inventoryType)
Describes the product's type of fulfillment - ie is it a physical or virtual item?
|
void |
setMaximumThreshold(Integer maximumThreshold)
The maximum count of this product that must be added in a cart.
|
void |
setMerchandisingType(DataDrivenEnum merchandisingType) |
void |
setMergingType(String mergingType)
Determines how this Product should merge with other similar items when it gets added to a
cart.
|
void |
setMinimumThreshold(Integer minimumThreshold)
The minimum count of this product that must be added in a cart.
|
void |
setName(String name)
The name of the product.
|
void |
setOptions(List<ProductOption> options)
Drives additional information that the customer should enter when purchasing this product.
|
void |
setParentCategories(Set<Category> parentCategories)
All
Categories that include the product. |
void |
setPriceInfo(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo)
Summary of the
pricing information related to the product. |
void |
setPricingKey(String pricingKey)
System-wide unique identifier to configure specific pricing for the product.
|
void |
setPrimaryAsset(com.broadleafcommerce.cart.client.domain.ImageAssetRef primaryAsset)
The asset associated with this product marked as primary.
|
void |
setProductType(String productType)
Defines the type of the product.
|
void |
setSku(String sku)
This uniquely identifies this product in the catalog when it is sold and is used for other
contexts like inventory and pricing.
|
void |
setTags(List<String> tags)
A list of simple labels used to categorize the product
|
void |
setTargetDemographic(DataDrivenEnum targetDemographic) |
void |
setUri(String uri)
The navigable uri of this product.
|
void |
setVariants(List<Variant> variants)
All
Variants for this product. |
void |
setVendorRef(String vendorRef)
Soft reference to the vendor associated with this catalog.
|
void |
setWeight(Weight weight) |
String |
toString() |
public void addAdditionalAttribute(String name, Object value)
name
- Name of the additional attributevalue
- Value of the additional attributepublic Map<String,Object> getAdditionalAttribute()
public javax.money.CurrencyUnit getCurrency()
public String getId()
public String getName()
public String getUri()
public String getSku()
public boolean isDiscountable()
Whether or not this product be applied to any offers or promotions.
Defaults to true
public com.broadleafcommerce.pricing.client.domain.PriceInfo getPriceInfo()
pricing information
related to the product.pricing information
related to the productpublic String getPricingKey()
public String getMergingType()
DefaultMergingType
.public Map<String,FulfillmentFlatRate> getFulfillmentFlatRates()
The key of the map is the type of the fulfillment option such as FIXED_STANDARD
or
BANDED_PRICE_EXPRESS
.
FulfillmentFlatRate
public List<IncludedProduct> getIncludedProducts()
Additional products that are always included with the product, no matter what. Used to configure "bundles" or "kits".
If some of these items should be optional or the user should decide which additional items
are added to their cart, use options
instead.
IncludedProduct
public com.broadleafcommerce.cart.client.domain.ImageAssetRef getPrimaryAsset()
public List<com.broadleafcommerce.cart.client.domain.ImageAssetRef> getAssets()
ProductAssets
for this product.ProductAssets
for this product.public Map<String,Attribute> getAttributes()
public List<ProductOption> getOptions()
variations
, additional items that can
be bundled with this product or simply more information that the customer needs to enter
about what they are purchasing (like a personalized message).public String getInventoryType()
public boolean isAvailableOnline()
public String getInventoryCheckStrategy()
public String getInventoryReservationStrategy()
public List<String> getTags()
public Set<Category> getParentCategories()
Categories
that include the product.Categories
that include the product.public List<Variant> getVariants()
Variants
for this product.Variants
for this product.public Weight getWeight()
public boolean isIndividuallySold()
If this product or any of its variants can be sold individually in the store, or if they must be apart of another product as an add-on.
This defaults to true
.
public com.broadleafcommerce.money.CurrencyContext getCurrencyContext()
getCurrencyContext
in interface com.broadleafcommerce.money.jackson.CurrencyContextAware
public String getVendorRef()
public String getProductType()
internalAttributes
under the
CartItemAttributeConstants.Internal.PRODUCT_TYPE
key and used to determine the
product type for the CartItem
. The default types are defined by
DefaultProductType
.DefaultProductType
public DataDrivenEnum getBrand()
public DataDrivenEnum getMerchandisingType()
public DataDrivenEnum getTargetDemographic()
public Map<String,Object> getAdditionalAttributes()
public Integer getMinimumThreshold()
public Integer getMaximumThreshold()
public void setId(String id)
id
- The ID of the Product.public void setName(String name)
name
- The name of the product.public void setUri(String uri)
uri
- The navigable uri of this product.public void setSku(String sku)
sku
- the Stock Keeping Unit identifier for this Product. Typically only set this if
intending to sell this single Product in the store, but can also be set to the same
value as a related variant's
sku to declare a default variant/default
sku for the productpublic void setDiscountable(boolean discountable)
Whether or not this product be applied to any offers or promotions.
Defaults to true
discountable
- whether or not this product can be applied to any offers or promotionspublic void setPriceInfo(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo)
pricing information
related to the product.priceInfo
- Summary of the pricing information
related to the productpublic void setPricingKey(String pricingKey)
pricingKey
- a unique key to identify this product (usually a UUID)public void setMergingType(String mergingType)
DefaultMergingType
.mergingType
- the merging type to use for this Productpublic void setFulfillmentFlatRates(Map<String,FulfillmentFlatRate> fulfillmentFlatRates)
The key of the map is the type of the fulfillment option such as FIXED_STANDARD
or
BANDED_PRICE_EXPRESS
.
fulfillmentFlatRates
- Map of Fulfillment option types to flat rates for this product.FulfillmentFlatRate
public void setIncludedProducts(List<IncludedProduct> includedProducts)
Additional products that are always included with the product, no matter what. Used to configure "bundles" or "kits".
If some of these items should be optional or the user should decide which additional items
are added to their cart, use options
instead.
includedProducts
- that bundle with this product as their parentIncludedProduct
public void setPrimaryAsset(com.broadleafcommerce.cart.client.domain.ImageAssetRef primaryAsset)
primaryAsset
- The primary asset for this product.public void setAssets(List<com.broadleafcommerce.cart.client.domain.ImageAssetRef> assets)
ProductAssets
for this product.assets
- All ProductAssets
for this product.public void setAttributes(Map<String,Attribute> attributes)
attributes
- dynamic attributes that are a part of the productpublic void setOptions(List<ProductOption> options)
variations
, additional items that can
be bundled with this product or simply more information that the customer needs to enter
about what they are purchasing (like a personalized message).options
- the options for this productpublic void setInventoryType(String inventoryType)
inventoryType
- a String representation of the product's type of inventorypublic void setAvailableOnline(boolean availableOnline)
availableOnline
- Whether or not this product is available online.public void setInventoryCheckStrategy(String inventoryCheckStrategy)
inventoryCheckStrategy
- the product's inventory check strategypublic void setInventoryReservationStrategy(String inventoryReservationStrategy)
inventoryReservationStrategy
- the product's inventory reservation strategypublic void setTags(List<String> tags)
tags
- a list of simple labels used to categorize the productpublic void setParentCategories(Set<Category> parentCategories)
Categories
that include the product.parentCategories
- All Categories
that include the product.public void setVariants(List<Variant> variants)
Variants
for this product.variants
- All Variants
for this product.public void setWeight(Weight weight)
weight
- the weight of this productpublic void setIndividuallySold(boolean individuallySold)
If this product or any of its variants can be sold individually in the store, or if they must be apart of another product as an add-on.
This defaults to true
.
individuallySold
- whether or not this product or any of its variants can be sold
individuallypublic void setCurrencyContext(com.broadleafcommerce.money.CurrencyContext currencyContext)
setCurrencyContext
in interface com.broadleafcommerce.money.jackson.CurrencyContextAware
public void setVendorRef(String vendorRef)
vendorRef
- Soft reference to the vendor associated with this catalog.public void setProductType(String productType)
internalAttributes
under the
CartItemAttributeConstants.Internal.PRODUCT_TYPE
key and used to determine the
product type for the CartItem
. The default types are defined by
DefaultProductType
.productType
- The type of the productDefaultProductType
public void setBrand(DataDrivenEnum brand)
brand
- the brand of this productpublic void setMerchandisingType(DataDrivenEnum merchandisingType)
merchandisingType
- the merchandising type of this productpublic void setTargetDemographic(DataDrivenEnum targetDemographic)
targetDemographic
- the target demographic of this productpublic void setAdditionalAttributes(Map<String,Object> additionalAttributes)
public void setMinimumThreshold(Integer minimumThreshold)
minimumThreshold
- the minimum count of this product that must be added in a cartpublic void setMaximumThreshold(Integer maximumThreshold)
maximumThreshold
- the maximum count of this product that must be added in a cartprotected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.