Class DefaultUserTargetGenerationService
java.lang.Object
com.broadleafcommerce.cartoperation.service.provider.external.security.DefaultUserTargetGenerationService
- All Implemented Interfaces:
UserTargetGenerationService
public class DefaultUserTargetGenerationService
extends Object
implements UserTargetGenerationService
- Author:
- Chad Harchar (charchar)
-
Constructor Summary
ConstructorDescriptionDefaultUserTargetGenerationService
(com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils) -
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<UserTarget>
protected Set<UserTarget>
protected Optional<UserTarget>
protected Optional<UserTarget>
Create and returnuser targets
for use in pricing and offer provider requests.gatherUserTargetsFromContextAndAuth
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Create and returnuser targets
for use in pricing and offer provider requests.protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils
protected com.broadleafcommerce.common.extension.TypeFactory
-
Constructor Details
-
DefaultUserTargetGenerationService
public DefaultUserTargetGenerationService(com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils)
-
-
Method Details
-
gatherUserTargetsFromAuthentication
Description copied from interface:UserTargetGenerationService
Create and returnuser targets
for use in pricing and offer provider requests. Uses the current authentication token to determine principal and details.- Specified by:
gatherUserTargetsFromAuthentication
in interfaceUserTargetGenerationService
- Returns:
- set of
user targets
for the current security context.
-
gatherUserTargetsFromContextAndAuth
public Set<UserTarget> gatherUserTargetsFromContextAndAuth(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:UserTargetGenerationService
Create and returnuser targets
for use in pricing and offer provider requests. Uses context information to determine principal and details, otherwise uses the current authentication token.- Specified by:
gatherUserTargetsFromContextAndAuth
in interfaceUserTargetGenerationService
- Returns:
- set of
user targets
for the current context.
-
gatherCustomerTarget
-
gatherCustomerAccountIdTarget
-
gatherCustomerUsernameTarget
-
gatherCustomerSegmentTargets
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getAuthenticationUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils()
-