Class SearchCatalogAccessPolicyContext

java.lang.Object
com.broadleafcommerce.search.api.domain.accesspolicy.SearchCatalogAccessPolicyContext
All Implemented Interfaces:
Serializable

public class SearchCatalogAccessPolicyContext extends Object implements Serializable
Context to evaluate against the matchRules of the resolved CatalogAccessPolicies.
See Also:
  • Constructor Details

    • SearchCatalogAccessPolicyContext

      public SearchCatalogAccessPolicyContext()
  • Method Details

    • 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.
    • getEmail

      public String getEmail()
      The user's email.
      Returns:
      The user's email.
    • getPhoneNumber

      public String getPhoneNumber()
      The user's phone number.
      Returns:
      The user's phone number.
    • getFullName

      public String getFullName()
      The user's full name.
      Returns:
      The user's full name.
    • isRegistered

      public boolean isRegistered()
      Defines whether the user is registered. If false, then the user is considered anonymous.
      Returns:
      Whether the user is registered.
    • getAccountId

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

      public String getRootAccountId()
      The ID of the root account the account member belongs to.
      Returns:
      The ID of the root account of the account member.
    • getAccountHierarchy

      public List<String> getAccountHierarchy()
      The hierarchy of accounts, from the root account to the account member's account.

      For example, if we have this account setup, rootAcct -> subAcct (child of rootAcct) -> subSubAcct (child of subAcct), this field would be [rootAcct, subAcct, subSubAcct]. This is useful to have queries include sub-accounts.

      Returns:
      The hierarchy of accounts, from the root account to the account member's account.
    • getAttributes

      public Map<String,Object> getAttributes()
      Additional, arbitrary request attributes.
      Returns:
      Additional, arbitrary request attributes.
    • getCustomerSegmentIds

      public Set<String> getCustomerSegmentIds()
      The list of ids that correspond to customer segments that this customer is a part of.
      Returns:
      The list of ids that correspond to customer segments that this customer is a part of.
    • 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.
    • setEmail

      public void setEmail(String email)
      The user's email.
      Parameters:
      username - The user's email.
    • setPhoneNumber

      public void setPhoneNumber(String phoneNumber)
      The user's phone number.
      Parameters:
      phoneNumber - The user's phone number.
    • setFullName

      public void setFullName(String fullName)
      The user's full name.
      Parameters:
      fullName - The user's full name.
    • setRegistered

      public void setRegistered(boolean registered)
      Defines whether the user is registered. If false, then the user is considered anonymous.
      Parameters:
      registered - Whether the user is registered.
    • 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.
    • setRootAccountId

      public void setRootAccountId(String rootAccountId)
      The ID of the root account the account member belongs to.
      Parameters:
      rootAccountId - The ID of the root account of the account member.
    • setAccountHierarchy

      public void setAccountHierarchy(List<String> accountHierarchy)
      The hierarchy of accounts, from the root account to the account member's account.

      For example, if we have this account setup, rootAcct -> subAcct (child of rootAcct) -> subSubAcct (child of subAcct), this field would be [rootAcct, subAcct, subSubAcct]. This is useful to have queries include sub-accounts.

      Parameters:
      accountHierarchy - The hierarchy of accounts, from the root account to the account member's account.
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Additional, arbitrary request attributes.
      Parameters:
      additionalAttributes - Additional, arbitrary request attributes.
    • setCustomerSegmentIds

      public void setCustomerSegmentIds(Set<String> customerSegmentIds)
      The list of ids that correspond to customer segments that this customer is a part of.
      Parameters:
      customerSegmentIds - The list of ids that correspond to customer segments that this customer is a part of.
    • 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