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
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 * 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%
 */
package org.broadleafcommerce.core.offer.service.processor;

Author(s):
jfischer
public interface OrderOfferProcessor extends BaseProcessor {
    public void filterOrderLevelOffer(PromotableOrder promotableOrderList<PromotableCandidateOrderOfferqualifiedOrderOffersOffer offer);
    
    public Boolean executeExpression(String expressionMap<StringObjectvars);
    
    
Executes the appliesToOrderRules in the Offer to determine if this offer can be applied to the Order, OrderItem, or FulfillmentGroup.

Parameters:
offer
order
Returns:
true if offer can be applied, otherwise false
    public boolean couldOfferApplyToOrder(Offer offerPromotableOrder promotableOrder);
    
Takes a list of sorted CandidateOrderOffers and determines if each offer can be applied based on the restrictions (stackable and/or combinable) on that offer. OrderAdjustments are create on the Order for each applied CandidateOrderOffer. An offer with stackable equals false cannot be applied to an Order that already contains an OrderAdjustment. An offer with combinable equals false cannot be applied to the Order if the Order already contains an OrderAdjustment.

Parameters:
orderOffers a sorted list of CandidateOrderOffer
order the Order to apply the CandidateOrderOffers
    public void applyAllOrderOffers(List<PromotableCandidateOrderOfferorderOffersPromotableOrder promotableOrder);
    
    public void setPromotableItemFactory(PromotableItemFactory promotableItemFactory);

    
Takes the adjustments and PriceDetails from the passed in PromotableOrder and transfers them to the actual order first checking to see if they already exist.

Parameters:
promotableOrder
    public void synchronizeAdjustmentsAndPrices(PromotableOrder promotableOrder);

    
Set the offerDao (primarily for unit testing)
    public void setOfferDao(OfferDao offerDao);

    
Set the orderItemDao (primarily for unit testing)
    public void setOrderItemDao(OrderItemDao orderItemDao);
New to GrepCode? Check out our FAQ X