Interface AssistedServiceFacade

All Known Implementing Classes:
DefaultAssistedServiceFacade

public interface AssistedServiceFacade
Facade interface for assisted service functionality.
  • Method Details

    • emulateCustomer

      void emulateCustomer(String customerId, String cartId) throws AssistedServiceException
      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 up
      orderId - 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(String username, String password) throws AssistedServiceException
      Logs in Assisted Service agent using provided credentials.
      Parameters:
      username - uid
      password - 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 - uid
      password - 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 - uid
      token - token
      Throws:
      AssistedServiceException - In case of bad credentials
    • logoutAssistedServiceAgent

      void logoutAssistedServiceAgent() throws AssistedServiceException
      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

      Map<String,Object> 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 method getSuggestedCustomerData(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

      List<AutoSuggestionCustomerData> getSuggestedCustomerData(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

      List<CustomerData> getCustomers(String searchTerm, PageableData pageableData)
      Get list of customers which username or email starts with provided value.
      Parameters:
      searchTerm - part of uid or customer's name
      pageableData - the pageable data
      Returns:
      list of customers
    • getCustomerSuggestions

      List<AutoSuggestionCustomerData> getCustomerSuggestions(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 AssistedServiceException
      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

      void bindCustomerToCart(String customerId, String cartId) throws AssistedServiceException
      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 uid
      cartId - 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 cart
      cartId - 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(String customerId, 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 uid
      customerName - 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

      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(String orderId)
      Get the order's customer using orderFacade.getOrderDetailsForCode
      Parameters:
      orderId - the id of the customer order to get customer
      Returns:
      customerData