org.broadleafcommerce.core.order.service
Class FulfillmentGroupServiceImpl

java.lang.Object
  extended by org.broadleafcommerce.core.order.service.FulfillmentGroupServiceImpl
All Implemented Interfaces:
FulfillmentGroupService

@Service(value="blFulfillmentGroupService")
public class FulfillmentGroupServiceImpl
extends Object
implements FulfillmentGroupService


Field Summary
protected  FulfillmentGroupDao fulfillmentGroupDao
           
protected  FulfillmentGroupItemDao fulfillmentGroupItemDao
           
protected  OrderMultishipOptionService orderMultishipOptionService
           
protected  OrderService orderService
           
 
Constructor Summary
FulfillmentGroupServiceImpl()
           
 
Method Summary
 FulfillmentGroup addFulfillmentGroupToOrder(FulfillmentGroupRequest fulfillmentGroupRequest, boolean priceOrder)
           
 FulfillmentGroup addItemToFulfillmentGroup(FulfillmentGroupItemRequest fulfillmentGroupItemRequest, boolean priceOrder)
           
 Order collapseToOneFulfillmentGroup(Order order, boolean priceOrder)
          Collapses all of the fulfillment groups in the given order to the first fulfillment group in the order.
 FulfillmentGroup createEmptyFulfillmentGroup()
           
 FulfillmentGroupFee createFulfillmentGroupFee()
           
protected  FulfillmentGroupItem createFulfillmentGroupItemFromOrderItem(OrderItem orderItem, FulfillmentGroup fulfillmentGroup, int quantity)
           
 void delete(FulfillmentGroup fulfillmentGroup)
           
 FulfillmentGroup findFulfillmentGroupById(Long fulfillmentGroupId)
           
 List<FulfillmentGroup> findFulfillmentGroupsByStatus(FulfillmentGroupStatusType status, int start, int maxResults)
          Reads FulfillmentGroups by status, ascending according to the date that the order was created.
 List<FulfillmentGroup> findFulfillmentGroupsByStatus(FulfillmentGroupStatusType status, int start, int maxResults, boolean ascending)
          Reads FulfillmentGroups by status, either ascending or descending according to the date that the order was created.
 List<FulfillmentGroup> findPartiallyFulfilledFulfillmentGroups(int start, int maxResults)
          Reads FulfillmentGroups whose status is PARTIALLY_FULFILLED or PARTIALLY_DELIVERED.
 List<FulfillmentGroup> findUnfulfilledFulfillmentGroups(int start, int maxResults)
          Reads FulfillmentGroups whose status is not FULFILLED or DELIVERED.
 List<FulfillmentGroup> findUnprocessedFulfillmentGroups(int start, int maxResults)
          Returns FulfillmentGroups whose status is null, or where no processing has yet occured.
protected  String getKey(Address address, FulfillmentOption option)
           
 Order matchFulfillmentGroupsToMultishipOptions(Order order, boolean priceOrder)
          Associates FulfillmentGroupItems in the given Order such that they match the structure of the OrderMultishipOptions associated with the given Order.
 Order removeAllFulfillmentGroupsFromOrder(Order order, boolean priceOrder)
           
 void removeOrderItemFromFullfillmentGroups(Order order, OrderItem orderItem)
          Removes every fulfillment group item in every fulfillment group in the order that is associated with the given orderItem.
 FulfillmentGroup save(FulfillmentGroup fulfillmentGroup)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fulfillmentGroupDao

protected FulfillmentGroupDao fulfillmentGroupDao

fulfillmentGroupItemDao

protected FulfillmentGroupItemDao fulfillmentGroupItemDao

orderService

protected OrderService orderService

orderMultishipOptionService

protected OrderMultishipOptionService orderMultishipOptionService
Constructor Detail

FulfillmentGroupServiceImpl

public FulfillmentGroupServiceImpl()
Method Detail

save

@Transactional(value="blTransactionManager")
public FulfillmentGroup save(FulfillmentGroup fulfillmentGroup)
Specified by:
save in interface FulfillmentGroupService

createEmptyFulfillmentGroup

public FulfillmentGroup createEmptyFulfillmentGroup()
Specified by:
createEmptyFulfillmentGroup in interface FulfillmentGroupService

findFulfillmentGroupById

public FulfillmentGroup findFulfillmentGroupById(Long fulfillmentGroupId)
Specified by:
findFulfillmentGroupById in interface FulfillmentGroupService

delete

@Transactional(value="blTransactionManager")
public void delete(FulfillmentGroup fulfillmentGroup)
Specified by:
delete in interface FulfillmentGroupService

addFulfillmentGroupToOrder

@Transactional(value="blTransactionManager")
public FulfillmentGroup addFulfillmentGroupToOrder(FulfillmentGroupRequest fulfillmentGroupRequest,
                                                                 boolean priceOrder)
                                            throws PricingException
Specified by:
addFulfillmentGroupToOrder in interface FulfillmentGroupService
Throws:
PricingException

addItemToFulfillmentGroup

@Transactional(value="blTransactionManager")
public FulfillmentGroup addItemToFulfillmentGroup(FulfillmentGroupItemRequest fulfillmentGroupItemRequest,
                                                                boolean priceOrder)
                                           throws PricingException
Specified by:
addItemToFulfillmentGroup in interface FulfillmentGroupService
Throws:
PricingException

removeOrderItemFromFullfillmentGroups

@Transactional(value="blTransactionManager")
public void removeOrderItemFromFullfillmentGroups(Order order,
                                                                OrderItem orderItem)
Description copied from interface: FulfillmentGroupService
Removes every fulfillment group item in every fulfillment group in the order that is associated with the given orderItem. Note that it does not save the changes made - instead, the caller is responsible for saving the order further down.

Specified by:
removeOrderItemFromFullfillmentGroups in interface FulfillmentGroupService

collapseToOneFulfillmentGroup

@Transactional(value="blTransactionManager")
public Order collapseToOneFulfillmentGroup(Order order,
                                                         boolean priceOrder)
                                    throws PricingException
Description copied from interface: FulfillmentGroupService
Collapses all of the fulfillment groups in the given order to the first fulfillment group in the order.

Specified by:
collapseToOneFulfillmentGroup in interface FulfillmentGroupService
Returns:
the saved order
Throws:
PricingException
See Also:
FulfillmentGroupService.matchFulfillmentGroupsToMultishipOptions(Order, boolean)

matchFulfillmentGroupsToMultishipOptions

@Transactional(value="blTransactionManager")
public Order matchFulfillmentGroupsToMultishipOptions(Order order,
                                                                    boolean priceOrder)
                                               throws PricingException
Description copied from interface: FulfillmentGroupService
Associates FulfillmentGroupItems in the given Order such that they match the structure of the OrderMultishipOptions associated with the given Order.

Specified by:
matchFulfillmentGroupsToMultishipOptions in interface FulfillmentGroupService
Returns:
the saved order
Throws:
PricingException
See Also:
OrderMultishipOption

getKey

protected String getKey(Address address,
                        FulfillmentOption option)

createFulfillmentGroupItemFromOrderItem

protected FulfillmentGroupItem createFulfillmentGroupItemFromOrderItem(OrderItem orderItem,
                                                                       FulfillmentGroup fulfillmentGroup,
                                                                       int quantity)

removeAllFulfillmentGroupsFromOrder

@Transactional(value="blTransactionManager")
public Order removeAllFulfillmentGroupsFromOrder(Order order,
                                                               boolean priceOrder)
                                          throws PricingException
Specified by:
removeAllFulfillmentGroupsFromOrder in interface FulfillmentGroupService
Throws:
PricingException

createFulfillmentGroupFee

public FulfillmentGroupFee createFulfillmentGroupFee()
Specified by:
createFulfillmentGroupFee in interface FulfillmentGroupService

findUnfulfilledFulfillmentGroups

public List<FulfillmentGroup> findUnfulfilledFulfillmentGroups(int start,
                                                               int maxResults)
Description copied from interface: FulfillmentGroupService
Reads FulfillmentGroups whose status is not FULFILLED or DELIVERED.

Specified by:
findUnfulfilledFulfillmentGroups in interface FulfillmentGroupService
Returns:

findPartiallyFulfilledFulfillmentGroups

public List<FulfillmentGroup> findPartiallyFulfilledFulfillmentGroups(int start,
                                                                      int maxResults)
Description copied from interface: FulfillmentGroupService
Reads FulfillmentGroups whose status is PARTIALLY_FULFILLED or PARTIALLY_DELIVERED.

Specified by:
findPartiallyFulfilledFulfillmentGroups in interface FulfillmentGroupService
Returns:

findUnprocessedFulfillmentGroups

public List<FulfillmentGroup> findUnprocessedFulfillmentGroups(int start,
                                                               int maxResults)
Description copied from interface: FulfillmentGroupService
Returns FulfillmentGroups whose status is null, or where no processing has yet occured. Default returns in ascending order according to date that the order was created.

Specified by:
findUnprocessedFulfillmentGroups in interface FulfillmentGroupService
Returns:

findFulfillmentGroupsByStatus

public List<FulfillmentGroup> findFulfillmentGroupsByStatus(FulfillmentGroupStatusType status,
                                                            int start,
                                                            int maxResults,
                                                            boolean ascending)
Description copied from interface: FulfillmentGroupService
Reads FulfillmentGroups by status, either ascending or descending according to the date that the order was created.

Specified by:
findFulfillmentGroupsByStatus in interface FulfillmentGroupService
Returns:

findFulfillmentGroupsByStatus

public List<FulfillmentGroup> findFulfillmentGroupsByStatus(FulfillmentGroupStatusType status,
                                                            int start,
                                                            int maxResults)
Description copied from interface: FulfillmentGroupService
Reads FulfillmentGroups by status, ascending according to the date that the order was created.

Specified by:
findFulfillmentGroupsByStatus in interface FulfillmentGroupService
Returns:


Copyright © 2013. All Rights Reserved.