Class ShoppingListServices


  • public class ShoppingListServices
    extends java.lang.Object
    Shopping List Services
    • Field Detail

      • module

        public static final java.lang.String module
    • Constructor Detail

      • ShoppingListServices

        public ShoppingListServices()
    • Method Detail

      • setShoppingListRecurrence

        public static java.util.Map<java.lang.String,​java.lang.Object> setShoppingListRecurrence​(DispatchContext dctx,
                                                                                                       java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • createListReorders

        public static java.util.Map<java.lang.String,​java.lang.Object> createListReorders​(DispatchContext dctx,
                                                                                                java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • splitShipmentMethodString

        public static java.util.Map<java.lang.String,​java.lang.Object> splitShipmentMethodString​(DispatchContext dctx,
                                                                                                       java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • makeListFromOrder

        public static java.util.Map<java.lang.String,​java.lang.Object> makeListFromOrder​(DispatchContext dctx,
                                                                                               java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • makeShoppingListCart

        public static ShoppingCart makeShoppingListCart​(LocalDispatcher dispatcher,
                                                        GenericValue shoppingList,
                                                        java.util.Locale locale)
        Create a new shoppingCart form a shoppingList
        Parameters:
        dispatcher - the local dispatcher
        shoppingList - a GenericValue object of the shopping list
        locale - the locale in use
        Returns:
        returns a new shopping cart form a shopping list
      • makeShoppingListCart

        public static ShoppingCart makeShoppingListCart​(ShoppingCart listCart,
                                                        LocalDispatcher dispatcher,
                                                        GenericValue shoppingList,
                                                        java.util.Locale locale)
        Add a shoppinglist to an existing shoppingcart
        Parameters:
        listCart - the shopping cart list
        dispatcher - the local dispatcher
        shoppingList - a GenericValue object of the shopping list
        locale - the locale in use
        Returns:
        the modified shopping cart adding the shopping list elements
      • makeShoppingListCart

        public static ShoppingCart makeShoppingListCart​(LocalDispatcher dispatcher,
                                                        java.lang.String shoppingListId,
                                                        java.util.Locale locale)
      • updateShoppingListQuantitiesFromOrder

        public static java.util.Map<java.lang.String,​java.lang.Object> updateShoppingListQuantitiesFromOrder​(DispatchContext ctx,
                                                                                                                   java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Given an orderId, this service will look through all its OrderItems and for each shoppingListItemId and shoppingListItemSeqId, update the quantity purchased in the ShoppingListItem entity. Used for tracking how many of shopping list items are purchased. This service is mounted as a seca on storeOrder.
        Parameters:
        ctx - - The DispatchContext that this service is operating in
        context - - Map containing the input parameters
        Returns:
        Map with the result of the service, the output parameters
      • autoDeleteAutoSaveShoppingList

        public static java.util.Map<java.lang.String,​java.lang.Object> autoDeleteAutoSaveShoppingList​(DispatchContext dctx,
                                                                                                            java.util.Map<java.lang.String,​? extends java.lang.Object> context)