atg.commerce.csr.order
Class CSRPurchaseProcessHelper

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.order.purchase.PurchaseProcessHelper
              extended by atg.commerce.csr.order.CSRPurchaseProcessHelper
All Implemented Interfaces:
atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

public class CSRPurchaseProcessHelper
extends atg.commerce.order.purchase.PurchaseProcessHelper

This extends PurchaseProcessHelper to allow the sending of agent-audit events

See Also:
PurchaseProcessHelper

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.commerce.order.purchase.PurchaseProcessHelper
ERROR_FETCHING_PROFILE, MSG_ERROR_ADDING_CREDIT_CARD, MSG_ERROR_ADDING_SHIPPINGGROUP, MSG_ERROR_ADDING_TO_ORDER, MSG_ERROR_CHANGING_ITEM_QUANTITY, MSG_ERROR_CREATING_ORDER, MSG_ERROR_MOVING_ITEM_BETWEEN_SHIPPING_GROUPS, MSG_ERROR_PROCESS_ADD_ITEM_CHAIN, MSG_ERROR_REMOVING_ITEM, MSG_ERROR_REMOVING_ITEM_FROM_SHIPPING_GROUP, MSG_ERROR_REPRICING_ORDER_AFTER_ADD_ITEM, MSG_ERROR_SETTING_ORDER_AMOUNT, MSG_INVALID_PROFILE_ID
 
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
CSRPurchaseProcessHelper()
           
 
Method Summary
 CSRAgentMessagingTools getAgentMessagingTools()
          Returns component for sending agent messages
 CSRAgentTools getAgentTools()
          Returns AgentTools component
 atg.commerce.messaging.MessageSender getMessageSender()
          Return the MessageSender property.
 atg.commerce.fulfillment.OrderFulfillmentTools getOrderFulfillmentTools()
           
 atg.commerce.states.OrderStates getOrderStates()
          Returns map of valid order states
 atg.commerce.states.PaymentGroupStates getPaymentGroupStates()
          Returns the map of valid payment group states
 atg.commerce.states.ShippingGroupStates getShippingGroupStates()
          Returns the map of valid shipping group states
 java.lang.String getTicketId()
          Returns the Id of the current ticket
protected  void runProcessSendScenarioEvent(atg.commerce.order.Order pOrder, atg.commerce.order.CommerceItem pItem, long pQuantity, boolean pGiftWithPurchase, java.lang.String pType, atg.commerce.util.PipelineErrorHandler pErrorHandler)
          The runProcessSendScenarioEvent method sends a scenario event.
 void setAgentMessagingTools(CSRAgentMessagingTools pAgentMessagingTools)
          Sets the component for sending agent messages
 void setAgentTools(CSRAgentTools pAgentTools)
          Map of valid order states Sets the AgentTools component
 void setMessageSender(atg.commerce.messaging.MessageSender pMessageSender)
          Set the MessageSender property.
 void setOrderFulfillmentTools(atg.commerce.fulfillment.OrderFulfillmentTools pOrderFulfillmentTools)
          Sets the OrderFulfillmentTools component
 void setOrderStates(atg.commerce.states.OrderStates pOrderStates)
          Sets map of valid order states
 void setPaymentGroupStates(atg.commerce.states.PaymentGroupStates pPaymentGroupStates)
          Sets the map of valid payment group states
 void setShippingGroupStates(atg.commerce.states.ShippingGroupStates pShippingGroupStates)
          Sets the map of valid shipping group states
protected  void updateStates(atg.commerce.order.Order pOrder)
          Checks to see if the order, any shipping groups, or any payment groups are in a "PENDING_MERCHANT_ACTION" state.
 
Methods inherited from class atg.commerce.order.purchase.PurchaseProcessHelper
addCreditCardToOrder, addItemsToOrder, addItemsToOrder, addItemToOrder, addItemToShippingGroup, addShippingAddressToOrder, adjustItemRelationshipsForQuantityChange, adjustNonGiftHandlingInstructionsForQuantityDecrease, adjustNonGiftHandlingInstructionsForQuantityIncrease, applyValueDictionary, changeItemQuantity, copyCreditCardInfo, createCommerceItem, createConfigurableSubitems, createOrder, decreaseRelationshipQuantity, deleteItem, deleteItems, deleteItems, getAddItemToOrderChainId, getAddItemToOrderPricingOp, getCommerceItemManager, getDefaultHardgoodShippingGroupType, getDeleteItemsFromOrderPricingOp, getFirstShippingGroup, getGiftlistManager, getOrderManager, getPipelineManager, getRepriceOrderChainId, getShippingGroupForItem, getShippingGroupManager, getTransactionManager, increaseRelationshipQuantity, isAddItemToDefaultShippingGroup, isTransactionMarkedAsRollBack, moveItemBetweenShippingGroups, postAddItemsToOrder, postDeleteItem, postDeleteItem, processGiftAddition, processPipelineErrors, removeEntireRelationshipQuantity, removeItemQuantityFromShippingGroup, runProcess, runProcess, runProcess, runProcessAddItemToOrder, runProcessRepriceOrder, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runRepricingProcess, setAddItemToDefaultShippingGroup, setAddItemToOrderChainId, setAddItemToOrderPricingOp, setCommerceItemManager, setCommerceItemProperties, setDefaultHardgoodShippingGroupType, setDeleteItemsFromOrderPricingOp, setGiftlistManager, setOrderAmountToPaymentGroup, setOrderManager, setPipelineManager, setRepriceOrderChainId, setShippingGroupManager, setTransactionManager
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, 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

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

CSRPurchaseProcessHelper

public CSRPurchaseProcessHelper()
Method Detail

setAgentMessagingTools

public void setAgentMessagingTools(CSRAgentMessagingTools pAgentMessagingTools)
Sets the component for sending agent messages

Parameters:
pAgentMessagingTools -

getAgentMessagingTools

public CSRAgentMessagingTools getAgentMessagingTools()
Returns component for sending agent messages

Returns:
AgentMessagingTools

setAgentTools

public void setAgentTools(CSRAgentTools pAgentTools)
Map of valid order states Sets the AgentTools component

Parameters:
pAgentTools -

getAgentTools

public CSRAgentTools getAgentTools()
Returns AgentTools component

Returns:
AgentTools

setMessageSender

public void setMessageSender(atg.commerce.messaging.MessageSender pMessageSender)
Set the MessageSender property.

Parameters:
pMessageSender - a MessageSender value

getMessageSender

public atg.commerce.messaging.MessageSender getMessageSender()
Return the MessageSender property.

Returns:
a MessageSender value

setOrderFulfillmentTools

public void setOrderFulfillmentTools(atg.commerce.fulfillment.OrderFulfillmentTools pOrderFulfillmentTools)
Sets the OrderFulfillmentTools component

Parameters:
pOrderFulfillmentTools - the OrderFulfillmentTools component

getOrderFulfillmentTools

public atg.commerce.fulfillment.OrderFulfillmentTools getOrderFulfillmentTools()
Returns:
the OrderFulfillmentTools components

setOrderStates

public void setOrderStates(atg.commerce.states.OrderStates pOrderStates)
Sets map of valid order states

Parameters:
pOrderStates - the map of valid order states

getOrderStates

public atg.commerce.states.OrderStates getOrderStates()
Returns map of valid order states


setPaymentGroupStates

public void setPaymentGroupStates(atg.commerce.states.PaymentGroupStates pPaymentGroupStates)
Sets the map of valid payment group states

Parameters:
pPaymentGroupStates - the map of valid payment group states

getPaymentGroupStates

public atg.commerce.states.PaymentGroupStates getPaymentGroupStates()
Returns the map of valid payment group states


setShippingGroupStates

public void setShippingGroupStates(atg.commerce.states.ShippingGroupStates pShippingGroupStates)
Sets the map of valid shipping group states

Parameters:
pShippingGroupStates - the map of valid shipping group states

getShippingGroupStates

public atg.commerce.states.ShippingGroupStates getShippingGroupStates()
Returns the map of valid shipping group states


getTicketId

public java.lang.String getTicketId()
Returns the Id of the current ticket


runProcessSendScenarioEvent

protected void runProcessSendScenarioEvent(atg.commerce.order.Order pOrder,
                                           atg.commerce.order.CommerceItem pItem,
                                           long pQuantity,
                                           boolean pGiftWithPurchase,
                                           java.lang.String pType,
                                           atg.commerce.util.PipelineErrorHandler pErrorHandler)
                                    throws atg.service.pipeline.RunProcessException
The runProcessSendScenarioEvent method sends a scenario event.

Overrides:
runProcessSendScenarioEvent in class atg.commerce.order.purchase.PurchaseProcessHelper
Parameters:
pOrder - an Order value
pItem - a CommerceItem value
pQuantity - the quantity affected
pType - a String value
Throws:
atg.service.pipeline.RunProcessException - if an error occurs

updateStates

protected void updateStates(atg.commerce.order.Order pOrder)
Checks to see if the order, any shipping groups, or any payment groups are in a "PENDING_MERCHANT_ACTION" state. If so, it changes the state back to an "initial" state.

Parameters:
pOrder - the order whose objects should have their states updated