Interface AssistedServiceService
-
- All Known Implementing Classes:
DefaultAssistedServiceService
public interface AssistedServiceServiceService layer interface for Assisted Service methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidbindCustomerToCart(java.lang.String customerId, java.lang.String cartId)Binds customer with provided id to cart if it's anonymous cart.CustomerModelcreateNewCustomer(java.lang.String customerId, java.lang.String customerName)Creates a new customer by it email and name.OrderModelgerOrderByCode(java.lang.String orderCode, UserModel customer)Deprecated, for removal: This API element is subject to removal in a future version.since 6.6, usegetOrderByCode(String, UserModel)insteadAssistedServiceSessiongetAsmSession()Returns ASM session object with all information about current asm session.PointOfServiceModelgetAssistedServiceAgentStore()Returns the PointOfServiceModel for the logged in as agent.PointOfServiceModelgetAssistedServiceAgentStore(UserModel agent)Returns the PointOfServiceModel for the given as agent.CartModelgetCartByCode(java.lang.String cartCode, UserModel customer)search cart by code and customerjava.util.Collection<CartModel>getCartsForCustomer(CustomerModel customer)Returns collection of a customer's cartsUserModelgetCustomer(java.lang.String customerId)returns customerSearchPageData<CustomerModel>getCustomers(java.lang.String searchCriteria, PageableData pageableData)Get list of customers which username or email starts with provided value.CartModelgetLatestModifiedCart(UserModel customer)search for a cart with most resent CartModel::getModifiedtimeOrderModelgetOrderByCode(java.lang.String orderCode, UserModel customer)search for orderbooleanisAbstractOrderMatchBaseSite(AbstractOrderModel abstractOrderModel)Returns true when provided abstractOrderModel relates to current base sitevoidrestoreCartToUser(CartModel cart, UserModel user)Restore cart to provided user
-
-
-
Method Detail
-
bindCustomerToCart
void bindCustomerToCart(java.lang.String customerId, java.lang.String cartId) throws AssistedServiceExceptionBinds customer with provided id to cart if it's anonymous cart.- 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
-
createNewCustomer
CustomerModel createNewCustomer(java.lang.String customerId, java.lang.String customerName) throws DuplicateUidException
Creates a new customer by it email and name.- 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
java.util.Collection<CartModel> getCartsForCustomer(CustomerModel customer)
Returns collection of a customer's carts- Parameters:
customer- customer model whose carts to be returned- Returns:
- collection of the customer's cart models
-
getCustomer
UserModel getCustomer(java.lang.String customerId)
returns customer- Parameters:
customerId- email of to be newly created customer that is used as uid- Returns:
- a UserModel for given customerId
-
getLatestModifiedCart
CartModel getLatestModifiedCart(UserModel customer)
search for a cart with most resent CartModel::getModifiedtime- 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) OrderModel gerOrderByCode(java.lang.String orderCode, UserModel customer)Deprecated, for removal: This API element is subject to removal in a future version.since 6.6, usegetOrderByCode(String, UserModel)insteadsearch for order- Parameters:
orderCode- the order's codecustomer- customer model whose order to be returned- Returns:
- an OrderModel with given code and given customer
-
getOrderByCode
OrderModel getOrderByCode(java.lang.String orderCode, UserModel customer)
search for order- Parameters:
orderCode- the order's codecustomer- customer model whose order to be returned- Returns:
- an OrderModel with given code and given customer
-
isAbstractOrderMatchBaseSite
boolean isAbstractOrderMatchBaseSite(AbstractOrderModel abstractOrderModel)
Returns true when provided abstractOrderModel relates to current base site- Parameters:
abstractOrderModel- order model- Returns:
- true in case order is made against current
BaseSite
-
getCartByCode
CartModel getCartByCode(java.lang.String cartCode, UserModel customer)
search cart by code and customer- Parameters:
cartCode- the cart's codecustomer- customer model whose cart to be returned- Returns:
- a CartModel of cart with given cartCode and customer
-
getAsmSession
AssistedServiceSession getAsmSession()
Returns ASM session object with all information about current asm session.- Returns:
- asm session object
-
restoreCartToUser
void restoreCartToUser(CartModel cart, UserModel user)
Restore cart to provided user- Parameters:
cart- cart model to be restoreduser- user model which cart to be restored
-
getAssistedServiceAgentStore
PointOfServiceModel getAssistedServiceAgentStore()
Returns the PointOfServiceModel for the logged in as agent.- Returns:
- PointOfServiceModel
-
getAssistedServiceAgentStore
PointOfServiceModel getAssistedServiceAgentStore(UserModel agent)
Returns the PointOfServiceModel for the given as agent.- Parameters:
agent- AS agent- Returns:
- PointOfServiceModel a PointOfServiceModel for the given as agent.
-
getCustomers
SearchPageData<CustomerModel> getCustomers(java.lang.String searchCriteria, PageableData pageableData)
Get list of customers which username or email starts with provided value.- Parameters:
searchCriteria- uid or customer's namepageableData- pageable properties- Returns:
- suggested customers
-
-