public class ProcPurchaseConfigurableItem extends ApplicationLoggingImpl implements PipelineProcessor
| Modifier and Type | Class and Description |
|---|---|
protected class |
ProcPurchaseConfigurableItem.PurchaseResult
Inner value object class to represent the result of an attempt to purchase, recording
allocation and availability.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
STOP_CHAIN_EXECUTION, STOP_CHAIN_EXECUTION_AND_COMMIT, STOP_CHAIN_EXECUTION_AND_ROLLBACKDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
ProcPurchaseConfigurableItem()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
allocateBackOrderableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pSku,
CommerceItem pItem,
java.lang.String pLocationId)
Perform inventory operations for a backorderable item.
|
protected void |
allocateBackOrderableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pSku,
ConfigurableCommerceItem pConfigItem,
SubSkuCommerceItem pSubItem,
java.lang.String pLocationId)
Perform inventory operations for a backorderable item.
|
protected void |
allocateBackOrderableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
java.util.List pModificationList,
java.lang.String pSku,
ConfigurableCommerceItem pConfigItem,
SubSkuCommerceItem pSubItem,
java.lang.String pLocationId)
Perform inventory operations for a backorderable item.
|
protected boolean |
allocateItemQuantityForConfigurableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupCommerceItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pLocationId)
Allocates the given configurable item and sub items for the given quantity from the InventoryManager.
|
protected boolean |
allocateItemQuantityForConfigurableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGrpCommItemRel,
long pQuantity,
java.util.List pModificationList,
java.lang.String pLocationId)
Allocates the given configurable item and sub items for the given quantity from the InventoryManager.
|
protected void |
allocatePreOrderableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pSku,
CommerceItem pItem,
java.lang.String pLocationId)
Perform inventory operations for a preorderable item.
|
protected void |
allocatePreOrderableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pSku,
ConfigurableCommerceItem pConfigItem,
SubSkuCommerceItem pSubItem,
java.lang.String pLocationId)
Perform inventory operations for a preorderable item.
|
protected void |
allocatePreOrderableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
java.util.List pModificationList,
java.lang.String pSku,
ConfigurableCommerceItem pConfigItem,
SubSkuCommerceItem pSubItem,
java.lang.String pLocationId)
Perform inventory operations for a preorderable item.
|
protected int |
attemptBackOrderPurchase(long pQuantity,
double pQuantityWithFraction,
CommerceItem pItem,
boolean pIsFractional,
InventoryManager pInventoryManager,
java.lang.String pLocationId,
int pAvailabilityStatus)
Attempt to back order the item passed in.
|
protected int |
attemptPreOrderPurchase(long pQuantity,
double pQuantityWithFraction,
CommerceItem pItem,
boolean pIsFractional,
InventoryManager pInventoryManager,
java.lang.String pLocationId,
int pAvailabilityStatus)
Attempt to purchase an item from pre-order.
|
protected int |
attemptRegularPurchase(long pQuantity,
double pQuantityWithFraction,
CommerceItem pItem,
boolean isFractional,
InventoryManager pInventoryManager,
java.lang.String pLocationId)
Attempt to purchase an available item
|
java.lang.String |
getLoggingIdentifier()
Returns property LoggingIdentifier
|
int[] |
getRetCodes()
Returns the possible return codes denoting whether the proc
succeeded or failed.
|
protected void |
handleInventoryException(java.lang.String pCommerceItemState,
java.lang.String pShipItemRelationshipState,
java.util.List pModificationList,
ShippingGroupCommerceItemRelationship pShippingGroupCommerceItemRelationship,
OrderFulfillmentTools pOrderFulfillmentTools,
CommerceItemStates pCommerceItemStates,
ShipItemRelationshipStates pShipItemRelationshipStates,
java.lang.String pExceptionAsString,
boolean pIsTopLevelItem)
Handles inventory exceptions which occur during allocation.
|
protected ProcPurchaseConfigurableItem.PurchaseResult |
purchaseItem(CommerceItem pItem,
java.lang.String pLocationId,
atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
long pQuantity,
double pQuantityWithFraction,
boolean pIsFractional)
Purchase an item from inventory
|
void |
queryAvailability(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupCommerceItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pSku,
CommerceItem pItem,
int pAvailabilityStatus,
java.lang.String pLocationId)
Perform inventory operations based on the availability.
|
protected void |
queryAvailability(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pSku,
ConfigurableCommerceItem pConfigItem,
SubSkuCommerceItem pSubItem,
int pAvailabilityStatus,
java.lang.String pLocationId)
Perform inventory operations based on the availability.
|
protected void |
queryAvailability(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
java.util.List pModificationList,
java.lang.String pSku,
ConfigurableCommerceItem pConfigItem,
SubSkuCommerceItem pSubItem,
int pAvailabilityStatus,
java.lang.String pLocationId)
Perform inventory operations based on the availability.
|
int |
runProcess(java.lang.Object pParam,
PipelineResult pResult)
Handle inventory for a configurable item.
|
void |
setLoggingIdentifier(java.lang.String pLoggingIdentifier)
Sets property LoggingIdentifier
|
void |
updateStateInventoryFailedItemNotFound(OrderFulfillmentTools pOrderFulfillmentTools,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
java.util.List pModificationList,
CommerceItem pItem)
Updates the state of a commerce item following an allocation that resulted in a failed inventory state.
|
void |
updateStateInventorySucceeded(boolean pSuccessfulAllocation,
OrderFulfillmentTools pOrderFulfillmentTools,
ShippingGroupCommerceItemRelationship pShippingGroupCommerceItemRelationship,
java.util.List pModificationList,
CommerceItem pItem)
Updates the state of a commerce item following an allocation that resulted in a successful inventory state.
|
addGlobalLogListeners, addLogListener, getLoggingForVlogging, getLoggingIdentifer, getLogListenerCount, getLogListeners, initializeFromServiceEvent, isAutoInitListeners, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, removeLogListener, sendLogEvent, setAutoInitListeners, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarningvlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic int[] getRetCodes()
getRetCodes in interface PipelineProcessorpublic void setLoggingIdentifier(java.lang.String pLoggingIdentifier)
setLoggingIdentifier in class ApplicationLoggingImplpublic java.lang.String getLoggingIdentifier()
getLoggingIdentifier in class ApplicationLoggingImplpublic int runProcess(java.lang.Object pParam,
PipelineResult pResult)
throws java.lang.Exception
runProcess in interface PipelineProcessorpParam - a HashMap which must contain required input parameterspResult - a PipelineResult object which stores any information which must
be returned from this method invocationjava.lang.Exception - throws any exception back to the callerPipelineProcessor.runProcess(Object, PipelineResult)protected boolean allocateItemQuantityForConfigurableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGrpCommItemRel,
long pQuantity,
java.util.List pModificationList,
java.lang.String pLocationId)
throws CommerceException
pInventoryFulfiller - The inventory fulfillerpShippingGrpCommItemRel - A relationship including 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.pLocationId - The location ID for an InStorePickupShippingGroupCommerceExceptionInventoryManagerprotected boolean allocateItemQuantityForConfigurableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupCommerceItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pLocationId)
throws CommerceException
pInventoryFulfiller - The inventory fulfillerpShippingGroupItemRelationship - The item to allocatepQuantity - The quantity of the item to allocate. Does not verify that this quantity
and the quantity in the item match.pQuantityWithFraction - The fractional quantity of the item to allocate. Does not verify that this
fractional quantity and the fractional quantity in the item match.pModificationList - Place to store any modifications that are made.pLocationId - The location ID for an InStorePickupShippingGroupCommerceExceptionInventoryManagerpublic void updateStateInventorySucceeded(boolean pSuccessfulAllocation,
OrderFulfillmentTools pOrderFulfillmentTools,
ShippingGroupCommerceItemRelationship pShippingGroupCommerceItemRelationship,
java.util.List pModificationList,
CommerceItem pItem)
pSuccessfulAllocationSoFar - A boolean stating whether or not the allocations up to this point have been successful.pOrderFulfillmentTools - An instance of order fulfillment toolspShippingGroupCommerceItemRelationship - The relationship between the top level commerce item and its shipping grouppModificationList - A list of modificationspItem - The item currently being allocated.public void updateStateInventoryFailedItemNotFound(OrderFulfillmentTools pOrderFulfillmentTools, ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship, java.util.List pModificationList, CommerceItem pItem)
pOrderFulfillmentTools - An instance of order fulfillment toolspShippingGroupItemRelationship - The relationship between the top level commerce item and its shipping grouppModificationList - A list of modificationspItem - The item currently being allocated.protected ProcPurchaseConfigurableItem.PurchaseResult purchaseItem(CommerceItem pItem, java.lang.String pLocationId, atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller, long pQuantity, double pQuantityWithFraction, boolean pIsFractional) throws InventoryException
pItem - The item to purchasepLocationId - The optional id of the store for in-store pick-uppInventoryFulfiller - A valid inventory fulfillment componentpQuantity - The quantity to purchasepQuantityWithFraction - The fractional quantity to purchasepIsFractional - A boolean stating whether or not this purchase is fractionalInventoryExceptionprotected void handleInventoryException(java.lang.String pCommerceItemState,
java.lang.String pShipItemRelationshipState,
java.util.List pModificationList,
ShippingGroupCommerceItemRelationship pShippingGroupCommerceItemRelationship,
OrderFulfillmentTools pOrderFulfillmentTools,
CommerceItemStates pCommerceItemStates,
ShipItemRelationshipStates pShipItemRelationshipStates,
java.lang.String pExceptionAsString,
boolean pIsTopLevelItem)
pCommerceItemState - The state of the current commerce itempShipItemRelationshipState - The state of the top level configurable commerce item's shipping group relationshippModificationList - A list of modificationspShippingGroupCommerceItemRelationship - The relationship between the top level config item and its shippinmg grouppOrderFulfillmentTools - An instance of order fulfillment toolspCommerceItemStates - The possible commerce item statespShipItemRelationshipStates - The possible shipping group item relationship statespExceptionAsString - An exception converted to a string.pIsTopLevelItem - A boolean stating whether or not the affected item is a top level item.protected int attemptBackOrderPurchase(long pQuantity,
double pQuantityWithFraction,
CommerceItem pItem,
boolean pIsFractional,
InventoryManager pInventoryManager,
java.lang.String pLocationId,
int pAvailabilityStatus)
throws InventoryException
pQuantity - - the non fractional quantity to be purchasedpQuantityWithFraction - - the fractional quantity to be purchasedpItem - - the commerce item to purchase (should be either a configurable item or a subsku)pIsFractional - - a boolean stating whether or not we should be using the fractional quantitypInventoryManager - - the inventory manager to defer our purchase topLocationId - - the optional store location to usepAvailabilityStatus - The availability status of the itemInventoryExceptionprotected int attemptPreOrderPurchase(long pQuantity,
double pQuantityWithFraction,
CommerceItem pItem,
boolean pIsFractional,
InventoryManager pInventoryManager,
java.lang.String pLocationId,
int pAvailabilityStatus)
throws InventoryException
pQuantity - The non-fractional quantity to purchasepQuantityWithFraction - The fractional quantity to purchasepItem - The item to purchasepIsFractional - A flag stating whether or we're working with fractional quantitiespInventoryManager - The inventory manager to usepLocationId - The (optional) identifier of the in-store pickup locationpAvailabilityStatus - The availability status of the itemInventoryExceptionprotected int attemptRegularPurchase(long pQuantity,
double pQuantityWithFraction,
CommerceItem pItem,
boolean isFractional,
InventoryManager pInventoryManager,
java.lang.String pLocationId)
throws InventoryException
pQuantity - The quantity to purchasepQuantityWithFraction - The quantity to purchase if working with fractional quantitiespItem - The item to purchaseisFractional - A flag stating whether or not we're working with fractional quantitiespInventoryManager - The inventory managerpLocationId - An in-store pick-up location identifierInventoryExceptionprotected void queryAvailability(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
java.util.List pModificationList,
java.lang.String pSku,
ConfigurableCommerceItem pConfigItem,
SubSkuCommerceItem pSubItem,
int pAvailabilityStatus,
java.lang.String pLocationId)
throws InventoryException
pInventoryFulfiller - The inventory fulfillerpShippingGroupItemRelationship - The relationship of the top level item to its shipping group.pQuantity - The quantity of the itempModificationList - Place to store any modifications that are made.pSku - The catalog reference of the skupConfigItem - A configurable commerce itempSubItem - A sub sku commerce itempAvailabilityStatus - The availability status of the item in questionpLocationId - The location of the skuInventoryExceptionprotected void queryAvailability(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pSku,
ConfigurableCommerceItem pConfigItem,
SubSkuCommerceItem pSubItem,
int pAvailabilityStatus,
java.lang.String pLocationId)
throws InventoryException
pInventoryFulfiller - The inventory fulfillerpShippingGroupItemRelationship - The relationship of the top level item to its shipping group.pQuantity - The quantity of the itempQuantityWithFraction - The fractional quantity of the itempModificationList - Place to store any modifications that are made.pSku - The catalog reference of the relevant skupConfigItem - A configurable commerce itempSubItem - A sub sku commerce itempAvailabilityStatus - The availability status of the item in questionpLocationId - The location of the skuInventoryExceptionpublic void queryAvailability(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupCommerceItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pSku,
CommerceItem pItem,
int pAvailabilityStatus,
java.lang.String pLocationId)
throws InventoryException
pInventoryFulfiller - The inventory fulfillerpShippingGroupItemRelationship - The relationship of the top level item to its shipping group.pQuantity - The quantity of the itempQuantityWithFraction - The fractional quantity of the itempModificationList - Place to store any modifications that are made.pSku - The catalog reference of the relevant skupCommerceItem - The commerce item we're going to check the availability of.pAvailabilityStatus - The availability status of the item in questionpLocationId - The location of the skuInventoryExceptionprotected void allocateBackOrderableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
java.util.List pModificationList,
java.lang.String pSku,
ConfigurableCommerceItem pConfigItem,
SubSkuCommerceItem pSubItem,
java.lang.String pLocationId)
throws InventoryException
pInventoryFulfiller - The inventory fulfillerpShippingGroupItemRelationship - The relationship between the top level commerce item and its shipping group.pQuantity - The quantity of the itempModificationList - Place to store any modifications that are made.pSku - The catalog reference of the relevant skupConfigItem - configurable commerce itempSubItem - The sub sku commerce itempLocationId - The location of the skuInventoryExceptionprotected void allocateBackOrderableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pSku,
ConfigurableCommerceItem pConfigItem,
SubSkuCommerceItem pSubItem,
java.lang.String pLocationId)
throws InventoryException
pInventoryFulfiller - The inventory fulfillerpShippingGroupItemRelationship - The item to allocatepQuantity - The quantity of the itempQuantityWithFraction - the quantity (with fraction) of the itempModificationList - Place to store any modifications that are made.pSku - The skupConfigItem - configurable commerce itempSubItem - The sub sku commerce itempLocationId - The location of the skuInventoryExceptionprotected void allocateBackOrderableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pSku,
CommerceItem pItem,
java.lang.String pLocationId)
throws InventoryException
pInventoryFulfiller - The inventory fulfillerpShippingGroupItemRelationship - The relationship between the top level commerce item and its shipping group.pQuantity - The quantity of the itempQuantityWithFraction - the quantity (with fraction) of the itempModificationList - Place to store any modifications that are made.pSku - The catalog reference of the relevant skupItem - The item to back orderpLocationId - The location of the skuInventoryExceptionprotected void allocatePreOrderableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
java.util.List pModificationList,
java.lang.String pSku,
ConfigurableCommerceItem pConfigItem,
SubSkuCommerceItem pSubItem,
java.lang.String pLocationId)
throws InventoryException
pInventoryFulfiller - The inventory fulfillerpShippingGroupItemRelationship - The relationship between the top level commerce item and its shipping group.pQuantity - The quantity of the itempModificationList - Place to store any modifications that are made.pSku - The catalog reference of the relevant skupConfigItem - The configurable item to pre-orderpSubItem - The sub item to pre-orderpLocationId - The location of the skuInventoryExceptionprotected void allocatePreOrderableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pSku,
ConfigurableCommerceItem pConfigItem,
SubSkuCommerceItem pSubItem,
java.lang.String pLocationId)
throws InventoryException
pInventoryFulfiller - The inventory fulfillerpShippingGroupItemRelationship - The item to allocatepQuantity - The quantity of the itempQuantityWithFraction - The quantity (with fraction) of the itempModificationList - Place to store any modifications that are made.pSku - The catalog reference of the relevant skupConfigItem - The configurable item to pre-orderpSubItem - The sub item to pre-orderpLocationId - The location of the skuInventoryExceptionprotected void allocatePreOrderableItem(atg.commerce.fulfillment.InventoryFulfiller pInventoryFulfiller,
ShippingGroupCommerceItemRelationship pShippingGroupItemRelationship,
long pQuantity,
double pQuantityWithFraction,
java.util.List pModificationList,
java.lang.String pSku,
CommerceItem pItem,
java.lang.String pLocationId)
throws InventoryException
pInventoryFulfiller - The inventory fulfillerpShippingGroupItemRelationship - The item to allocatepQuantity - The quantity of the itempQuantityWithFraction - The quantity (with fraction) of the itempModificationList - Place to store any modifications that are made.pSku - The skupItem - The item to pre-orderpLocationId - The location of the skuInventoryException