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,
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
package org.broadleafcommerce.core.order.strategy;
The methods in this class are invoked by the add and update item to cart workflows. Broadleaf provides two implementations, the default FulfillmentGroupItemStrategyImpl and also a strategy that does nothing to FulifllmentGroupItems, which can be configured by injecting the NullFulfillmentGroupItemStrategyImpl class as the "blFulfillmentGroupItemStrategy" bean. The null strategy would be the approach taken prior to 2.0, where the user was required to manage FulfillmentGroups and FulfillmentGroupItems by themselves. However, the new default implmentation takes care of this for you by ensuring that FG Items and OrderItems stay in sync. Note that even the null strategy WILL remove FulfillmentGroupItems if their corresponding OrderItem is removed to prevent orphaned records.

Andre Azzolini (apazzolini)
public interface FulfillmentGroupItemStrategy {
    public void setRemoveEmptyFulfillmentGroups(boolean removeEmptyFulfillmentGroups);
    public boolean isRemoveEmptyFulfillmentGroups();
New to GrepCode? Check out our FAQ X