Interface AssistedServiceService

  • All Known Implementing Classes:
    DefaultAssistedServiceService

    public interface AssistedServiceService
    Service layer interface for Assisted Service methods.
    • Method Detail

      • bindCustomerToCart

        void bindCustomerToCart​(java.lang.String customerId,
                                java.lang.String cartId)
                         throws AssistedServiceException
        Binds 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 cart
        cartId - 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 uid
        customerName - 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, use getOrderByCode(String, UserModel) instead
        search for order
        Parameters:
        orderCode - the order's code
        customer - 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 code
        customer - 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 code
        customer - 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 restored
        user - 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 name
        pageableData - pageable properties
        Returns:
        suggested customers