|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.commerce.order.OrderManager
atg.commerce.order.SimpleOrderManager
atg.projects.store.order.StoreOrderManager
public class StoreOrderManager
The class extends the ATG SimpleOrderManager. The main functionality added to this class is related to gift services. The business logic for addition and removal of gift message and gift wrap is here.
Also included in this class is the logic for building a set of AddCommerceItemInfo objects based on an Order.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string. |
Fields inherited from class atg.commerce.order.OrderManager |
---|
mOrderManager, mOrderMergeListeners, mUserPricingModelsPath, sResourceBundle |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
StoreOrderManager()
|
Method Summary | |
---|---|
void |
addGiftMessage(StoreOrderImpl pOrder,
java.lang.String pMessageTo,
java.lang.String pMessage,
java.lang.String pMessageFrom)
Adds the gift message to the order's special instructions. |
void |
addGiftWrap(StoreOrderImpl pOrder,
java.lang.String pSkuId,
java.lang.String pProductId)
Creates and adds the gift wrap commerce item to the order. |
void |
addRemoveGiftServices(StoreOrderImpl pOrder,
boolean pAddGiftWrap,
boolean pAddGiftMessage,
java.lang.String pGiftWrapSkuId,
java.lang.String pGiftWrapProductId)
This method can be used by form handlers to add / remove gift message or gift wrap from the order. |
java.util.List |
buildItemInfos(atg.commerce.order.Order pOrder)
Returns a List of AddCommerceItemInfos based on the order param. |
int |
checkStatus(atg.commerce.order.CommerceItem pCommItem)
This method uses the inventory manager to query the availability status of the given commerce item. |
boolean |
compareElectronicShippingGroups(atg.commerce.order.ShippingGroup pSrcShippingGroup,
atg.commerce.order.ShippingGroup pDestShippingGroup)
Compares two StoreElectronicShippingGroup objects to check if all their shipping properties match. |
protected StoreAddCommerceItemInfo |
createAddCommerceItemInfo(atg.commerce.order.CommerceItem pItem)
Creates a StoreAddCommerceItemInfo object for an item. |
protected java.util.Collection |
createItemsForGift(atg.commerce.order.Order pOrder,
atg.commerce.order.CommerceItem pItem)
Creates a collection of AddCommerceItemInfo objects for each gift relationship for an item. |
java.lang.String |
getAddItemInfoClass()
|
atg.commerce.states.CommerceItemStates |
getCommerceItemStates()
|
atg.commerce.gifts.GiftlistManager |
getGiftlistManager()
The giftlist manager. |
java.lang.String |
getOMSTransactionId()
Use the OMSTransactionIdGenerator to get the next Transaction Id. |
atg.service.idgen.IdGenerator |
getOMSTransactionIdGenerator()
The OMSTransactionIdGenerator. |
java.lang.String |
getOMSTransactionIdSpace()
The OMSTransactionIdSpace. |
boolean |
isAdjustInventoryOnCheckout()
|
void |
manageInventoryOnCheckout(atg.commerce.order.Order pOrder)
This method sets the state of each commerce item based on the sku's current inventory availability. |
void |
removeGiftMessage(StoreOrderImpl pOrder)
Removes the gift message from the order. |
void |
removeGiftWrap(StoreOrderImpl pOrder)
Removes the gift wrap commerce item from the order. |
void |
setAddItemInfoClass(java.lang.String pAddItemInfoClass)
Sets the name of the class to be used for elements in the items array. |
void |
setAdjustInventoryOnCheckout(boolean pAdjustInventoryOnCheckout)
|
void |
setCommerceItemStates(atg.commerce.states.CommerceItemStates pCommerceItemStates)
|
void |
setGiftlistManager(atg.commerce.gifts.GiftlistManager pGiftlistManager)
Specifies the GiftlistManager. |
void |
setOMSTransactionIdGenerator(atg.service.idgen.IdGenerator pOMSTransactionIdGenerator)
Specifies the OMSTransactionIdGenerator. |
void |
setOMSTransactionIdSpace(java.lang.String pOMSTransactionIdSpace)
Specifies the OMSTransactionIdSpace. |
Methods inherited from class atg.commerce.order.SimpleOrderManager |
---|
addItemToShippingGroup, addItemToShippingGroup, moveItemToShippingGroup, moveItemToShippingGroup, removeItemFromShippingGroup, removeItemFromShippingGroup |
Methods inherited from class atg.commerce.order.OrderManager |
---|
addAsSeparateItemToOrder, addHandlingInstructionToShippingGroup, addItemAmountToPaymentGroup, addItemQuantityToShippingGroup, addItemToOrder, addOrder, addOrderAmountToPaymentGroup, addOrderMergeListener, addPaymentGroupToOrder, addPaymentGroupToOrder, addRemainingItemAmountToPaymentGroup, addRemainingItemQuantityToShippingGroup, addRemainingOrderAmountToPaymentGroup, addRemainingShippingCostToPaymentGroup, addRemainingTaxAmountToPaymentGroup, addShippingCostAmountToPaymentGroup, addShippingGroupToOrder, addTaxAmountToPaymentGroup, areOrdersMergeable, cloneShippingGroup, compareGiftlistHandlingInstructions, compareHandlingInstructions, compareHardgoodShippingGroups, copyAddress, copyAddress, copyAddress, copyHandlingInstruction, createCommerceItem, createCommerceItem, createCommerceItem, createCommerceItem, createCommerceItem, createCommerceItem, createCommerceItem, createCommerceItem, createHandlingInstruction, createHandlingInstruction, createHandlingInstruction, createHandlingInstruction, createOrder, createOrder, createOrder, createOrder, createOrder, createOrder, createPaymentGroup, createPaymentGroup, createRelationship, createShippingGroup, createShippingGroup, createShippingGroup, doStartService, getAllCommerceItemRelationships, getAllOrderRelationships, getAllPaymentGroupRelationships, getAllShippingGroupRelationships, getCatalogTools, getCommerceItemItemDescriptorName, getCommerceItemManager, getCommerceItemOrderPropertyName, getCommerceItemsFromPaymentGroup, getCommerceItemsFromShippingGroup, getDateRangeQuery, getDebugOrderRepositoryItemUpdateTransaction, getDefaultLocale, getDefaultOrderByDirection, getDefaultOrderByProperty, getHandlingInstructionManager, getHandlingInstructionsForCommerceItem, getJNDIContext, getOrderCommerceItemsPropertyName, getOrderCountForProfile, getOrderCountForProfileInState, getOrderForCommerceItem, getOrderForPaymentGroup, getOrderForRelationship, getOrderForShippingGroup, getOrderIdsForProfile, getOrderIdsForProfile, getOrderIdsForProfile, getOrderIdsForProfile, getOrderIdsForProfile, getOrderIdsForProfile, getOrderIdsForProfile, getOrderIdsForProfile, getOrderIdsForProfile, getOrderIdsForProfile, getOrderIdsForProfile, getOrderIdsForProfile, getOrderIdsForProfileWithinDateRange, getOrderIdsWithinDateRange, getOrderItemDescriptorName, getOrderManager, getOrderPaymentGroupsPropertyName, getOrderQueries, getOrderRelationshipsPropertyName, getOrdersForProfile, getOrdersForProfile, getOrdersForProfile, getOrdersForProfile, getOrdersForProfileInState, getOrdersForProfileInState, getOrdersForProfileInState, getOrdersForProfileInState, getOrdersForProfileInState, getOrdersForProfileInState, getOrdersForProfileInState, getOrdersForProfileInState, getOrderShippingGroupsPropertyName, getOrderTools, getOrderVersionPropertyName, getPaymentGroupCommerceItemRelationship, getPaymentGroupItemDescriptorName, getPaymentGroupManager, getPaymentGroupOrderPropertyName, getPaymentGroupOrderRelationship, getPaymentGroupShippingGroupRelationship, getPipelineManager, getProcessOrderMap, getRelationshipItemDescriptorName, getRelationshipOrderPropertyName, getRemainingQuantityForShippingGroup, getShipItemRelsForRange, getShippingGroupByDescription, getShippingGroupCommerceItemRelationship, getShippingGroupItemDescriptorName, getShippingGroupManager, getShippingGroupOrderPropertyName, getUnassignedQuantityForCommerceItem, getUniqueCatalogRefIds, getUserPricingModelsPath, getValidOrderProcessingStates, getValidProcessOrderErrorStates, initializeCreditCard, initializeDefaultPropertyValues, initializeGiftCertificate, isCreateSGRelationshipsOnMerge, isOrderStateValidForProcessing, isTransactionMarkedAsRollBack, loadOrder, markTransactionForRollback, mergeOrders, mergeOrders, orderExists, processOrder, processOrder, processOrder, processOrder, processOrderWithReprice, processOrderWithReprice, recalculatePaymentGroupAmounts, removeAllCommerceItemsFromOrder, removeAllHandlingInstructionsFromShippingGroup, removeAllPaymentGroupsFromOrder, removeAllRelationshipsFromCommerceItem, removeAllRelationshipsFromPaymentGroup, removeAllRelationshipsFromShippingGroup, removeAllShippingGroupsFromOrder, removeEmptyPaymentGroups, removeEmptyShippingGroups, removeHandlingInstructionFromShippingGroup, removeHandlingInstructionsFromShippingGroup, removeItemAmountFromPaymentGroup, removeItemFromOrder, removeItemFromPaymentGroupInternal, removeItemQuantityFromShippingGroup, removeOrder, removeOrderAmountFromPaymentGroup, removeOrderFromPaymentGroupInternal, removeOrderMergeListener, removePaymentGroupFromOrder, removeRemainingItemAmountFromPaymentGroup, removeRemainingItemQuantityFromShippingGroup, removeRemainingOrderAmountFromPaymentGroup, removeRemainingShippingCostFromPaymentGroup, removeRemainingTaxAmountFromPaymentGroup, removeShippingCostAmountFromPaymentGroup, removeShippingCostFromPaymentGroupInternal, removeShippingGroupFromOrder, removeTaxAmountFromPaymentGroup, resetOrder, resetOrderCommerceItemRelationships, returnCommerceItem, sendOrderMergeEvent, setCommerceItemItemDescriptorName, setCommerceItemManager, setCommerceItemOrderPropertyName, setCreateSGRelationshipsOnMerge, setDebugOrderRepositoryItemUpdateTransaction, setDefaultLocale, setDefaultOrderByDirection, setDefaultOrderByProperty, setHandlingInstructionManager, setOrderCommerceItemsPropertyName, setOrderItemDescriptorName, setOrderPaymentGroupsPropertyName, setOrderQueries, setOrderRelationshipsPropertyName, setOrderShippingGroupsPropertyName, setOrderTools, setOrderVersionPropertyName, setPaymentGroupItemDescriptorName, setPaymentGroupManager, setPaymentGroupOrderPropertyName, setRelationshipItemDescriptorName, setRelationshipOrderPropertyName, setShippingGroupItemDescriptorName, setShippingGroupManager, setShippingGroupOrderPropertyName, setUserPricingModelsPath, setValidOrderProcessingStates, setValidProcessOrderErrorStates, splitShippingGroup, splitShippingGroup, splitShippingGroupWithImplicitRelationships, updateOrder, validateOrder, validateOrder, validateOrder |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public StoreOrderManager()
Method Detail |
---|
public boolean isAdjustInventoryOnCheckout()
public void setAdjustInventoryOnCheckout(boolean pAdjustInventoryOnCheckout)
pAdjustInventoryOnCheckout
- -
boolean indicating if inventory should be decremented on checkout.public atg.commerce.states.CommerceItemStates getCommerceItemStates()
public void setCommerceItemStates(atg.commerce.states.CommerceItemStates pCommerceItemStates)
pCommerceItemStates
- - the commerce item states component.public void setGiftlistManager(atg.commerce.gifts.GiftlistManager pGiftlistManager)
pGiftlistManager
- a GiftlistManager
valuepublic atg.commerce.gifts.GiftlistManager getGiftlistManager()
GiftlistManager
valuepublic void setAddItemInfoClass(java.lang.String pAddItemInfoClass)
pAddItemInfoClass
- -
the name of the class to be used for elements in the items arraypublic java.lang.String getAddItemInfoClass()
public void setOMSTransactionIdGenerator(atg.service.idgen.IdGenerator pOMSTransactionIdGenerator)
pOMSTransactionIdGenerator
- a OMSTransactionIdGenerator
valuepublic atg.service.idgen.IdGenerator getOMSTransactionIdGenerator()
OMSTransactionIdGenerator
valuepublic void setOMSTransactionIdSpace(java.lang.String pOMSTransactionIdSpace)
pOMSTransactionIdSpace
- a OMSTransactionIdSpace
valuepublic java.lang.String getOMSTransactionIdSpace()
OMSTransactionIdSpace
valuepublic void addGiftMessage(StoreOrderImpl pOrder, java.lang.String pMessageTo, java.lang.String pMessage, java.lang.String pMessageFrom) throws atg.commerce.CommerceException
pOrder
- -
the order to remove gift wrap frompMessageTo
- -
the "message to:" fieldpMessage
- -
the message bodypMessageFrom
- -
the "message from:" field
atg.commerce.CommerceException
- if an error occurs removing item from orderpublic void removeGiftMessage(StoreOrderImpl pOrder) throws atg.commerce.CommerceException
pOrder
- -
the order to remove gift wrap from
atg.commerce.CommerceException
- if an error occurs removing item from orderpublic void addRemoveGiftServices(StoreOrderImpl pOrder, boolean pAddGiftWrap, boolean pAddGiftMessage, java.lang.String pGiftWrapSkuId, java.lang.String pGiftWrapProductId)
pOrder
- -
The orderpAddGiftWrap
- -
boolean value indicating whether or not to add gift wrappAddGiftMessage
- -
boolean value indicating whether or not to add gift messagepGiftWrapSkuId
- -
String value indicating Sku Id of the gift wrappedpGiftWrapProductId
- -
String value indicating Product Id of the gift wrappedpublic void addGiftWrap(StoreOrderImpl pOrder, java.lang.String pSkuId, java.lang.String pProductId) throws atg.commerce.CommerceException
pOrder
- - the order to add gift wrap topSkuId
- - sku idpProductId
- - product id
atg.commerce.CommerceException
- if error creating item or adding item to orderpublic void removeGiftWrap(StoreOrderImpl pOrder) throws atg.commerce.CommerceException
pOrder
- -
the order to remove gift wrap from
atg.commerce.CommerceException
- if an error occurs removing item from orderpublic java.util.List buildItemInfos(atg.commerce.order.Order pOrder)
pOrder
- order
protected java.util.Collection createItemsForGift(atg.commerce.order.Order pOrder, atg.commerce.order.CommerceItem pItem) throws atg.commerce.CommerceException
pOrder
- - orderpItem
- - item
atg.commerce.CommerceException
- If an error occurs creating item for giftprotected StoreAddCommerceItemInfo createAddCommerceItemInfo(atg.commerce.order.CommerceItem pItem) throws atg.commerce.CommerceException
pItem
- the item whose properties should be copied
atg.commerce.CommerceException
- if an error occurspublic boolean compareElectronicShippingGroups(atg.commerce.order.ShippingGroup pSrcShippingGroup, atg.commerce.order.ShippingGroup pDestShippingGroup)
compareElectronicShippingGroups
in class atg.commerce.order.OrderManager
pSrcShippingGroup
- source shipping group to be comparedpDestShippingGroup
- destination shipping group to be compared
public void manageInventoryOnCheckout(atg.commerce.order.Order pOrder) throws atg.commerce.inventory.InventoryException
pOrder
- Order whose commerce items statuses are to be updated in inventory.
description: This method takes the order and iterates through commerce items
to update the inventory status
atg.commerce.inventory.InventoryException
- if an error occurspublic int checkStatus(atg.commerce.order.CommerceItem pCommItem) throws atg.commerce.inventory.InventoryException
pCommItem
- commerce item whose status is to be checked in inventory.
atg.commerce.inventory.InventoryException
- if an error occurspublic java.lang.String getOMSTransactionId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |