Interface AssistedServiceFacade
-
- All Known Implementing Classes:
DefaultAssistedServiceFacade
public interface AssistedServiceFacadeFacade interface for assisted service functionality.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default 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.voidbindCustomerToCartWithoutEmulating(java.lang.String customerId, java.lang.String cartId)Binds customer with provided id to cart if it's anonymous cart, but not emulate the customer.CustomerDatacreateCustomer(java.lang.String customerId, java.lang.String customerName)Creates a new customer by it email and name.voidemulateAfterLogin()Personify customer based on customer stored on login step and current session cart.voidemulateCustomer(java.lang.String customerId, java.lang.String cartId)Adds a customer and/or cart to the current session.voidemulateCustomer(java.lang.String customerId, java.lang.String cartId, java.lang.String orderId)Adds provided customer, cart or an order to the current session.AssistedServiceSessiongetAsmSession()Returns ASM session object with all information about current asm session.java.util.Map<java.lang.String,java.lang.Object>getAssistedServiceSessionAttributes()Returns assisted service attributes map for page model.intgetAssistedServiceSessionTimeout()Returns timeout for assisted service agent session in seconds.intgetAssistedServiceSessionTimerValue()Returns timer value (in seconds) for assisted service agent session, that displays inside widget.java.util.Collection<CartData>getCartListForCustomer(CustomerModel customer)Returns collection of a customer's cartsCustomerDatagetCustomerByOrder(java.lang.String orderId)Get the order's customer using orderFacade.getOrderDetailsForCodejava.util.List<CustomerData>getCustomers(java.lang.String searchTerm, PageableData pageableData)Get list of customers which username or email starts with provided value.java.util.List<AutoSuggestionCustomerData>getCustomerSuggestions(java.lang.String searchTerm)Get list of customers which username or email starts with provided value.java.util.List<AutoSuggestionCustomerData>getSuggestedCustomerData(java.lang.String username)Validate session and get list of customers which username or email starts with provided value.java.util.List<CustomerData>getSuggestedCustomerList(java.lang.String username)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.booleanisAssistedServiceAgentLoggedIn()Checks if there is ASM information in the current session or no, this will be used by Session Restriction mainlybooleanisAssistedServiceModeLaunched()Whether or not Assisted Service module is launched.voidlaunchAssistedServiceMode()Starts the Assisted Service Mode.voidloginAssistedServiceAgent(java.lang.String username, java.lang.String password)Logs in Assisted Service agent using provided credentials.default voidloginAssistedServiceAgentSAML(java.lang.String username, LoginToken token)Logs in Assisted Service agent using provided SAML credentials.voidloginAssistedServiceAgentSAML(java.lang.String username, java.lang.String password)Logs in Assisted Service agent using provided SAML credentials.voidlogoutAssistedServiceAgent()Logs out Assisted Service agent by removing session attribute.voidquitAssistedServiceMode()Ends the Assisted Service Mode.voidstopEmulateCustomer()Remove customer and/or cart from the current session.
-
-
-
Method Detail
-
emulateCustomer
void emulateCustomer(java.lang.String customerId, java.lang.String cartId) throws AssistedServiceExceptionAdds 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(java.lang.String customerId, java.lang.String cartId, java.lang.String orderId) throws AssistedServiceExceptionAdds 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
void loginAssistedServiceAgent(java.lang.String username, java.lang.String password) throws AssistedServiceExceptionLogs in Assisted Service agent using provided credentials.- Parameters:
username- uidpassword- password- Throws:
AssistedServiceException- In case of bad credentials
-
loginAssistedServiceAgentSAML
void loginAssistedServiceAgentSAML(java.lang.String username, java.lang.String password) throws AssistedServiceExceptionLogs in Assisted Service agent using provided SAML credentials.- Parameters:
username- uidpassword- password- Throws:
AssistedServiceException- In case of bad credentials
-
loginAssistedServiceAgentSAML
default void loginAssistedServiceAgentSAML(java.lang.String username, LoginToken token) throws AssistedServiceExceptionLogs in Assisted Service agent using provided SAML credentials.- Parameters:
username- uidtoken- token- Throws:
AssistedServiceException- In case of bad credentials
-
logoutAssistedServiceAgent
void logoutAssistedServiceAgent() throws AssistedServiceExceptionLogs 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
java.util.Map<java.lang.String,java.lang.Object> getAssistedServiceSessionAttributes()
Returns assisted service attributes map for page model.- Returns:
- String->Object map for page model.
-
getSuggestedCustomerList
@Deprecated(since="2005", forRemoval=true) java.util.List<CustomerData> getSuggestedCustomerList(java.lang.String username) throws AssistedServiceExceptionDeprecated, 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
java.util.List<AutoSuggestionCustomerData> getSuggestedCustomerData(java.lang.String username)
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
java.util.List<CustomerData> getCustomers(java.lang.String searchTerm, PageableData pageableData)
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
java.util.List<AutoSuggestionCustomerData> getCustomerSuggestions(java.lang.String searchTerm)
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
void emulateAfterLogin() throws AssistedServiceExceptionPersonify 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
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- 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(java.lang.String customerId, java.lang.String cartId) throws AssistedServiceExceptionBinds 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
CustomerData createCustomer(java.lang.String customerId, java.lang.String customerName) throws AssistedServiceException
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.
-
getCartListForCustomer
java.util.Collection<CartData> getCartListForCustomer(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
-
getAsmSession
AssistedServiceSession getAsmSession()
Returns ASM session object with all information about current asm session.- Returns:
- asm session object
-
getCustomerByOrder
CustomerData getCustomerByOrder(java.lang.String orderId)
Get the order's customer using orderFacade.getOrderDetailsForCode- Parameters:
orderId- the id of the customer order to get customer- Returns:
- customerData
-
-