| java.lang.Object org.ofbiz.order.shoppingcart.ShoppingCartItem
Constructor Summary | |
public | ShoppingCartItem(ShoppingCartItem item) Clone an item. | protected | ShoppingCartItem() | protected | ShoppingCartItem(GenericValue product, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, Locale locale) Creates new ShoppingCartItem object. | protected | ShoppingCartItem(GenericDelegator delegator, String itemTypeId, String description, String categoryId, double basePrice, Map attributes, String prodCatalogId, Locale locale) Creates new ShopingCartItem object. |
Method Summary | |
public void | addAdjustment(GenericValue adjustment) | public void | addAllProductFeatureAndAppls(Map productFeatureAndApplsToAdd) | public void | addContactMech(String contactMechPurposeTypeId, String contactMechId) | public synchronized double | addPromoQuantityCandidateUse(double quantityDesired, GenericValue productPromoCondAction, boolean checkAvailableOnly) | public synchronized void | clearPromoRuleUseInfo() | public synchronized void | confirmPromoRuleUse(String productPromoId, String productPromoRuleId) | public boolean | equals(ShoppingCartItem item) Compares the specified object with this cart item. | public boolean | equals(String productId, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, double selectedAmount) Compares the specified object with this cart item. | public boolean | equals(String productId, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, double selectedAmount, boolean isPromo) Compares the specified object with this cart item. | public void | explodeItem(ShoppingCart cart, LocalDispatcher dispatcher) | public GenericValue | getAdditionalProductFeatureAndAppl(String productFeatureTypeId) | public Map | getAdditionalProductFeatureAndAppls() | public List | getAdjustments() | public Object | getAttribute(String name) Return a specific attribute. | public Map | getAttributes() Returns the attributes for the item. | public double | getBasePrice() Returns the base price. | public String | getCarrierPartyId() | public String | getContactMech(String contactMechPurposeTypeId) | public GenericDelegator | getDelegator() | public String | getDescription() Returns the item's description. | public Map | getFeatureIdQtyMap() | public String | getGiftMessage() | public Boolean | getIsGift() | public boolean | getIsPromo() | public String | getItemComment() Returns the item's comment. | public double | getItemShipping() Returns the shipping adjustments. | public double | getItemSubTotal() Returns the total line price. | public double | getItemSubTotalForShipping() Returns the total line price for shipping calculation purposes. | public double | getItemSubTotalForTax() Returns the total line price for tax calculation purposes. | public double | getItemTax() Returns the tax adjustments. | public String | getItemType() Returns the item type. | public String | getItemTypeDescription() Returns the item type description. | public double | getListPrice() Returns the list price. | public Boolean | getMaySplit() | public String | getName() Returns the item's description. | public Map | getOptionalProductFeatures() | public Map | getOrderItemContactMechIds() | public List | getOrderItemPriceInfos() | public String | getOrderItemSeqId() | public GenericValue | getOrderShipmentPreference() | public double | getOtherAdjustments() Returns the "other" adjustments. | public GenericValue | getParentProduct() | public String | getParentProductId() | public String | getProdCatalogId() | public GenericValue | getProduct() Gets the Product entity. | public String | getProductCategoryId() Returns the productCategoryId for the item or null if none. | public String | getProductId() Returns the item's productId. | public double | getPromoQuantityAvailable() | public double | getPromoQuantityCandidateUse(GenericValue productPromoCondAction) | public double | getPromoQuantityCandidateUseActionAndAllConds(GenericValue productPromoAction) | public double | getPromoQuantityUsed() | public double | getQuantity() Returns the quantity. | public Iterator | getQuantityUsedPerPromoActualIter() | public Iterator | getQuantityUsedPerPromoCandidateIter() | public Iterator | getQuantityUsedPerPromoFailedIter() | public double | getSelectedAmount() | public String | getShipmentMethodTypeId() | public String | getShippingInstructions() Returns the shipping instructions. | public String | getShoppingListId() | public String | getShoppingListItemSeqId() | public double | getSize() | public double | getWeight() | public static ShoppingCartItem | makeItem(Integer cartLocation, String productId, double selectedAmount, double quantity, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, LocalDispatcher dispatcher, ShoppingCart cart) Makes a ShoppingCartItem and adds it to the cart. | public static ShoppingCartItem | makeItem(Integer cartLocation, GenericValue product, double selectedAmount, double quantity, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, LocalDispatcher dispatcher, ShoppingCart cart, boolean doPromotions) Makes a ShoppingCartItem and adds it to the cart. | public static ShoppingCartItem | makeItem(Integer cartLocation, GenericValue product, double quantity, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, LocalDispatcher dispatcher, ShoppingCart cart, boolean doPromotions) | public static ShoppingCartItem | makeItem(Integer cartLocation, String itemType, String itemDescription, String productCategoryId, double basePrice, double selectedAmount, double quantity, Map attributes, String prodCatalogId, LocalDispatcher dispatcher, ShoppingCart cart, boolean doPromotions) Makes a non-product ShoppingCartItem and adds it to the cart. | public void | putAdditionalProductFeatureAndAppl(GenericValue additionalProductFeatureAndAppl) | public GenericValue | removeAdditionalProductFeatureAndAppl(String productFeatureTypeId) | public void | removeAdjustment(GenericValue adjustment) | public void | removeAdjustment(int index) | public void | removeAttribute(String name) Removes an item attribute. | public String | removeContactMech(String contactMechPurposeTypeId) | public void | removeFeatureAdjustment(String productFeatureId) | public synchronized void | resetPromoRuleUse(String productPromoId, String productPromoRuleId) | public void | setAttribute(String name, Object value) Sets an item attribute. | public void | setBasePrice(double basePrice) | public void | setCarrierPartyId(String carrierPartyId) | public void | setGiftMessage(String giftMessage) | public void | setIsGift(Boolean isGift) | public void | setIsPromo(boolean isPromo) | public void | setItemComment(String itemComment) Sets the item comment. | public void | setItemType(String itemType) Sets the item type. | public void | setMaySplit(Boolean maySplit) | public void | setOrderItemSeqId(String orderItemSeqId) | public void | setQuantity(double quantity, LocalDispatcher dispatcher, ShoppingCart cart) | public void | setQuantity(double quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean doPromotions) | public void | setSelectedAmount(double selectedAmount) | public void | setShipmentMethodTypeId(String shipmentMethodTypeId) Sets the shipment method type. | public void | setShippingInstructions(String shippingInstructions) Sets the shipping instructions. | public void | setShoppingList(String shoppingListId, String itemSeqId) | public boolean | shippingApplies() Returns true if shipping charges apply to this item. | public boolean | taxApplies() Returns true if tax charges apply to this item. | public void | updatePrice(LocalDispatcher dispatcher, ShoppingCart cart) |
ShoppingCartItem | protected ShoppingCartItem()(Code) | | Cannot create shopping cart item with no parameters
|
ShoppingCartItem | protected ShoppingCartItem(GenericValue product, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, Locale locale)(Code) | | Creates new ShoppingCartItem object.
|
addAdjustment | public void addAdjustment(GenericValue adjustment)(Code) | | Add an adjustment to the order item; don't worry about setting the orderId, orderItemSeqId or orderAdjustmentId; they will be set when the order is created
|
addAllProductFeatureAndAppls | public void addAllProductFeatureAndAppls(Map productFeatureAndApplsToAdd)(Code) | | |
addContactMech | public void addContactMech(String contactMechPurposeTypeId, String contactMechId)(Code) | | Add a contact mech to this purpose; the contactMechPurposeTypeId is required
|
addPromoQuantityCandidateUse | public synchronized double addPromoQuantityCandidateUse(double quantityDesired, GenericValue productPromoCondAction, boolean checkAvailableOnly)(Code) | | |
clearPromoRuleUseInfo | public synchronized void clearPromoRuleUseInfo()(Code) | | |
confirmPromoRuleUse | public synchronized void confirmPromoRuleUse(String productPromoId, String productPromoRuleId)(Code) | | |
equals | public boolean equals(String productId, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, double selectedAmount)(Code) | | Compares the specified object with this cart item. Defaults isPromo to false.
|
equals | public boolean equals(String productId, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, double selectedAmount, boolean isPromo)(Code) | | Compares the specified object with this cart item.
|
getAdditionalProductFeatureAndAppl | public GenericValue getAdditionalProductFeatureAndAppl(String productFeatureTypeId)(Code) | | |
getAdditionalProductFeatureAndAppls | public Map getAdditionalProductFeatureAndAppls()(Code) | | |
getAttributes | public Map getAttributes()(Code) | | Returns the attributes for the item.
|
getBasePrice | public double getBasePrice()(Code) | | Returns the base price.
|
getContactMech | public String getContactMech(String contactMechPurposeTypeId)(Code) | | Get the contactMechId for this item given the contactMechPurposeTypeId
|
getDescription | public String getDescription()(Code) | | Returns the item's description.
|
getFeatureIdQtyMap | public Map getFeatureIdQtyMap()(Code) | | |
getIsPromo | public boolean getIsPromo()(Code) | | |
getItemComment | public String getItemComment()(Code) | | Returns the item's comment.
|
getItemShipping | public double getItemShipping()(Code) | | Returns the shipping adjustments.
|
getItemSubTotal | public double getItemSubTotal()(Code) | | Returns the total line price.
|
getItemSubTotalForShipping | public double getItemSubTotalForShipping()(Code) | | Returns the total line price for shipping calculation purposes.
|
getItemSubTotalForTax | public double getItemSubTotalForTax()(Code) | | Returns the total line price for tax calculation purposes.
|
getItemTax | public double getItemTax()(Code) | | Returns the tax adjustments.
|
getItemType | public String getItemType()(Code) | | Returns the item type.
|
getItemTypeDescription | public String getItemTypeDescription()(Code) | | Returns the item type description.
|
getListPrice | public double getListPrice()(Code) | | Returns the list price.
|
getMaySplit | public Boolean getMaySplit()(Code) | | Returns Boolean.TRUE if the order may be split (null if unspecified)
|
getName | public String getName()(Code) | | Returns the item's description.
|
getOptionalProductFeatures | public Map getOptionalProductFeatures()(Code) | | |
getOrderItemContactMechIds | public Map getOrderItemContactMechIds()(Code) | | |
getOrderItemPriceInfos | public List getOrderItemPriceInfos()(Code) | | |
getOtherAdjustments | public double getOtherAdjustments()(Code) | | Returns the "other" adjustments.
|
getProduct | public GenericValue getProduct()(Code) | | Gets the Product entity. If it is not already retreived gets it from the delegator
|
getProductCategoryId | public String getProductCategoryId()(Code) | | Returns the productCategoryId for the item or null if none.
|
getProductId | public String getProductId()(Code) | | Returns the item's productId.
|
getPromoQuantityAvailable | public double getPromoQuantityAvailable()(Code) | | |
getPromoQuantityCandidateUse | public double getPromoQuantityCandidateUse(GenericValue productPromoCondAction)(Code) | | |
getPromoQuantityCandidateUseActionAndAllConds | public double getPromoQuantityCandidateUseActionAndAllConds(GenericValue productPromoAction)(Code) | | |
getPromoQuantityUsed | public double getPromoQuantityUsed()(Code) | | |
getQuantity | public double getQuantity()(Code) | | Returns the quantity.
|
getQuantityUsedPerPromoActualIter | public Iterator getQuantityUsedPerPromoActualIter()(Code) | | |
getQuantityUsedPerPromoCandidateIter | public Iterator getQuantityUsedPerPromoCandidateIter()(Code) | | |
getQuantityUsedPerPromoFailedIter | public Iterator getQuantityUsedPerPromoFailedIter()(Code) | | |
getSelectedAmount | public double getSelectedAmount()(Code) | | Returns the user selected amount
|
getShipmentMethodTypeId | public String getShipmentMethodTypeId()(Code) | | Returns the shipment method type
|
getShippingInstructions | public String getShippingInstructions()(Code) | | Returns the shipping instructions.
|
getShoppingListItemSeqId | public String getShoppingListItemSeqId()(Code) | | |
getSize | public double getSize()(Code) | | Returns the item's size (height * width * depth)
|
getWeight | public double getWeight()(Code) | | Returns the item's unit weight
|
makeItem | public static ShoppingCartItem makeItem(Integer cartLocation, String productId, double selectedAmount, double quantity, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, LocalDispatcher dispatcher, ShoppingCart cart) throws CartItemModifyException(Code) | | Makes a ShoppingCartItem and adds it to the cart.
NOTE: This method will get the product entity and check to make sure it can be purchased.
Parameters: cartLocation - The location to place this item; null will place at the end Parameters: productId - The primary key of the product being added Parameters: quantity - The quantity to add Parameters: additionalProductFeatureAndAppls - Product feature/appls map Parameters: attributes - All unique attributes for this item (NOT features) Parameters: prodCatalogId - The catalog this item was added from Parameters: dispatcher - LocalDispatcher object for doing promotions, etc Parameters: cart - The parent shopping cart object this item will belong to a new ShoppingCartItem object throws: CartItemModifyException - |
makeItem | public static ShoppingCartItem makeItem(Integer cartLocation, GenericValue product, double selectedAmount, double quantity, Map additionalProductFeatureAndAppls, Map attributes, String prodCatalogId, LocalDispatcher dispatcher, ShoppingCart cart, boolean doPromotions) throws CartItemModifyException(Code) | | Makes a ShoppingCartItem and adds it to the cart.
WARNING: This method does not check if the product is in a purchase category.
Parameters: cartLocation - The location to place this item; null will place at the end Parameters: product - The product entity relating to the product being added Parameters: quantity - The quantity to add Parameters: additionalProductFeatureAndAppls - Product feature/appls map Parameters: attributes - All unique attributes for this item (NOT features) Parameters: prodCatalogId - The catalog this item was added from Parameters: dispatcher - LocalDispatcher object for doing promotions, etc Parameters: cart - The parent shopping cart object this item will belong to Parameters: doPromotions - Indicates if we should run promotions a new ShoppingCartItem object throws: CartItemModifyException - |
makeItem | public static ShoppingCartItem makeItem(Integer cartLocation, String itemType, String itemDescription, String productCategoryId, double basePrice, double selectedAmount, double quantity, Map attributes, String prodCatalogId, LocalDispatcher dispatcher, ShoppingCart cart, boolean doPromotions) throws CartItemModifyException(Code) | | Makes a non-product ShoppingCartItem and adds it to the cart.
NOTE: This is only for non-product items; items without a product entity (work items, bulk items, etc)
Parameters: cartLocation - The location to place this item; null will place at the end Parameters: itemType - The OrderItemTypeId for the item being added Parameters: itemDescription - The optional description of the item Parameters: productCategoryId - The optional category the product *will* go in Parameters: basePrice - The price for this item Parameters: quantity - The quantity to add Parameters: attributes - All unique attributes for this item (NOT features) Parameters: prodCatalogId - The catalog this item was added from Parameters: dispatcher - LocalDispatcher object for doing promotions, etc Parameters: cart - The parent shopping cart object this item will belong to Parameters: doPromotions - Indicates if we should run promotions a new ShoppingCartItem object throws: CartItemModifyException - |
putAdditionalProductFeatureAndAppl | public void putAdditionalProductFeatureAndAppl(GenericValue additionalProductFeatureAndAppl)(Code) | | |
removeAdditionalProductFeatureAndAppl | public GenericValue removeAdditionalProductFeatureAndAppl(String productFeatureTypeId)(Code) | | |
removeAdjustment | public void removeAdjustment(int index)(Code) | | |
removeAttribute | public void removeAttribute(String name)(Code) | | Removes an item attribute.
|
removeContactMech | public String removeContactMech(String contactMechPurposeTypeId)(Code) | | Remove the contactMechId from this item given the contactMechPurposeTypeId
|
removeFeatureAdjustment | public void removeFeatureAdjustment(String productFeatureId)(Code) | | |
resetPromoRuleUse | public synchronized void resetPromoRuleUse(String productPromoId, String productPromoRuleId)(Code) | | |
setAttribute | public void setAttribute(String name, Object value)(Code) | | Sets an item attribute.
|
setBasePrice | public void setBasePrice(double basePrice)(Code) | | Sets the base price for the item; use with caution
|
setCarrierPartyId | public void setCarrierPartyId(String carrierPartyId)(Code) | | |
setGiftMessage | public void setGiftMessage(String giftMessage)(Code) | | |
setIsPromo | public void setIsPromo(boolean isPromo)(Code) | | |
setItemComment | public void setItemComment(String itemComment)(Code) | | Sets the item comment.
|
setItemType | public void setItemType(String itemType)(Code) | | Sets the item type.
|
setOrderItemSeqId | public void setOrderItemSeqId(String orderItemSeqId)(Code) | | |
setSelectedAmount | public void setSelectedAmount(double selectedAmount)(Code) | | Sets the user selected amount
|
setShipmentMethodTypeId | public void setShipmentMethodTypeId(String shipmentMethodTypeId)(Code) | | Sets the shipment method type.
|
setShippingInstructions | public void setShippingInstructions(String shippingInstructions)(Code) | | Sets the shipping instructions.
|
shippingApplies | public boolean shippingApplies()(Code) | | Returns true if shipping charges apply to this item.
|
taxApplies | public boolean taxApplies()(Code) | | Returns true if tax charges apply to this item.
|
|
|