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

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

    • CustomerRef

      public CustomerRef()
  • Method Details

    • isAuthenticated

      public boolean isAuthenticated()
      Whether the customer is authenticated.
      Returns:
      Whether the customer is authenticated
    • getCustomerSegmentIds

      public List<String> getCustomerSegmentIds()
      A list of customer segment ids in this context.
      Returns:
      List of ids of the customer segments the customer belongs to
    • getUserId

      public String getUserId()
      The user's id.
      Returns:
      The user's id.
    • getUsername

      public String getUsername()
      The user's username.
      Returns:
      The user's username.
    • getAccountId

      public String getAccountId()
      The ID of the account the user belongs to.
      Returns:
      The ID of the account of the user.
    • setAuthenticated

      public void setAuthenticated(boolean authenticated)
      Whether the customer is authenticated.
      Parameters:
      authenticated - Whether the customer is authenticated
    • setCustomerSegmentIds

      public void setCustomerSegmentIds(List<String> customerSegmentIds)
      A list of customer segment ids in this context.
      Parameters:
      customerSegmentIds - Ids of the customer segments the customer belongs to
    • setUserId

      public void setUserId(String userId)
      The user's id.
      Parameters:
      userId - The user's id.
    • setUsername

      public void setUsername(String username)
      The user's username.
      Parameters:
      username - The user's username.
    • setAccountId

      public void setAccountId(String accountId)
      The ID of the account the user belongs to.
      Parameters:
      accountId - The ID of the account of the user.
    • 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