java.lang.Object
com.broadleafcommerce.content.domain.commerce.context.ContentContext
All Implemented Interfaces:
Serializable

public class ContentContext extends Object implements Serializable
DTO for holding data relevant for determining which content applies to an API request.
Author:
Jon Fleschler (jfleschler)
See Also:
  • Field Details

  • Constructor Details

    • ContentContext

      public ContentContext()
  • Method Details

    • 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 attribute
      value - Value of the additional attribute
    • getLocale

      public String getLocale()
      The Locale used in this context
    • getCustomer

      public CustomerRef getCustomer()
      The CustomerRef used in this context
    • getAttributes

      public Map<String,Object> getAttributes()
      Additional, unspecified attributes.
    • setLocale

      public void setLocale(String locale)
      The Locale used in this context
    • setCustomer

      public void setCustomer(CustomerRef customer)
      The CustomerRef used in this context
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Additional, unspecified attributes.
    • 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