atg.commerce.csr.order
Class CSROrderHolder

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.logging.ApplicationLoggingImpl
          extended by atg.commerce.order.OrderHolder
              extended by atg.commerce.csr.order.ViewOrderHolder
                  extended by atg.commerce.csr.order.CSROrderHolder
All Implemented Interfaces:
atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.servlet.sessionsaver.Restoreable

public class CSROrderHolder
extends ViewOrderHolder

This class extends ViewOrderHolder to provide functionality for the active working order.

See Also:
ViewOrderHolder

Field Summary
static java.lang.String CLASS_VERSION
           
protected  CloneEditState mCloneEditState
           
protected  java.util.List mItemPriceSources
           
protected  long mLoadTime
           
 
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
CSROrderHolder()
           
 
Method Summary
protected  atg.commerce.order.Order createInitialOrder(atg.repository.RepositoryItem pProfile)
          This method executes its super class's createInitialOrder(RepositoryItem pProfile)
protected  CSRCloneEditManager getCloneEditManager()
          Returns the clone edit manager used to manage changes to a submitted order
 CloneEditState getCloneEditState()
          Contains the CloneEditState object when editing an order that's in a "submitted" state.
 CSRAgentTools getCSRAgentTools()
          Returns the CSR tools component
 atg.commerce.order.Order getCurrent()
          Overrides base behavior to bypass the automatically price the order when it contains commerce items without price infos.
 java.util.List getItemPriceSources()
          Returns the List of ItemPriceSource objects that should be used to price the current order.
 long getLoadTime()
           
 atg.commerce.order.Order getOriginalOrder()
          This method returns the original order if the holder is in clone edit mode.
 ReturnRequest getReturnRequest()
           
 boolean isCloneEditMode()
          This method indicates if the cart is current in clone edit mode.
 void loadOrder(atg.commerce.order.Order pOrder)
          Loads the order into the cart.
protected  void recreatePriceInfos(atg.commerce.order.Order pOrder)
          Deprecated. in favor of OrderPricingRecovery pipeline servlet
 void sessionRestored()
          Extends the base behavior to restore the CloneEditState's cloneOrder to the current order when in clone edit mode.
 void setCloneEditManager(CSRCloneEditManager pCloneEditManager)
           
 void setCloneEditState(CloneEditState pCloneEditState)
           
 void setCSRAgentTools(CSRAgentTools pAgentTools)
           
 void setCurrent(atg.commerce.order.Order pCurrent)
          Override setCurrent to set shippingGroupMapContainerInitialized = false for a new order
 void setItemPriceSources(java.util.List pItemPriceSources)
           
 void setLoadTime(long pLoadTime)
          Returns the time of the current order was loaded
 void setReturnRequest(ReturnRequest pReturnRequest)
          Sets return request associated with the current order
protected  boolean shouldCloneOrder(atg.commerce.order.Order pOrder)
          Determines if the given Order< should use clone edit mode when being loading into the holder.
protected  boolean validActiveShoppingCart(atg.commerce.order.Order pOrder)
          Override validActiveShoppingCart to allow all orders to be valid.
 
Methods inherited from class atg.commerce.csr.order.ViewOrderHolder
getOrderId
 
Methods inherited from class atg.commerce.order.OrderHolder
deleteOrder, getCurrent, getFailoverRecoveryPricingOperation, getHandlerOrderId, getLast, getLoggingIdentifier, getMessageSender, getOrderManager, getOrderType, getProfile, getProfileTools, getRestorableOrders, getSaved, getTransactionManager, handleCreate, handleDelete, handleDeleteAll, handleSwitch, isCurrentEmpty, isCurrentExists, isCurrentTransient, isEmpty, isPersistOrders, isPersistOrdersForAnonymousUsers, isRepriceAfterFailoverRecovery, isSavedEmpty, isSaveEmptyOrders, removeSavedOrder, repriceRestoredShoppingCart, repriceRestoredShoppingCarts, resetOrderProfileId, sendScenarioEvent, sendSwitchOrderMessage, setFailoverRecoveryPricingOperation, setHandlerOrderId, setLast, setLoggingIdentifier, setMessageSender, setOrderManager, setOrderType, setPersistOrders, setPersistOrdersForAnonymousUsers, setProfile, setProfileTools, setRepriceAfterFailoverRecovery, setRestorableOrders, setSaved, setSaveEmptyOrders, setTransactionManager, shouldSaveOnSwitch, switchCurrentOrder, validRestoredShoppingCart
 
Methods inherited from class atg.nucleus.logging.ApplicationLoggingImpl
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, setLoggingWarning
 
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
See Also:
Constant Field Values

mItemPriceSources

protected java.util.List mItemPriceSources

mCloneEditState

protected CloneEditState mCloneEditState

mLoadTime

protected long mLoadTime
Constructor Detail

CSROrderHolder

public CSROrderHolder()
Method Detail

getItemPriceSources

public java.util.List getItemPriceSources()
Returns the List of ItemPriceSource objects that should be used to price the current order.

This List is passed to all pricing operations against the current working order through the extra parameter Map.

This property is set by the CSREnvironmentMonitor when loading submitted orders to be modified.


setItemPriceSources

public void setItemPriceSources(java.util.List pItemPriceSources)

getCloneEditManager

protected CSRCloneEditManager getCloneEditManager()
Returns the clone edit manager used to manage changes to a submitted order


setCloneEditManager

public void setCloneEditManager(CSRCloneEditManager pCloneEditManager)

getCSRAgentTools

public CSRAgentTools getCSRAgentTools()
Returns the CSR tools component

Returns:
CSRAgentTools

setCSRAgentTools

public void setCSRAgentTools(CSRAgentTools pAgentTools)

getCloneEditState

public CloneEditState getCloneEditState()
Contains the CloneEditState object when editing an order that's in a "submitted" state.

Returns:
CloneEditState

setCloneEditState

public void setCloneEditState(CloneEditState pCloneEditState)

setLoadTime

public void setLoadTime(long pLoadTime)
Returns the time of the current order was loaded

Parameters:
pLoadTime -

getLoadTime

public long getLoadTime()

setReturnRequest

public void setReturnRequest(ReturnRequest pReturnRequest)
Sets return request associated with the current order

Parameters:
pReturnRequest - the return request associated with the current order

getReturnRequest

public ReturnRequest getReturnRequest()
Returns:
the return request associated with the current order

setCurrent

public void setCurrent(atg.commerce.order.Order pCurrent)
Override setCurrent to set shippingGroupMapContainerInitialized = false for a new order

Overrides:
setCurrent in class atg.commerce.order.OrderHolder

getCurrent

public atg.commerce.order.Order getCurrent()
Overrides base behavior to bypass the automatically price the order when it contains commerce items without price infos. This can occur after loading an existing incomplete order or after an incomplete order has been invalidated.

Overrides:
getCurrent in class ViewOrderHolder
See Also:
recreatePriceInfos(Order)

recreatePriceInfos

protected void recreatePriceInfos(atg.commerce.order.Order pOrder)
Deprecated. in favor of OrderPricingRecovery pipeline servlet

Reprices the order if it has commerce items without price infos.

Parameters:
pOrder -
See Also:
OrderPricingRecovery

validActiveShoppingCart

protected boolean validActiveShoppingCart(atg.commerce.order.Order pOrder)
Override validActiveShoppingCart to allow all orders to be valid.

Overrides:
validActiveShoppingCart in class atg.commerce.order.OrderHolder

isCloneEditMode

public boolean isCloneEditMode()
This method indicates if the cart is current in clone edit mode.

Returns:
true if the there's an CloneEditState and it hasn't been reconciled yet.

getOriginalOrder

public atg.commerce.order.Order getOriginalOrder()
This method returns the original order if the holder is in clone edit mode. Otherwise is returns the current order.

Returns:
the current working order.

loadOrder

public void loadOrder(atg.commerce.order.Order pOrder)
               throws atg.repository.RepositoryException,
                      atg.commerce.CommerceException
Loads the order into the cart. If the order is in a submitted state the holder is setup for clone editing. Otherwise the order is set as current.

If clone editing is initializes the CloneEditState object is created and saved using the CloneEditState property, the originalOrder property is set to pOrder and current is set the clone order.

Throws:
atg.repository.RepositoryException
atg.commerce.CommerceException
See Also:
CloneEditManager.initializeOrderEdit(Order)

shouldCloneOrder

protected boolean shouldCloneOrder(atg.commerce.order.Order pOrder)
Determines if the given Order< should use clone edit mode when being loading into the holder.

returns true if the order is in a clone edit state as determined by the isCloneEditState method AND is considered modifiable as returned by the isOrderModifiable method

Parameters:
pOrder -
Returns:
true if the clone edit mode should be used

createInitialOrder

protected atg.commerce.order.Order createInitialOrder(atg.repository.RepositoryItem pProfile)
                                               throws atg.commerce.CommerceException
This method executes its super class's createInitialOrder(RepositoryItem pProfile)
Overrides:
createInitialOrder in class atg.commerce.order.OrderHolder
Parameters:
pProfile -
Throws:
atg.commerce.CommerceException

sessionRestored

public void sessionRestored()
Extends the base behavior to restore the CloneEditState's cloneOrder to the current order when in clone edit mode.

Specified by:
sessionRestored in interface atg.servlet.sessionsaver.Restoreable
Overrides:
sessionRestored in class atg.commerce.order.OrderHolder