Class SearchCatalogAccessPolicyContext
java.lang.Object
com.broadleafcommerce.search.api.domain.accesspolicy.SearchCatalogAccessPolicyContext
- All Implemented Interfaces:
Serializable
Context to evaluate against the
matchRules
of
the resolved CatalogAccessPolicies
.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The hierarchy of accounts, from the root account to the account member's account.The ID of the account the user belongs to.Additional, arbitrary request attributes.The list of ids that correspond to customer segments that this customer is a part of.getEmail()
The user's email.The user's full name.The user's phone number.The ID of the root account the account member belongs to.The user's id.The user's username.int
hashCode()
boolean
Defines whether the user is registered.void
setAccountHierarchy
(List<String> accountHierarchy) The hierarchy of accounts, from the root account to the account member's account.void
setAccountId
(String accountId) The ID of the account the user belongs to.void
setAttributes
(Map<String, Object> attributes) Additional, arbitrary request attributes.void
setCustomerSegmentIds
(Set<String> customerSegmentIds) The list of ids that correspond to customer segments that this customer is a part of.void
The user's email.void
setFullName
(String fullName) The user's full name.void
setPhoneNumber
(String phoneNumber) The user's phone number.void
setRegistered
(boolean registered) Defines whether the user is registered.void
setRootAccountId
(String rootAccountId) The ID of the root account the account member belongs to.void
The user's id.void
setUsername
(String username) The user's username.toString()
-
Constructor Details
-
SearchCatalogAccessPolicyContext
public SearchCatalogAccessPolicyContext()
-
-
Method Details
-
getUserId
The user's id.- Returns:
- The user's id.
-
getUsername
The user's username.- Returns:
- The user's username.
-
getEmail
The user's email.- Returns:
- The user's email.
-
getPhoneNumber
The user's phone number.- Returns:
- The user's phone number.
-
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
The ID of the account the user belongs to.- Returns:
- The ID of the account of the user.
-
getRootAccountId
The ID of the root account the account member belongs to.- Returns:
- The ID of the root account of the account member.
-
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
Additional, arbitrary request attributes.- Returns:
- Additional, arbitrary request attributes.
-
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
The user's id.- Parameters:
userId
- The user's id.
-
setUsername
The user's username.- Parameters:
username
- The user's username.
-
setEmail
The user's email.- Parameters:
username
- The user's email.
-
setPhoneNumber
The user's phone number.- Parameters:
phoneNumber
- The user's phone number.
-
setFullName
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
The ID of the account the user belongs to.- Parameters:
accountId
- The ID of the account of the user.
-
setRootAccountId
The ID of the root account the account member belongs to.- Parameters:
rootAccountId
- The ID of the root account of the account member.
-
setAccountHierarchy
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
Additional, arbitrary request attributes.- Parameters:
additionalAttributes
- Additional, arbitrary request attributes.
-
setCustomerSegmentIds
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
-
canEqual
-
hashCode
public int hashCode() -
toString
-