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 Details

    • CartFieldMapping

      public CartFieldMapping()
  • Method Details

    • addAttribute

      public void addAttribute(String name, Object value)
      Takes in any additional attributes passed in the request not matching any defined properties.
    • getAttribute

      public Map<String,Object> getAttribute()
      Return any additional attributes passed in the request not matching any defined properties.
    • getId

      public String getId()
      The context ID of the mapping.
      Returns:
      the context ID of the mapping
    • getAttributeName

      public String getAttributeName()
      The attribute name where this field's value should be stored in.
    • getValuePath

      public String getValuePath()
      The JsonPath on the Product to retrieve the value(s) which should be stored in that attribute.
    • getAttributes

      public Map<String,Object> 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 of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
      The context ID of the mapping.
      Parameters:
      id - the context ID of the mapping
    • setAttributeName

      public void setAttributeName(String attributeName)
      The attribute name where this field's value should be stored in.
    • setValuePath

      public void setValuePath(String valuePath)
      The JsonPath on the Product to retrieve the value(s) which should be stored in that attribute.
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      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 of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object