org.broadleafcommerce.core.catalog.domain
Interface Sku

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
SkuImpl

public interface Sku
extends java.io.Serializable

Implementations of this interface are used to hold data about a SKU. A SKU is a specific item that can be sold including any specific attributes of the item such as color or size.

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

Author:
btaylor
See Also:
SkuImpl}, {@link Money}

Method Summary
 java.util.Date getActiveEndDate()
          Returns the the last date that the Sku should be available for sale.
 java.util.Date getActiveStartDate()
          Returns the first date that the Sku should be available for sale.
 java.util.List<Product> getAllParentProducts()
          Get all the parent products since a sku can exist in multiple
 java.lang.String getDescription()
          Returns the brief description of the Sku.
 java.lang.Long getId()
          Returns the id of this sku
 Money getListPrice()
          Deprecated.  
 java.lang.String getLongDescription()
          Returns the long description of the sku.
 java.lang.String getName()
          Returns the name of the Sku.
 Money getRetailPrice()
          Returns the Retail Price of the Sku.
 Money getSalePrice()
          Returns the Sale Price of the Sku.
 java.util.List<SkuAttribute> getSkuAttributes()
           
 java.lang.String getSkuImage(java.lang.String imageKey)
          Deprecated. 
 java.util.Map<java.lang.String,java.lang.String> getSkuImages()
          Deprecated. 
 java.util.Map<java.lang.String,Media> getSkuMedia()
          Returns a map of key/value pairs where the key is a string for the name of a media object and the value is a media object.
 boolean isActive()
          Returns a boolean indicating whether this sku is active.
 boolean isActive(Product product, Category category)
           
 java.lang.Boolean isAvailable()
          Returns whether the Sku is available.
 java.lang.Boolean isDiscountable()
          Returns whether the Sku qualifies for discounts or not.
 java.lang.Boolean isTaxable()
          Returns whether the Sku qualifies for taxes or not.
 void setActiveEndDate(java.util.Date activeEndDate)
          Sets the the last date that the Sku should be available for sale.
 void setActiveStartDate(java.util.Date activeStartDate)
          Sets the the first date that the Sku should be available for sale.
 void setAllParentProducts(java.util.List<Product> allParentProducts)
          Set all the parent products since a sku can exist in multiple
 void setAvailable(java.lang.Boolean available)
          Sets the whether the Sku is available.
 void setDescription(java.lang.String description)
          Sets the brief description of the Sku.
 void setDiscountable(java.lang.Boolean discountable)
          Sets the whether the Sku qualifies for discounts or not.
 void setId(java.lang.Long id)
          Sets the id of this sku
 void setListPrice(Money listPrice)
          Deprecated.  
 void setLongDescription(java.lang.String longDescription)
          Sets the long description of the sku.
 void setName(java.lang.String name)
          Sets the the name of the Sku.
 void setRetailPrice(Money retailPrice)
           
 void setSalePrice(Money salePrice)
          Sets the the Sale Price of the Sku.
 void setSkuAttributes(java.util.List<SkuAttribute> skuAttributes)
           
 void setSkuImages(java.util.Map<java.lang.String,java.lang.String> skuImages)
          Deprecated. 
 void setSkuMedia(java.util.Map<java.lang.String,Media> skuMedia)
          Sets a map of key/value pairs where the key is a string for the name of a media object and the value is an object of type Media.
 void setTaxable(java.lang.Boolean taxable)
          Sets the whether the Sku qualifies for taxes or not.
 

Method Detail

getId

java.lang.Long getId()
Returns the id of this sku


setId

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


getSalePrice

Money getSalePrice()
Returns the Sale Price of the Sku. The Sale Price is the standard price the vendor sells this item for.


setSalePrice

void setSalePrice(Money salePrice)
Sets the the Sale Price of the Sku. The Sale Price is the standard price the vendor sells this item for.


getRetailPrice

Money getRetailPrice()
Returns the Retail Price of the Sku. The Retail Price is the MSRP of the sku.


setRetailPrice

void setRetailPrice(Money retailPrice)

getListPrice

Money getListPrice()
Deprecated. 

Returns the List Price of the Sku. The List Price is the MSRP of the sku.


setListPrice

void setListPrice(Money listPrice)
Deprecated. 

Sets the the List Price of the Sku. The List Price is the MSRP of the sku.


getName

java.lang.String getName()
Returns the name of the Sku. The name is a label used to show when displaying the sku.


setName

void setName(java.lang.String name)
Sets the the name of the Sku. The name is a label used to show when displaying the sku.


getDescription

java.lang.String getDescription()
Returns the brief description of the Sku.


setDescription

void setDescription(java.lang.String description)
Sets the brief description of the Sku.


getLongDescription

java.lang.String getLongDescription()
Returns the long description of the sku.


setLongDescription

void setLongDescription(java.lang.String longDescription)
Sets the long description of the sku.


isTaxable

java.lang.Boolean isTaxable()
Returns whether the Sku qualifies for taxes or not. This field is used by the pricing engine to calculate taxes.


setTaxable

void setTaxable(java.lang.Boolean taxable)
Sets the whether the Sku qualifies for taxes or not. This field is used by the pricing engine to calculate taxes.


isDiscountable

java.lang.Boolean isDiscountable()
Returns whether the Sku qualifies for discounts or not. This field is used by the pricing engine to apply offers.


setDiscountable

void setDiscountable(java.lang.Boolean discountable)
Sets the whether the Sku qualifies for discounts or not. This field is used by the pricing engine to apply offers.


isAvailable

java.lang.Boolean isAvailable()
Returns whether the Sku is available.


setAvailable

void setAvailable(java.lang.Boolean available)
Sets the whether the Sku is available.


getActiveStartDate

java.util.Date getActiveStartDate()
Returns the first date that the Sku should be available for sale. This field is used to determine whether a user can add the sku to their cart.


setActiveStartDate

void setActiveStartDate(java.util.Date activeStartDate)
Sets the the first date that the Sku should be available for sale. This field is used to determine whether a user can add the sku to their cart.


getActiveEndDate

java.util.Date getActiveEndDate()
Returns the the last date that the Sku should be available for sale. This field is used to determine whether a user can add the sku to their cart.


setActiveEndDate

void setActiveEndDate(java.util.Date activeEndDate)
Sets the the last date that the Sku should be available for sale. This field is used to determine whether a user can add the sku to their cart.


isActive

boolean isActive()
Returns a boolean indicating whether this sku is active. This is used to determine whether a user the sku can add the sku to their cart.


getSkuImages

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

Returns a map of key/value pairs where the key is a string for the name of an image and the value is a string to the URL of the image. This is used to display images while browsing the sku. This method is deprecated. Use getSkuMedia instead.


getSkuImage

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

Returns the default image used for the Sku.


setSkuImages

@Deprecated
void setSkuImages(java.util.Map<java.lang.String,java.lang.String> skuImages)
Deprecated. 

Sets a map of key/value pairs where the key is a string for the name of an image and the value is a string to the URL of the image. This is used to display images while browsing the sku. This method is deprecated. Use setSkuMedia instead.


getSkuMedia

java.util.Map<java.lang.String,Media> getSkuMedia()
Returns a map of key/value pairs where the key is a string for the name of a media object and the value is a media object.


setSkuMedia

void setSkuMedia(java.util.Map<java.lang.String,Media> skuMedia)
Sets a map of key/value pairs where the key is a string for the name of a media object and the value is an object of type Media.


getAllParentProducts

java.util.List<Product> getAllParentProducts()
Get all the parent products since a sku can exist in multiple


setAllParentProducts

void setAllParentProducts(java.util.List<Product> allParentProducts)
Set all the parent products since a sku can exist in multiple


isActive

boolean isActive(Product product,
                 Category category)

getSkuAttributes

java.util.List<SkuAttribute> getSkuAttributes()

setSkuAttributes

void setSkuAttributes(java.util.List<SkuAttribute> skuAttributes)


Copyright © 2012. All Rights Reserved.