|
||||||||||
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. |
int |
checkStatus(atg.commerce.order.CommerceItem pCommItem)
This method uses the inventory manager to query the availability status of the given commerce item. |
atg.commerce.order.Order |
cloneOrder(java.lang.String pOrderId,
atg.repository.RepositoryItem pProfile)
This method creates an order's duplicate with a new ID. |
atg.commerce.order.Order |
createOrder(java.lang.String pProfileId,
java.lang.String pOrderId,
atg.commerce.pricing.OrderPriceInfo pOrderPriceInfo,
atg.commerce.pricing.TaxPriceInfo pTaxPriceInfo,
atg.commerce.pricing.ShippingPriceInfo pShippingPriceInfo,
java.lang.String pOrderType)
Calls OrderManager.createOrder to create a new Order object using the class mapped to the given name in pOrderType and whose id will be that which is supplied in pOrderId. |
atg.commerce.states.CommerceItemStates |
getCommerceItemStates()
|
java.lang.String |
getCouponCode(StoreOrderImpl pOrder)
This method calculates a coupon code used by the order specified. |
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. |
protected void |
priceOrderTotal(atg.commerce.order.Order pOrder)
This method is a shortcut to the PricingTools.priceOrderTotal(atg.commerce.order.Order) method. |
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 |
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, compareElectronicShippingGroups, compareGiftlistHandlingInstructions, compareHandlingInstructions, compareHardgoodShippingGroups, copyAddress, copyAddress, copyAddress, copyHandlingInstruction, createCommerceItem, createCommerceItem, createCommerceItem, createCommerceItem, createCommerceItem, createCommerceItem, createCommerceItem, createCommerceItem, createHandlingInstruction, createHandlingInstruction, createHandlingInstruction, createHandlingInstruction, createOrder, createOrder, createOrder, createOrder, createOrder, createPaymentGroup, createPaymentGroup, createRelationship, createShippingGroup, createShippingGroup, createShippingGroup, doStartService, getAllCommerceItemRelationships, getAllOrderRelationships, getAllPaymentGroupRelationships, getAllShippingGroupRelationships, getCatalogTools, getCommerceItemItemDescriptorName, getCommerceItemManager, getCommerceItemOrderPropertyName, getCommerceItemsFromPaymentGroup, getCommerceItemsFromShippingGroup, getCostCenterItemDescriptorName, getCostCenterOrderPropertyName, getDateRangeQuery, getDebugOrderRepositoryItemUpdateTransaction, getDefaultLocale, getDefaultOrderByDirection, getDefaultOrderByProperty, getHandlingInstructionManager, getHandlingInstructionsForCommerceItem, getJNDIContext, getOrderCommerceItemsPropertyName, getOrderCostCentersPropertyName, getOrderCountForProfile, getOrderCountForProfileInState, getOrderForCommerceItem, getOrderForCostCenter, 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, getSiteGroupManager, getUnassignedQuantityForCommerceItem, getUniqueCatalogRefIds, getUserPricingModelsPath, getValidOrderProcessingStates, getValidProcessOrderErrorStates, initializeCreditCard, initializeDefaultPropertyValues, initializeGiftCertificate, isCreateSGRelationshipsOnMerge, isOrderStateValidForProcessing, isTransactionMarkedAsRollBack, loadOrder, loadOrders, 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, setCostCenterItemDescriptorName, setCostCenterOrderPropertyName, setCreateSGRelationshipsOnMerge, setDebugOrderRepositoryItemUpdateTransaction, setDefaultLocale, setDefaultOrderByDirection, setDefaultOrderByProperty, setHandlingInstructionManager, setOrderCommerceItemsPropertyName, setOrderCostCentersPropertyName, setOrderItemDescriptorName, setOrderPaymentGroupsPropertyName, setOrderQueries, setOrderRelationshipsPropertyName, setOrderShippingGroupsPropertyName, setOrderTools, setOrderVersionPropertyName, setPaymentGroupItemDescriptorName, setPaymentGroupManager, setPaymentGroupOrderPropertyName, setRelationshipItemDescriptorName, setRelationshipOrderPropertyName, setShippingGroupItemDescriptorName, setShippingGroupManager, setShippingGroupOrderPropertyName, setSiteGroupManager, setUserPricingModelsPath, setValidOrderProcessingStates, setValidProcessOrderErrorStates, splitShippingGroup, splitShippingGroup, splitShippingGroupWithImplicitRelationships, updateOrder, validateOrder, validateOrder, validateOrder |
Methods inherited from class atg.nucleus.GenericService |
---|
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 |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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 final 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 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 atg.commerce.order.Order cloneOrder(java.lang.String pOrderId, atg.repository.RepositoryItem pProfile) throws atg.commerce.CommerceException
pOrderId
- base order, specified by its ID.pProfile
- new order will be created on behalf of this user.
atg.commerce.CommerceException
- if unable to create the order.protected final void priceOrderTotal(atg.commerce.order.Order pOrder) throws atg.commerce.pricing.PricingException
PricingTools.priceOrderTotal(atg.commerce.order.Order)
method.
pOrder
- order to be re-priced.
atg.commerce.pricing.PricingException
- if unable to re-price the order specified.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()
public atg.commerce.order.Order createOrder(java.lang.String pProfileId, java.lang.String pOrderId, atg.commerce.pricing.OrderPriceInfo pOrderPriceInfo, atg.commerce.pricing.TaxPriceInfo pTaxPriceInfo, atg.commerce.pricing.ShippingPriceInfo pShippingPriceInfo, java.lang.String pOrderType) throws atg.commerce.CommerceException
Sets shipping method to the shipping groups the same as profile's default shipping method.
createOrder
in class atg.commerce.order.OrderManager
pProfileId
- the id of the Profile object which this Order belongs topOrderId
- the id which will be assigned to the OrderpOrderPriceInfo
- the OrderPriceInfo object for this OrderpTaxPriceInfo
- the TaxPriceInfo object for this OrderpShippingPriceInfo
- the ShippingPriceInfo object for the default ShippingGrouppOrderType
- the name that is mapped in the OrderTools.properties file to the class of
the desired type to create
atg.commerce.CommerceException
- indicates that a severe error occured while performing a commerce operationpublic java.lang.String getCouponCode(StoreOrderImpl pOrder) throws atg.commerce.CommerceException
pOrder
- order to be inspected.
null
if none of coupons used.
atg.commerce.CommerceException
- if something goes wrong.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |