Class AttributeChoiceValue
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.domain.AttributeChoiceValue
-
- All Implemented Interfaces:
Serializable
public class AttributeChoiceValue extends Object implements Serializable
A single value within aAttributeChoice
.- Author:
- Chad Harchar (charchar)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AttributeChoiceValue()
AttributeChoiceValue(String label, String value, Map<String,Object> attributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttribute(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>
getAttribute()
Return any additional attributes passed in the request not matching any defined properties.Map<String,Object>
getAttributes()
Map holding any additional attributes passed in the request not matching any defined properties.String
getLabel()
What the customer sees for display.String
getValue()
The value stored as an item attribute or cart attribute based on what the user selects.int
hashCode()
void
setAttributes(Map<String,Object> attributes)
Map holding any additional attributes passed in the request not matching any defined properties.void
setLabel(String label)
What the customer sees for display.void
setValue(String value)
The value stored as an item attribute or cart attribute based on what the user selects.String
toString()
-
-
-
Method Detail
-
addAttribute
public void addAttribute(String name, Object value)
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
public Map<String,Object> 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
public String 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 fromvalue
which is what is added to the cart- Returns:
- the customer-facing display. If null, the
getValue()
should be used for display
-
getValue
public String 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
public Map<String,Object> getAttributes()
Map holding any additional attributes passed in the request not matching any defined properties.
-
setLabel
public void setLabel(String label)
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 fromvalue
which is what is added to the cart- Parameters:
label
- customer-facing display of this value
-
setValue
public void setValue(String value)
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
public void setAttributes(Map<String,Object> attributes)
Map holding any additional attributes passed in the request not matching any defined properties.
-
canEqual
protected boolean canEqual(Object other)
-
-