public class DefaultAssistedServiceService extends java.lang.Object implements AssistedServiceService
AssistedServiceService| Constructor and Description |
|---|
DefaultAssistedServiceService() |
| Modifier and Type | Method and Description |
|---|---|
void |
bindCustomerToCart(java.lang.String customerId,
java.lang.String cartId)
Binds customer with provided id to cart if it's anonymous cart.
|
CustomerModel |
createNewCustomer(java.lang.String customerId,
java.lang.String customerName)
Creates a new customer by it email and name.
|
protected SortQueryData |
createSortQueryData(java.lang.String sortCode,
java.lang.String query) |
OrderModel |
gerOrderByCode(java.lang.String orderCode,
UserModel customer)
Deprecated.
since 6.6, use
AssistedServiceService.getOrderByCode(String, UserModel) instead |
AssistedServiceSession |
getAsmSession()
Returns ASM session object with all information about current asm session.
|
PointOfServiceModel |
getAssistedServiceAgentStore()
Returns the PointOfServiceModel for the logged in as agent.
|
PointOfServiceModel |
getAssistedServiceAgentStore(UserModel agent)
Returns the PointOfServiceModel for the given as agent.
|
protected BaseSiteService |
getBaseSiteService() |
CartModel |
getCartByCode(java.lang.String cartCode,
UserModel customer)
search cart by code and customer
|
protected CartService |
getCartService() |
java.util.Collection<CartModel> |
getCartsForCustomer(CustomerModel customer)
Returns collection of a customer's carts
|
protected CommerceCartService |
getCommerceCartService() |
protected CommonI18NService |
getCommonI18NService() |
UserModel |
getCustomer(java.lang.String customerId)
returns customer
|
protected CustomerAccountService |
getCustomerAccountService() |
SearchPageData<CustomerModel> |
getCustomers(java.lang.String searchCriteria,
PageableData pageableData)
Get list of customers which username or email starts with provided value.
|
protected java.lang.StringBuilder |
getCustomerSearchQuery(java.lang.String searchCriteria) |
protected FlexibleSearchService |
getFlexibleSearchService() |
CartModel |
getLatestModifiedCart(UserModel customer)
search for a cart with most resent CartModel::getModifiedtime
|
protected ModelService |
getModelService() |
OrderModel |
getOrderByCode(java.lang.String orderCode,
UserModel customer)
search for order
|
protected PagedFlexibleSearchService |
getPagedFlexibleSearchService() |
protected SessionService |
getSessionService() |
protected TimeService |
getTimeService() |
protected UserService |
getUserService() |
boolean |
isAbstractOrderMatchBaseSite(AbstractOrderModel abstractOrderModel)
Returns true when provided abstractOrderModel relates to current base site
|
void |
restoreCartToUser(CartModel cart,
UserModel user)
Restore cart to provided user
|
void |
setBaseSiteService(BaseSiteService baseSiteService) |
void |
setCartService(CartService cartService) |
void |
setCommerceCartService(CommerceCartService commerceCartService) |
void |
setCommonI18NService(CommonI18NService commonI18NService) |
void |
setCustomerAccountService(CustomerAccountService customerAccountService) |
void |
setFlexibleSearchService(FlexibleSearchService flexibleSearchService) |
void |
setModelService(ModelService modelService) |
void |
setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService) |
void |
setSessionService(SessionService sessionService) |
void |
setTimeService(TimeService timeService) |
void |
setUserService(UserService userService) |
public SearchPageData<CustomerModel> getCustomers(java.lang.String searchCriteria, PageableData pageableData)
AssistedServiceServicegetCustomers in interface AssistedServiceServicesearchCriteria - uid or customer's namepageableData - pageable propertiesprotected java.lang.StringBuilder getCustomerSearchQuery(java.lang.String searchCriteria)
protected SortQueryData createSortQueryData(java.lang.String sortCode, java.lang.String query)
public void bindCustomerToCart(java.lang.String customerId,
java.lang.String cartId)
throws AssistedServiceException
AssistedServiceServicebindCustomerToCart in interface AssistedServiceServicecustomerId - This is id of the customer to whom we want to bind a cartcartId - the id of the customer cart to pick upAssistedServiceException - in case cart with given cartId is not anonymouspublic AssistedServiceSession getAsmSession()
AssistedServiceServicegetAsmSession in interface AssistedServiceServicepublic void restoreCartToUser(CartModel cart, UserModel user)
AssistedServiceServicerestoreCartToUser in interface AssistedServiceServicecart - cart model to be restoreduser - user model which cart to be restoredpublic CustomerModel createNewCustomer(java.lang.String customerId, java.lang.String customerName) throws DuplicateUidException
AssistedServiceServicecreateNewCustomer in interface AssistedServiceServicecustomerId - 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)CustomerModelDuplicateUidException - in case customer with given customerId already existspublic java.util.Collection<CartModel> getCartsForCustomer(CustomerModel customer)
AssistedServiceServicegetCartsForCustomer in interface AssistedServiceServicecustomer - customer model whose carts to be returnedpublic UserModel getCustomer(java.lang.String customerId)
AssistedServiceServicegetCustomer in interface AssistedServiceServicecustomerId - email of to be newly created customer that is used as uidpublic CartModel getLatestModifiedCart(UserModel customer)
AssistedServiceServicegetLatestModifiedCart in interface AssistedServiceServicecustomer - customer model whose latest modified cart to be returned@Deprecated public OrderModel gerOrderByCode(java.lang.String orderCode, UserModel customer)
AssistedServiceService.getOrderByCode(String, UserModel) insteadAssistedServiceServicegerOrderByCode in interface AssistedServiceServiceorderCode - the order's codecustomer - customer model whose order to be returnedpublic OrderModel getOrderByCode(java.lang.String orderCode, UserModel customer)
AssistedServiceServicegetOrderByCode in interface AssistedServiceServiceorderCode - the order's codecustomer - customer model whose order to be returnedpublic CartModel getCartByCode(java.lang.String cartCode, UserModel customer)
AssistedServiceServicegetCartByCode in interface AssistedServiceServicecartCode - the cart's codecustomer - customer model whose cart to be returnedpublic PointOfServiceModel getAssistedServiceAgentStore()
AssistedServiceServicegetAssistedServiceAgentStore in interface AssistedServiceServicepublic PointOfServiceModel getAssistedServiceAgentStore(UserModel agent)
AssistedServiceServicegetAssistedServiceAgentStore in interface AssistedServiceServiceagent - AS agentpublic boolean isAbstractOrderMatchBaseSite(AbstractOrderModel abstractOrderModel)
AssistedServiceServiceisAbstractOrderMatchBaseSite in interface AssistedServiceServiceabstractOrderModel - order modelBaseSiteprotected FlexibleSearchService getFlexibleSearchService()
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
protected CommerceCartService getCommerceCartService()
public void setCommerceCartService(CommerceCartService commerceCartService)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
protected CartService getCartService()
public void setCartService(CartService cartService)
protected CustomerAccountService getCustomerAccountService()
public void setCustomerAccountService(CustomerAccountService customerAccountService)
protected SessionService getSessionService()
public void setSessionService(SessionService sessionService)
protected CommonI18NService getCommonI18NService()
public void setCommonI18NService(CommonI18NService commonI18NService)
protected UserService getUserService()
public void setUserService(UserService userService)
protected BaseSiteService getBaseSiteService()
public void setBaseSiteService(BaseSiteService baseSiteService)
protected PagedFlexibleSearchService getPagedFlexibleSearchService()
public void setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)
protected TimeService getTimeService()
public void setTimeService(TimeService timeService)
Copyright © 2018 SAP SE. All Rights Reserved.