Class DefaultAssistedServiceService
java.lang.Object
de.hybris.platform.assistedserviceservices.impl.DefaultAssistedServiceService
- All Implemented Interfaces:
AssistedServiceService
Default implementation of
AssistedServiceService-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbindCustomerToCart(String customerId, String cartId) Binds customer with provided id to cart if it's anonymous cart.voidbindCustomerToCartWithoutEmulating(String customerId, String cartId) Binds customer with provided id to cart if it's anonymous cart, but not emulate the customer.createNewCustomer(String customerId, String customerName) Creates a new customer by it email and name.protected SortQueryDatacreateSortQueryData(String sortCode, String query) protected Stringprotected StringgenerateRandomChar(SecureRandom random) protected StringgenerateRandomLetter(SecureRandom random, boolean isUpperCase, int length) gerOrderByCode(String orderCode, UserModel customer) Deprecated, for removal: This API element is subject to removal in a future version.getAllStoresForAgent(String agentId) Returns all the stores of the agent.Returns ASM session object with all information about current asm session.Returns the PointOfServiceModel for the logged in as agent.Returns the PointOfServiceModel for the given as agent.protected BaseSiteServicegetCartByCode(String cartCode, UserModel customer) search cart by code and customerprotected CartServicegetCartsForCustomer(CustomerModel customer) Returns collection of a customer's cartsprotected CommerceCartServiceprotected CommonI18NServiceprotected ConfigurationServicegetCustomer(String customerId) returns customerprotected CustomerAccountServicegetCustomers(String searchCriteria, PageableData pageableData) Get list of customers which username or email starts with provided value.protected StringBuildergetCustomerSearchQuery(String searchCriteria) protected FlexibleSearchServicegetLatestModifiedCart(UserModel customer) search for a cart with most resent CartModel::getModifiedtimeprotected ModelServicegetOrderByCode(String orderCode, UserModel customer) search for orderprotected PagedFlexibleSearchServiceprotected SessionServiceprotected TimeServiceprotected UserServicebooleanisAbstractOrderMatchBaseSite(AbstractOrderModel abstractOrderModel) Returns true when provided abstractOrderModel relates to current base sitebooleanisAgentCanLogin(UserModel agent) Verify that if provided user can loginprotected booleanisBelongToCurrentIsolatedSite(UserModel user, BaseSiteModel site) protected booleanprotected booleanisSiteIsolated(BaseSiteModel site) protected StringpasswordShuffle(String password) voidrestoreCartToUser(CartModel cart, UserModel user) Restore cart to provided uservoidsetBaseSiteService(BaseSiteService baseSiteService) voidsetCartService(CartService cartService) voidsetCommerceCartService(CommerceCartService commerceCartService) voidsetCommonI18NService(CommonI18NService commonI18NService) voidsetConfigurationService(ConfigurationService configurationService) voidsetCustomerAccountService(CustomerAccountService customerAccountService) voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService) voidsetModelService(ModelService modelService) voidsetPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService) voidsetSessionService(SessionService sessionService) voidsetTimeService(TimeService timeService) voidsetUserService(UserService userService)
-
Field Details
-
ACTING_USER_UID
- See Also:
-
NOT_ANONYMOUS_CART_ERROR
- See Also:
-
MISSING_CUSTOMER_ID
- See Also:
-
MISSING_CART_ID
- See Also:
-
CUSTOMER_NOT_FOUND
- See Also:
-
UNKNOWN_CART_ERROR
- See Also:
-
-
Constructor Details
-
DefaultAssistedServiceService
public DefaultAssistedServiceService()
-
-
Method Details
-
getCustomers
Description copied from interface:AssistedServiceServiceGet list of customers which username or email starts with provided value.- Specified by:
getCustomersin interfaceAssistedServiceService- Parameters:
searchCriteria- uid or customer's namepageableData- pageable properties- Returns:
- suggested customers
-
getCustomerSearchQuery
-
createSortQueryData
-
bindCustomerToCart
Description copied from interface:AssistedServiceServiceBinds customer with provided id to cart if it's anonymous cart.- Specified by:
bindCustomerToCartin interfaceAssistedServiceService- Parameters:
customerId- This is id of the customer to whom we want to bind a cartcartId- the id of the customer cart to pick up- Throws:
AssistedServiceException- in case cart with given cartId is not anonymous
-
bindCustomerToCartWithoutEmulating
public void bindCustomerToCartWithoutEmulating(String customerId, String cartId) throws AssistedServiceException Description copied from interface:AssistedServiceServiceBinds customer with provided id to cart if it's anonymous cart, but not emulate the customer.- Specified by:
bindCustomerToCartWithoutEmulatingin interfaceAssistedServiceService- Parameters:
customerId- This is id of the customer to whom we want to bind a cartcartId- the id of anonymous cart to be bound with user- Throws:
AssistedServiceException- In case of missing cart with given cartId OR the cart is not anonymous OR missing customer with the customerId
-
getAsmSession
Description copied from interface:AssistedServiceServiceReturns ASM session object with all information about current asm session.- Specified by:
getAsmSessionin interfaceAssistedServiceService- Returns:
- asm session object
-
restoreCartToUser
Description copied from interface:AssistedServiceServiceRestore cart to provided user- Specified by:
restoreCartToUserin interfaceAssistedServiceService- Parameters:
cart- cart model to be restoreduser- user model which cart to be restored
-
createNewCustomer
public CustomerModel createNewCustomer(String customerId, String customerName) throws DuplicateUidException Description copied from interface:AssistedServiceServiceCreates a new customer by it email and name.- Specified by:
createNewCustomerin interfaceAssistedServiceService- Parameters:
customerId- email of to be newly created customer that is used as uidcustomerName- name of to be newly created customer (firstname and surname separated by space symbol)- Returns:
- newly created
CustomerModel - Throws:
DuplicateUidException- in case customer with given customerId already exists
-
getCartsForCustomer
Description copied from interface:AssistedServiceServiceReturns collection of a customer's carts- Specified by:
getCartsForCustomerin interfaceAssistedServiceService- Parameters:
customer- customer model whose carts to be returned- Returns:
- collection of the customer's cart models
-
getCustomer
Description copied from interface:AssistedServiceServicereturns customer- Specified by:
getCustomerin interfaceAssistedServiceService- Parameters:
customerId- email of to be newly created customer that is used as uid- Returns:
- a UserModel for given customerId
-
getLatestModifiedCart
Description copied from interface:AssistedServiceServicesearch for a cart with most resent CartModel::getModifiedtime- Specified by:
getLatestModifiedCartin interfaceAssistedServiceService- Parameters:
customer- customer model whose latest modified cart to be returned- Returns:
- a latest modified cart by given customer
-
gerOrderByCode
@Deprecated(since="6.6", forRemoval=true) public OrderModel gerOrderByCode(String orderCode, UserModel customer) Deprecated, for removal: This API element is subject to removal in a future version.since 6.6, useAssistedServiceService.getOrderByCode(String, UserModel)insteadDescription copied from interface:AssistedServiceServicesearch for order- Specified by:
gerOrderByCodein interfaceAssistedServiceService- Parameters:
orderCode- the order's codecustomer- customer model whose order to be returned- Returns:
- an OrderModel with given code and given customer
-
getOrderByCode
Description copied from interface:AssistedServiceServicesearch for order- Specified by:
getOrderByCodein interfaceAssistedServiceService- Parameters:
orderCode- the order's codecustomer- customer model whose order to be returned- Returns:
- an OrderModel with given code and given customer
-
getCartByCode
Description copied from interface:AssistedServiceServicesearch cart by code and customer- Specified by:
getCartByCodein interfaceAssistedServiceService- Parameters:
cartCode- the cart's codecustomer- customer model whose cart to be returned- Returns:
- a CartModel of cart with given cartCode and customer
-
getAssistedServiceAgentStore
Description copied from interface:AssistedServiceServiceReturns the PointOfServiceModel for the logged in as agent.- Specified by:
getAssistedServiceAgentStorein interfaceAssistedServiceService- Returns:
- PointOfServiceModel
-
getAssistedServiceAgentStore
Description copied from interface:AssistedServiceServiceReturns the PointOfServiceModel for the given as agent.- Specified by:
getAssistedServiceAgentStorein interfaceAssistedServiceService- Parameters:
agent- AS agent- Returns:
- PointOfServiceModel a PointOfServiceModel for the given as agent.
-
getAllStoresForAgent
Description copied from interface:AssistedServiceServiceReturns all the stores of the agent.- Specified by:
getAllStoresForAgentin interfaceAssistedServiceService- Parameters:
agentId- the agent ID- Returns:
- all the stores of the agent.
-
isAbstractOrderMatchBaseSite
Description copied from interface:AssistedServiceServiceReturns true when provided abstractOrderModel relates to current base site- Specified by:
isAbstractOrderMatchBaseSitein interfaceAssistedServiceService- Parameters:
abstractOrderModel- order model- Returns:
- true in case order is made against current
BaseSite
-
isAgentCanLogin
Description copied from interface:AssistedServiceServiceVerify that if provided user can login- Specified by:
isAgentCanLoginin interfaceAssistedServiceService- Parameters:
agent- AS agent- Returns:
- true in case they can login
-
isBelongToMultiSiteGroup
-
isBelongToCurrentIsolatedSite
-
generateInitialPassword
-
generateRandomLetter
-
generateRandomChar
-
passwordShuffle
-
isSiteIsolated
-
getFlexibleSearchService
-
setFlexibleSearchService
-
getCommerceCartService
-
setCommerceCartService
-
getModelService
-
setModelService
-
getCartService
-
setCartService
-
getCustomerAccountService
-
setCustomerAccountService
-
getSessionService
-
setSessionService
-
getCommonI18NService
-
setCommonI18NService
-
getUserService
-
setUserService
-
getBaseSiteService
-
setBaseSiteService
-
getPagedFlexibleSearchService
-
setPagedFlexibleSearchService
-
getTimeService
-
setTimeService
-
getConfigurationService
-
setConfigurationService
-
AssistedServiceService.getOrderByCode(String, UserModel)instead