Interface BolCartFacade

    • Method Detail

      • getCart

        Basket getCart()
        Return current cart from BOL.
        Returns:
        Current cart, might be null if not created yet.
      • hasCart

        java.lang.Boolean hasCart()
        Does a session cart exist? This cart is connected to a (non-persisted) order in the SAP back end.
        Returns:
        Does a session cart exist?
      • createCart

        Basket createCart()
        Creates a new session cart. This call creates a (non-persisted) order in the SAP back end. At this point in time, the sold-to party needs to be known.
        Returns:
        Newly created cart BO instance
      • updateCart

        void updateCart()
        Updates the session cart and re-reads it from the SAP back end.
      • addToCart

        Item addToCart​(java.lang.String code,
                       long quantity)
        Adds a product to the cart
        Parameters:
        code - Product ID to be added to the cart
        quantity - Quantity to be added to the cart
        Returns:
        BOL representation of new item
      • getCartItem

        Item getCartItem​(int itemNumber)
        Fetches cart item per item number
        Parameters:
        itemNumber - Internal item number
        Returns:
        BOL representation of cart item
      • getAllowedDeliveryTypes

        java.util.Map<java.lang.String,​java.lang.String> getAllowedDeliveryTypes()
        Fetches available delivery types from the cache. Cache is filled from the SAP back end customizing (ERP customizing table TVSB)
        Returns:
        Map of delivery types. Key is the shipping condition code, value the language dependent description
      • createAddress

        Address createAddress()
        Creates a new address instance.
        Returns:
        BOL Address representation
      • placeOrderFromCart

        Order placeOrderFromCart​(Basket sapCart)
        Places an order based on a cart, and returns this order. At this point in time, the order is persisted in the SAP back end.
        Parameters:
        sapCart - SAP representation of a cart
        Returns:
        SAP representation of an order which has been submitted
      • releaseCart

        void releaseCart()
        Releases the current session cart. A new, initial session cart will be created. An existing session in the SAP back end is released as well, therefore reservations are gone.
      • validateCart

        MessageList validateCart()
        Validates the cart and compiles the list of cart error messages. Performs a back end call and touches all items to be sure all error situations are handled. Depending on the customizing in the back end, this can be avoided by either redefining this method or the corresponding one in SalesDocument
        Returns:
        List of cart error messages arising from validation.
      • addItemsToCart

        void addItemsToCart​(java.util.List<Item> items)
        Adds a list of items to the cart, keeping their handles
        Parameters:
        items - BOL items
      • addEntriesToCart

        java.util.List<Item> addEntriesToCart​(java.util.List<Item> items)
        Adds a list of items to the cart, keeping their handles
        Parameters:
        items - BOL items item list
        Returns:
        list of items
      • isBackendDown

        boolean isBackendDown()
        Returns:
        Is back end not available for a planned downtime?