Class DefaultUserResolver
java.lang.Object
com.broadleafcommerce.notification.service.DefaultUserResolver
- All Implemented Interfaces:
UserResolver
- Author:
- Susana Cruz (susanaccruz)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultUserResolver(AdminUserProvider adminUserProvider, AccountMemberProvider accountMemberProvider, CustomerProvider customerProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionfetchAccountMember(@NonNull String accountId, @NonNull String accountMemberId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read an account member by IDfetchAccountMembersByEmails(@NonNull String accountId, @NonNull List<String> emails, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read account members by emailfetchAccountMembersByIds(@NonNull String accountId, @NonNull List<String> ids, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read account members by accountIdfetchAdminUser(@NonNull String adminUserId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read an admin user by the supplied IDfetchCustomer(@NonNull String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read a customer by IDfetchCustomers(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read all customersprotected AccountMemberProviderprotected AdminUserProviderprotected CustomerProviderprotected com.broadleafcommerce.common.extension.TypeFactory
-
Constructor Details
-
DefaultUserResolver
public DefaultUserResolver(AdminUserProvider adminUserProvider, AccountMemberProvider accountMemberProvider, CustomerProvider customerProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
fetchAdminUser
public Optional<AdminUser> fetchAdminUser(@NonNull @NonNull String adminUserId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:UserResolverRead an admin user by the supplied ID- Specified by:
fetchAdminUserin interfaceUserResolver- Parameters:
adminUserId- The admin user IDcontextInfo- The context- Returns:
- An account Mono
-
fetchCustomers
public Optional<List<Customer>> fetchCustomers(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:UserResolverRead all customers- Specified by:
fetchCustomersin interfaceUserResolver- Parameters:
contextInfo- The context- Returns:
- The customer, if found
-
fetchCustomer
public Optional<Customer> fetchCustomer(@NonNull @NonNull String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:UserResolverRead a customer by ID- Specified by:
fetchCustomerin interfaceUserResolver- Parameters:
customerId- The customer IDcontextInfo- The context- Returns:
- The customer, if found
-
fetchAccountMembersByIds
public List<AccountMember> fetchAccountMembersByIds(@NonNull @NonNull String accountId, @NonNull @NonNull List<String> ids, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:UserResolverRead account members by accountId- Specified by:
fetchAccountMembersByIdsin interfaceUserResolver- Parameters:
accountId- The account IDids- The member IDs to filter bycontextInfo- The context- Returns:
- The list of account members, if found
-
fetchAccountMembersByEmails
public List<AccountMember> fetchAccountMembersByEmails(@NonNull @NonNull String accountId, @NonNull @NonNull List<String> emails, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:UserResolverRead account members by email- Specified by:
fetchAccountMembersByEmailsin interfaceUserResolver- Parameters:
accountId- The account IDemails- The emails to filter bycontextInfo- The context- Returns:
- The list of account members, if found
-
fetchAccountMember
public Optional<AccountMember> fetchAccountMember(@NonNull @NonNull String accountId, @NonNull @NonNull String accountMemberId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:UserResolverRead an account member by ID- Specified by:
fetchAccountMemberin interfaceUserResolver- Parameters:
accountId- The account IDaccountMemberId- The account member IDcontextInfo- The context- Returns:
- The account member, if found
-
getAdminUserProvider
-
getAccountMemberProvider
-
getCustomerProvider
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-