Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * #%L
   * BroadleafCommerce Framework
   * %%
   * Copyright (C) 2009 - 2013 Broadleaf Commerce
   * %%
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * #L%
 import java.util.List;
 import java.util.Map;
 public interface PromotableOrderItem extends Serializable {
Adds the item to the rule variables map.

     void updateRuleVariables(Map<StringObjectruleVars);

Called by pricing engine to reset the state of this item.
     void resetPriceDetails();

Returns true if this item can receive item level discounts.

     boolean isDiscountingAllowed();

Returns true if this PromotableOrderItem contains other items
     boolean isOrderItemContainer();

Returns an OrderItemContainer for this OrderItem or null if this item is not an instance of OrderItemContainer.
Returns the salePrice without adjustments
Returns the retailPrice without adjustments
Returns true if the item has a sale price that is lower than the retail price.
     boolean isOnSale();

Returns the list of priceDetails associated with this item.

Return the salePriceBeforeAdjustments if the passed in param is true. Otherwise return the retailPriceBeforeAdjustments.

     Money getPriceBeforeAdjustments(boolean applyToSalePrice);

Returns the basePrice of the item (baseSalePrice or baseRetailPrice)

     Money getCurrentBasePrice();

Returns the quantity for this orderItem

    int getQuantity();

Returns the currency of the related order.

    BroadleafCurrency getCurrency();

Effectively deletes all priceDetails associated with this item and r
    void removeAllItemAdjustments();

Merges any priceDetails that share the same adjustments.
    void mergeLikeDetails();

Returns the id of the contained OrderItem
    Long getOrderItemId();

Returns the value of all adjustments.
Returns the final total for this item taking into account the finalized adjustments. Intended to be called after the adjustments have been finalized.
Returns the total for this item if not adjustments applied.
Creates a new detail with the associated quantity. Intended for use as part of the PriceDetail split.

    PromotableOrderItemPriceDetail createNewDetail(int quantity);

Returns the underlying orderItem. Manipulation of the underlying orderItem is not recommended. This method is intended for unit test and read only access although that is not strictly enforced.

    OrderItem getOrderItem();

Map available to implementations to store data needed for custom logic.
New to GrepCode? Check out our FAQ X