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.catalog.service.dynamic;
import  javax.annotation.Nonnull;

Interface for calculating dynamic pricing for a Sku. This should be hooked up via a custom subclass of org.broadleafcommerce.core.web.catalog.DefaultDynamicSkuPricingFilter where an implementation of this class should be injected and returned in the getPricing() method.

Rather than implementing this interface directly, consider subclassing the DefaultDynamicSkuPricingServiceImpl and providing overrides to methods there.

Author(s):
jfischer
See also:
DefaultDynamicSkuPricingServiceImpl
org.broadleafcommerce.core.web.catalog.DefaultDynamicSkuPricingFilter
SkuPricingConsiderationContext
public interface DynamicSkuPricingService {

    
While this method should return a DynamicSkuPrices (and not just null) the members of the result can all be null; they do not have to be set

Parameters:
sku
skuPricingConsiderations
Returns:
    @Nonnull
    @SuppressWarnings("rawtypes")
    public DynamicSkuPrices getSkuPrices(Sku skuHashMap skuPricingConsiderations);

    
Used for t

Parameters:
sku
skuPricingConsiderations
Returns:
    @SuppressWarnings("rawtypes")
    public DynamicSkuPrices getSkuBundleItemPrice(SkuBundleItem skuHashMap skuPricingConsiderations);

    
Execute dynamic pricing on the price of a product option value.

Parameters:
productOptionValueImpl
priceAdjustment
skuPricingConsiderationContext
Returns:
    @SuppressWarnings("rawtypes")
    public DynamicSkuPrices getPriceAdjustment(ProductOptionValueImpl productOptionValueImplMoney priceAdjustment,
            HashMap skuPricingConsiderationContext);
New to GrepCode? Check out our FAQ X