Class AttributeChoiceValue
java.lang.Object
com.broadleafcommerce.cartoperation.domain.AttributeChoiceValue
- All Implemented Interfaces:
Serializable
A single value within a
AttributeChoice.- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String name, Object value) Takes in any additional attributes passed in the request not matching any defined properties.protected booleanbooleanReturn any additional attributes passed in the request not matching any defined properties.Map holding any additional attributes passed in the request not matching any defined properties.getLabel()What the customer sees for display.getValue()The value stored as an item attribute or cart attribute based on what the user selects.inthashCode()voidsetAttributes(Map<String, Object> attributes) Map holding any additional attributes passed in the request not matching any defined properties.voidWhat the customer sees for display.voidThe value stored as an item attribute or cart attribute based on what the user selects.toString()
-
Constructor Details
-
AttributeChoiceValue
public AttributeChoiceValue() -
AttributeChoiceValue
-
-
Method Details
-
addAttribute
Takes in any additional attributes passed in the request not matching any defined properties.- Parameters:
name- Name of the additional attributevalue- Value of the additional attribute
-
getAttribute
Return any additional attributes passed in the request not matching any defined properties.- Returns:
- any additional attributes passed in the request not matching any defined properties.
-
getLabel
What the customer sees for display. For example, text in the case of sizes or a hex value in the case of colors. Can diverge fromvaluewhich is what is added to the cart- Returns:
- the customer-facing display. If null, the
getValue()should be used for display
-
getValue
The value stored as an item attribute or cart attribute based on what the user selects.- Returns:
- the value that should be stored as an item/cart attribute when the user selects this choice
-
getAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
setLabel
What the customer sees for display. For example, text in the case of sizes or a hex value in the case of colors. Can diverge fromvaluewhich is what is added to the cart- Parameters:
label- customer-facing display of this value
-
setValue
The value stored as an item attribute or cart attribute based on what the user selects.- Parameters:
value- what will be stored as an item/cart attribute
-
setAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-