Enum DefaultProductType
- java.lang.Object
-
- java.lang.Enum<DefaultProductType>
-
- com.broadleafcommerce.cartoperation.domain.type.DefaultProductType
-
- All Implemented Interfaces:
Serializable
,Comparable<DefaultProductType>
public enum DefaultProductType extends Enum<DefaultProductType>
The possible types of targets aProduct
can have.- Author:
- Bongani Mbigi (bongani-m)
- See Also:
Product
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BUNDLE
Denotes that this product is meant to represent a simple bundle of other products, with each bundle item represented as anIncludedProduct
.MERCHANDISING_PRODUCT
SELECTOR
Denotes a product that serves as a container for a singleItem Choice
and which can be used to produce a promotional landing page.STANDARD
Denotes a simple product which has no variants or complex configuration such as a Hot Sauce.VARIANT_BASED
Denotes a configurable product that hasVariants
determined byProductOptions
like color and size for a T-Shirt.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isBundleProduct(String productType)
static boolean
isMerchandisingProduct(String productType)
static boolean
isSelectorProduct(String productType)
static boolean
isStandardProduct(String productType)
static boolean
isVariantBasedProduct(String productType)
static DefaultProductType
valueOf(String name)
Returns the enum constant of this type with the specified name.static DefaultProductType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STANDARD
public static final DefaultProductType STANDARD
Denotes a simple product which has no variants or complex configuration such as a Hot Sauce. Standard products may be added to the cart on their own or they may have add-ons that get added with them.
-
VARIANT_BASED
public static final DefaultProductType VARIANT_BASED
Denotes a configurable product that hasVariants
determined byProductOptions
like color and size for a T-Shirt. It is theVariants
which are added to the cart after the user selects the options.
-
SELECTOR
public static final DefaultProductType SELECTOR
Denotes a product that serves as a container for a singleItem Choice
and which can be used to produce a promotional landing page. The selector product does not have a related price or inventory, and cannot be purchased. Instead, only the selected item from its Item Choice can be purchased.
-
BUNDLE
public static final DefaultProductType BUNDLE
Denotes that this product is meant to represent a simple bundle of other products, with each bundle item represented as anIncludedProduct
.
-
MERCHANDISING_PRODUCT
public static final DefaultProductType MERCHANDISING_PRODUCT
-
-
Method Detail
-
values
public static DefaultProductType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DefaultProductType c : DefaultProductType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DefaultProductType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isStandardProduct
public static boolean isStandardProduct(String productType)
-
isVariantBasedProduct
public static boolean isVariantBasedProduct(String productType)
-
isBundleProduct
public static boolean isBundleProduct(String productType)
-
isSelectorProduct
public static boolean isSelectorProduct(String productType)
-
isMerchandisingProduct
public static boolean isMerchandisingProduct(String productType)
-
-