Class CartFieldMapping
java.lang.Object
com.broadleafcommerce.catalogbrowse.domain.CartFieldMapping
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,Serializable
public class CartFieldMapping
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
Represents a field that should be included in the mapping from a
Product to a cart item.- Author:
- Jon Fleschler (jfleschler)
- See Also:
-
Constructor Summary
Constructors -
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.The attribute name where this field's value should be stored in.Any additional attributes that a service receiving the request may needcom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.getId()The context ID of the mapping.TheJsonPathon theProductto retrieve the value(s) which should be stored in that attribute.inthashCode()voidsetAttributeName(String attributeName) The attribute name where this field's value should be stored in.voidsetAttributes(Map<String, Object> attributes) Any additional attributes that a service receiving the request may needvoidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidThe context ID of the mapping.voidsetValuePath(String valuePath) TheJsonPathon theProductto retrieve the value(s) which should be stored in that attribute.toString()
-
Constructor Details
-
CartFieldMapping
public CartFieldMapping()
-
-
Method Details
-
addAttribute
Takes in any additional attributes passed in the request not matching any defined properties. -
getAttribute
Return any additional attributes passed in the request not matching any defined properties. -
getId
The context ID of the mapping.- Returns:
- the context ID of the mapping
-
getAttributeName
The attribute name where this field's value should be stored in. -
getValuePath
TheJsonPathon theProductto retrieve the value(s) which should be stored in that attribute. -
getAttributes
Any additional attributes that a service receiving the request may need -
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
setId
The context ID of the mapping.- Parameters:
id- the context ID of the mapping
-
setAttributeName
The attribute name where this field's value should be stored in. -
setValuePath
TheJsonPathon theProductto retrieve the value(s) which should be stored in that attribute. -
setAttributes
Any additional attributes that a service receiving the request may need -
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-