Interface AssistedServiceFacade
- All Known Implementing Classes:
DefaultAssistedServiceFacade
public interface AssistedServiceFacade
Facade interface for assisted service functionality.
-
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.createCustomer(String customerId, String customerName) Creates a new customer by it email and name.voidPersonify customer based on customer stored on login step and current session cart.voidemulateCustomer(String customerId, String cartId) Adds a customer and/or cart to the current session.voidemulateCustomer(String customerId, String cartId, String orderId) Adds provided customer, cart or an order to the current session.Returns ASM session object with all information about current asm session.Returns assisted service attributes map for page model.intReturns timeout for assisted service agent session in seconds.intReturns timer value (in seconds) for assisted service agent session, that displays inside widget.getCartListForCustomer(CustomerModel customer) Returns collection of a customer's cartsgetCustomerByOrder(String orderId) Get the order's customer using orderFacade.getOrderDetailsForCodegetCustomers(String searchTerm, PageableData pageableData) Get list of customers which username or email starts with provided value.getCustomerSuggestions(String searchTerm) Get list of customers which username or email starts with provided value.default List<PointOfServiceData>getStoresByAgentId(String agentId) Returns the agent store listgetSuggestedCustomerData(String username) Validate session and get list of customers which username or email starts with provided value.getSuggestedCustomerList(String username) Deprecated, for removal: This API element is subject to removal in a future version.booleanChecks if there is ASM information in the current session or no, this will be used by Session Restriction mainlybooleanWhether or not Assisted Service module is launched.voidStarts the Assisted Service Mode.voidloginAssistedServiceAgent(String username, String password) Logs in Assisted Service agent using provided credentials.default voidloginAssistedServiceAgentSAML(String username, LoginToken token) Logs in Assisted Service agent using provided SAML credentials.voidloginAssistedServiceAgentSAML(String username, String password) Logs in Assisted Service agent using provided SAML credentials.voidLogs out Assisted Service agent by removing session attribute.voidEnds the Assisted Service Mode.voidRemove customer and/or cart from the current session.
-
Method Details
-
emulateCustomer
Adds a customer and/or cart to the current session.- Parameters:
customerId- id to identify the customer by (usually email address)cartId- the id of the customer cart to pick up- Throws:
AssistedServiceException- In case of: 1) blank parameters 2) bad credentials, 3) AS agent isn't logged in yet 4) AS agent trying to emulate himself
-
emulateCustomer
void emulateCustomer(String customerId, String cartId, String orderId) throws AssistedServiceException Adds provided customer, cart or an order to the current session.- Parameters:
customerId- id to identify the customer by (usually email address)cartId- the id of the customer cart to pick uporderId- the id of the customer order to pick up- Throws:
AssistedServiceException- In case of: 1) both customerId and cartId parameters blank 2) bad credentials, 3) AS agent isn't logged in yet 4) AS agent trying to emulate himself
-
stopEmulateCustomer
void stopEmulateCustomer()Remove customer and/or cart from the current session. -
launchAssistedServiceMode
void launchAssistedServiceMode()Starts the Assisted Service Mode. -
quitAssistedServiceMode
void quitAssistedServiceMode()Ends the Assisted Service Mode. -
loginAssistedServiceAgent
Logs in Assisted Service agent using provided credentials.- Parameters:
username- uidpassword- password- Throws:
AssistedServiceException- In case of bad credentials
-
loginAssistedServiceAgentSAML
void loginAssistedServiceAgentSAML(String username, String password) throws AssistedServiceException Logs in Assisted Service agent using provided SAML credentials.- Parameters:
username- uidpassword- password- Throws:
AssistedServiceException- In case of bad credentials
-
loginAssistedServiceAgentSAML
default void loginAssistedServiceAgentSAML(String username, LoginToken token) throws AssistedServiceException Logs in Assisted Service agent using provided SAML credentials.- Parameters:
username- uidtoken- token- Throws:
AssistedServiceException- In case of bad credentials
-
logoutAssistedServiceAgent
Logs out Assisted Service agent by removing session attribute.- Throws:
AssistedServiceException- In case there is no AS agent session
-
isAssistedServiceModeLaunched
boolean isAssistedServiceModeLaunched()Whether or not Assisted Service module is launched.- Returns:
- true when assisted service mode has been launched
-
getAssistedServiceSessionTimeout
int getAssistedServiceSessionTimeout()Returns timeout for assisted service agent session in seconds.- Returns:
- session in seconds
-
getAssistedServiceSessionTimerValue
int getAssistedServiceSessionTimerValue()Returns timer value (in seconds) for assisted service agent session, that displays inside widget.- Returns:
- value in seconds
-
getAssistedServiceSessionAttributes
Returns assisted service attributes map for page model.- Returns:
- String->Object map for page model.
-
getSuggestedCustomerList
@Deprecated(since="2005", forRemoval=true) List<CustomerData> getSuggestedCustomerList(String username) throws AssistedServiceException Deprecated, for removal: This API element is subject to removal in a future version.since 2005, please use the methodgetSuggestedCustomerData(String)Validate session and get list of customers which username or email starts with provided value.- Parameters:
username- uid or customer's name- Returns:
- suggested customers
- Throws:
AssistedServiceException- In case Assisted Service Agent is not logged in or Assisted Service mode inactive
-
getSuggestedCustomerData
Validate session and get list of customers which username or email starts with provided value.- Parameters:
username- uid or customer's name- Returns:
- suggested customers
-
getCustomers
Get list of customers which username or email starts with provided value.- Parameters:
searchTerm- part of uid or customer's namepageableData- the pageable data- Returns:
- list of customers
-
getCustomerSuggestions
Get list of customers which username or email starts with provided value.- Parameters:
searchTerm- part of uid or customer's name- Returns:
- list of customers
-
emulateAfterLogin
Personify customer based on customer stored on login step and current session cart.- Throws:
AssistedServiceException- In case of: 1) AS agent isn't logged in yet 2) AS agent trying to emulate himself
-
bindCustomerToCart
Binds customer with provided id to cart if it's anonymous cart.- Parameters:
customerId- email of to be newly created customer that is used as uidcartId- the id of the customer cart to pick up- Throws:
AssistedServiceException- In cas of missing cart with given cardId
-
bindCustomerToCartWithoutEmulating
void bindCustomerToCartWithoutEmulating(String customerId, String cartId) throws AssistedServiceException Binds customer with provided id to cart if it's anonymous cart, but not emulate the customer.- Parameters:
customerId- email of customer which should be bound to the 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
-
createCustomer
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:
- CustomerModel
- Throws:
AssistedServiceException- In case of: 1) trying to create already existing customer with given customerId 2) disabled customer creation
-
isAssistedServiceAgentLoggedIn
boolean isAssistedServiceAgentLoggedIn()Checks if there is ASM information in the current session or no, this will be used by Session Restriction mainly- Returns:
- boolean value to indicates if there are a valid assisted service info in the session or no.
-
getStoresByAgentId
Returns the agent store list- Parameters:
agentId- the agent unique ID- Returns:
- the agent store list
-
getCartListForCustomer
Returns collection of a customer's carts- Parameters:
customer- customer model whose carts to be returned- Returns:
- collection of the customer's cart models
-
getAsmSession
AssistedServiceSession getAsmSession()Returns ASM session object with all information about current asm session.- Returns:
- asm session object
-
getCustomerByOrder
Get the order's customer using orderFacade.getOrderDetailsForCode- Parameters:
orderId- the id of the customer order to get customer- Returns:
- customerData
-
getSuggestedCustomerData(String)Validate session and get list of customers which username or email starts with provided value.