public class HardgoodFulfiller
extends atg.commerce.fulfillment.InventoryFulfiller
This class is responsible for fulfilling order fragments. It receives FulfillOrderFragment messages and allocates all the items within each shipping group contained in the message using the InventoryManager. It sends ModifyOrderNotification messages reflecting all the changes that are made during this process. This class may be extended to customize the fulfillment process.
For each item in each shipping group, the HardgoodFulfiller will use the InventoryManager and either purchase the item, backorder it, preordered it, or mark it as out of stock. When the item's stock is increased and an UpdateInventory message is sent, the HardgoodFulfiller will try again to successfully purchase the item.
It receives the messages FulfillOrderFragment, ModifyOrder, ModifyOrderNotification, and UpdateInventory
It sends ModifyOrderNotification messages.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
DEFAULT_CATALOG_REF_DISPLAY_NAME, DEFAULT_COMMERCE_ITEM_CATALOG_REF_ID_PROPERTY_NAME, DEFAULT_MODIFY_ORDER_NOTIFICATION_PORT, DEFAULT_SHIP_ITEM_REL_ORDER_PROPERTY_NAME, DEFAULT_SHIP_ITEM_REL_SHIPPING_GROUP_PROPERTY_NAME, DEFAULT_SHIP_ITEM_REL_VIEW_NAME, DEFAULT_SHIPPING_GROUP_SUBMITTED_DATE_PROPERTY_NAME, DEFUALT_SHIP_ITEM_REL_COMMERCE_ITEM_PROPERTY_NAME, DEFUALT_SHIP_ITEM_REL_STATE_PROPERTY_NAME
mModifyOrderPort, NUCLEUS_NAME
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
HardgoodFulfiller() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
allocateItemQuantityFromInventory(Order pOrder,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
java.util.List pModificationList)
Deprecated.
Replaced by the pipeline processor
|
protected boolean |
allocateShippingGroup(Order pOrder,
ShippingGroup pShippingGroup,
java.util.List pModificationList)
Deprecated.
Replaced by the pipeline processor
|
protected boolean |
allocateShippingGroupItem(Order pOrder,
ShippingGroupCommerceItemRelationship pShipItemRelationship,
java.util.List pModificationList)
Deprecated.
Replaced by the pipeline processor
|
HardgoodShipper |
getHardgoodShipper()
The hardgood shipper is a schedulable service that simulates the periodic
shipment of shipping groups.
|
protected void |
processShippingGroup(Order pOrder,
ShippingGroup pShippingGroup,
java.util.List pModificationList)
Deprecated.
Replaced by the pipeline processor
|
void |
setHardgoodShipper(HardgoodShipper pHardgoodShipper) |
protected boolean |
shipAsItemsAreAvailable(ShippingGroup sg)
Deprecated.
Replaced by the pipeline processor
|
protected void |
verifyShippingGroupFulfillment(ShippingGroup pShippingGroup)
Deprecated.
Replaced by the pipeline processor
|
getCatalogRefDisplayNamePropertyName, getChainToRunMap, getCommerceItemCatalogRefIdPropertyName, getFulfillerName, getInventoryManager, getKeyForMessage, getModificationHandler, getOrderIdFromMessage, getPartialShipPropertyName, getShipItemRelCommerceItemPropertyName, getShipItemRelOrderPropertyName, getShipItemRelShippingGroupPropertyName, getShipItemRelStatePropertyName, getShipItemRelViewName, getShippingGroupSubmittedDatePropertyName, handleFulfillOrderFragment, handleMessage, handleUpdateInventory, isAllowPartialShipment, isAllowPartialShipmentDefault, isOutOfStockIsError, loadOrder, processMultipleShippingGroups, retrieveWaitingShipMap, setAllowPartialShipmentDefault, setCatalogRefDisplayNamePropertyName, setChainToRunMap, setCommerceItemCatalogRefIdPropertyName, setFulfillerName, setInventoryManager, setModificationHandler, setOutOfStockIsError, setPartialShipPropertyName, setShipItemRelCommerceItemPropertyName, setShipItemRelOrderPropertyName, setShipItemRelShippingGroupPropertyName, setShipItemRelStatePropertyName, setShipItemRelViewName, setShippedDate, setShippingGroupSubmittedDatePropertyName, shippingGroupHasShipped, shippingGroupHasShipped, splitShippingGroupWithAvailableItems, updateOrder
doStartService, getClientLockManager, getCommerceItemStates, getFulfillmentPipelineManager, getLookUpOrderIdFromMessage, getLookUpOrderIdFromOrder, getModifyOrderNotificationPort, getModifyOrderPort, getOrderFulfillmentTools, getOrderManager, getOrderStates, getPaymentGroupStates, getPaymentManager, getShipItemRelationshipStates, getShippingGroupStates, handleNewMessageType, receiveMessage, setClientLockManager, setCommerceItemStates, setFulfillmentPipelineManager, setLookUpOrderIdFromMessage, setLookUpOrderIdFromOrder, setModifyOrderNotificationPort, setModifyOrderPort, setOrderFulfillmentTools, setOrderManager, setOrderStates, setPaymentGroupStates, setPaymentManager, setShipItemRelationshipStates, setShippingGroupStates
getDelayOnSendRetry, getMessageSourceContext, getMessageSourceName, getTransactionManager, isAllowMessageSending, sendCommerceMessage, sendObjectMessage, setAllowMessageSending, setDelayOnSendRetry, setMessageSourceContext, setMessageSourceName, setTransactionManager, startMessageSource, stopMessageSource
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public void setHardgoodShipper(HardgoodShipper pHardgoodShipper)
public HardgoodShipper getHardgoodShipper()
HardgoodShipper
protected boolean shipAsItemsAreAvailable(ShippingGroup sg)
sg
- The shipping group we are interested inprotected void processShippingGroup(Order pOrder, ShippingGroup pShippingGroup, java.util.List pModificationList) throws CommerceException
pOrder
- The order containing the shipping group we are processingpShippingGroup
- The shipping group we will try to allocate and shippModificationList
- List holding any modifications we might makeCommerceException
verifyShippingGroupFulfillment(atg.commerce.order.ShippingGroup)
,
allocateShippingGroup(atg.commerce.order.Order, atg.commerce.order.ShippingGroup, java.util.List)
,
shipAsItemsAreAvailable(atg.commerce.order.ShippingGroup)
,
InventoryFulfiller.splitShippingGroupWithAvailableItems(atg.commerce.order.Order, atg.commerce.order.ShippingGroup, java.util.List)
protected void verifyShippingGroupFulfillment(ShippingGroup pShippingGroup) throws IllegalShippingGroupStateException
pShippingGroup
- The shipping group we are verifyingIllegalShippingGroupStateException
atg.commerce.states.ShippingGroupStates#REMOVED,
,
atg.commerce.states.ShippingGroupStates#FAILED,
,
atg.commerce.states.ShippingGroupStates#NO_PENDING_ACTION,
,
ShippingGroupStates.PENDING_MERCHANT_ACTION
protected boolean allocateShippingGroup(Order pOrder, ShippingGroup pShippingGroup, java.util.List pModificationList)
pOrder
- The affect Order owning this ShippingGrouppShippingGroup
- The ShippingGroup we are checkingpModificationList
- Place to store our changes.protected boolean allocateShippingGroupItem(Order pOrder, ShippingGroupCommerceItemRelationship pShipItemRelationship, java.util.List pModificationList)
pOrder
- the order in which this shipping group ispShipItemRelationship
- the shipping group whose item states we are changingpModificationList
- the list of the modifications made to the itemsallocateItemQuantityFromInventory(atg.commerce.order.Order, atg.commerce.order.ShippingGroupCommerceItemRelationship, long, java.util.List)
protected boolean allocateItemQuantityFromInventory(Order pOrder, ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship, long pQuantity, java.util.List pModificationList) throws CommerceException
pOrder
- The order containing this item.pShippingGroupItemRelationship
- The item to allocatepQuantity
- The quantity of the item to allocate. Does not verify that this quantity
and the quantity in the item match.pModificationList
- Place to store any modifications that are made.CommerceException
InventoryManager