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;
 
 
 import java.util.List;
 import java.util.Map;


Author(s):
Andre Azzolini (apazzolini), bpolster
 
 public interface OfferServiceExtensionHandler extends ExtensionHandler {
     
     public ExtensionResultStatusType applyAdditionalFilters(List<Offeroffers);

    
Modules may extend the calculatePotentialSavings method. Once the handlers run, the contextMap will be checked for an entry with a key of "savings". If that entry returns a non-null Money, that value will be returned from the calling method. Otherwise, the map will be checked for an entry with a key of "quantity". If a non-null Integer is returned, that value will replace the quantity call in the normal call to calculatePotentialSavings. This extension is utilized by one or more BLC enterprise modules including Subscription.

Parameters:
itemOffer
item
quantity
contextMap
Returns:
 
             PromotableOrderItem itemint quantityMap<StringObjectcontextMap);

    
Modules may need to clear additional offer details when resetPriceDetails is called.

Parameters:
item
Returns:
 
Modules may need to extend the applyItemOffer logic For example, a subscription module might creates future payment adjustments. The module add an attribute of type Boolean to the contextMap named "stopProcessing" indicating to the core offer engine that further adjustment processing is not needed.

Parameters:
order
itemOffer
contextMap
Returns:
 
             Map<StringObjectcontextMap);

    
Allows a module to amend the data that synchronizes the org.broadleafcommerce.core.offer.service.discount.domain.PromotableOrder with the org.broadleafcommerce.core.order.domain.Order

Parameters:
order
Returns:
 
Allows a module to finalize adjustments.

Parameters:
order
Returns:
 
Allows module extensions to add a create a new instance of OrderItemPriceDetailAdjustment. The module should add the value to the resultHolder.getContextMap() with a key of "OrderItemPriceDetailAdjustment"

Parameters:
resultHolder
Returns:
            OrderItemPriceDetail itemDetail);
New to GrepCode? Check out our FAQ X