Class ShoppingListEvents
- java.lang.Object
-
- org.apache.ofbiz.order.shoppinglist.ShoppingListEvents
-
public class ShoppingListEvents extends java.lang.Object
Shopping cart events.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
static java.lang.String
PERSISTANT_LIST_NAME
static java.lang.String
resource_error
-
Constructor Summary
Constructors Constructor Description ShoppingListEvents()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
addBulkFromCart(HttpServletRequest request, HttpServletResponse response)
static java.lang.String
addBulkFromCart(Delegator delegator, LocalDispatcher dispatcher, ShoppingCart cart, GenericValue userLogin, java.lang.String shoppingListId, java.lang.String shoppingListTypeId, java.lang.String[] items, boolean allowPromo, boolean append)
static java.lang.String
addListToCart(HttpServletRequest request, HttpServletResponse response)
static java.lang.String
addListToCart(Delegator delegator, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.String prodCatalogId, java.lang.String shoppingListId, boolean includeChild, boolean setAsListItem, boolean append)
static java.lang.String
clearGuestShoppingListCookies(HttpServletRequest request, HttpServletResponse response)
Clear the guest cookies for a shopping liststatic int
clearListInfo(Delegator delegator, java.lang.String shoppingListId)
Remove all items from the given list.static java.lang.String
createGuestShoppingListCookies(HttpServletRequest request, HttpServletResponse response)
Create the guest cookies for a shopping liststatic void
fillAutoSaveList(ShoppingCart cart, LocalDispatcher dispatcher)
Fills the specialized shopping list with the current shopping cart if one exists (if not leaves it alone)static java.lang.String
getAutoSaveListId(Delegator delegator, LocalDispatcher dispatcher, java.lang.String partyId, GenericValue userLogin, java.lang.String productStoreId)
Finds or creates a specialized (auto-save) shopping list used to record shopping bag contents between user visits.static java.util.List<java.lang.String>
getItemSurveyInfo(GenericValue item)
Returns a list of survey response IDs for a shopping list itemstatic java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getItemSurveyInfos(java.util.List<GenericValue> items)
Returns Map keyed on item sequence ID containing a list of survey response IDsstatic int
makeListItemSurveyResp(Delegator delegator, GenericValue item, java.util.List<java.lang.String> surveyResps)
Creates records for survey responses on survey itemsstatic java.lang.String
replaceShoppingListItem(HttpServletRequest request, HttpServletResponse response)
static java.lang.String
restoreAutoSaveList(HttpServletRequest request, HttpServletResponse response)
Restores the specialized (auto-save) shopping list back into the shopping cartstatic java.lang.String
saveCartToAutoSaveList(HttpServletRequest request, HttpServletResponse response)
Saves the shopping cart to the specialized (auto-save) shopping list
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
resource_error
public static final java.lang.String resource_error
- See Also:
- Constant Field Values
-
PERSISTANT_LIST_NAME
public static final java.lang.String PERSISTANT_LIST_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
addBulkFromCart
public static java.lang.String addBulkFromCart(HttpServletRequest request, HttpServletResponse response)
-
addBulkFromCart
public static java.lang.String addBulkFromCart(Delegator delegator, LocalDispatcher dispatcher, ShoppingCart cart, GenericValue userLogin, java.lang.String shoppingListId, java.lang.String shoppingListTypeId, java.lang.String[] items, boolean allowPromo, boolean append) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
addListToCart
public static java.lang.String addListToCart(HttpServletRequest request, HttpServletResponse response)
-
addListToCart
public static java.lang.String addListToCart(Delegator delegator, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.String prodCatalogId, java.lang.String shoppingListId, boolean includeChild, boolean setAsListItem, boolean append) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
replaceShoppingListItem
public static java.lang.String replaceShoppingListItem(HttpServletRequest request, HttpServletResponse response)
-
getAutoSaveListId
public static java.lang.String getAutoSaveListId(Delegator delegator, LocalDispatcher dispatcher, java.lang.String partyId, GenericValue userLogin, java.lang.String productStoreId) throws GenericEntityException, GenericServiceException
Finds or creates a specialized (auto-save) shopping list used to record shopping bag contents between user visits.
-
fillAutoSaveList
public static void fillAutoSaveList(ShoppingCart cart, LocalDispatcher dispatcher) throws GeneralException
Fills the specialized shopping list with the current shopping cart if one exists (if not leaves it alone)- Throws:
GeneralException
-
saveCartToAutoSaveList
public static java.lang.String saveCartToAutoSaveList(HttpServletRequest request, HttpServletResponse response)
Saves the shopping cart to the specialized (auto-save) shopping list
-
restoreAutoSaveList
public static java.lang.String restoreAutoSaveList(HttpServletRequest request, HttpServletResponse response)
Restores the specialized (auto-save) shopping list back into the shopping cart
-
clearListInfo
public static int clearListInfo(Delegator delegator, java.lang.String shoppingListId) throws GenericEntityException
Remove all items from the given list.- Throws:
GenericEntityException
-
makeListItemSurveyResp
public static int makeListItemSurveyResp(Delegator delegator, GenericValue item, java.util.List<java.lang.String> surveyResps) throws GenericEntityException
Creates records for survey responses on survey items- Throws:
GenericEntityException
-
getItemSurveyInfos
public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> getItemSurveyInfos(java.util.List<GenericValue> items)
Returns Map keyed on item sequence ID containing a list of survey response IDs
-
getItemSurveyInfo
public static java.util.List<java.lang.String> getItemSurveyInfo(GenericValue item)
Returns a list of survey response IDs for a shopping list item
-
createGuestShoppingListCookies
public static java.lang.String createGuestShoppingListCookies(HttpServletRequest request, HttpServletResponse response)
Create the guest cookies for a shopping list
-
clearGuestShoppingListCookies
public static java.lang.String clearGuestShoppingListCookies(HttpServletRequest request, HttpServletResponse response)
Clear the guest cookies for a shopping list
-
-