atg.commerce.csr.order.edit
Class CSRCloneEditManager

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.order.edit.CloneEditManager
              extended by atg.commerce.csr.order.edit.CSRCloneEditManager
All Implemented Interfaces:
atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, 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 CSRCloneEditManager
extends CloneEditManager

This class contains the CSR extensions to the CloneEditManager


Field Summary
static java.lang.String CLASS_VERSION
           
static java.lang.String CONSUMED_PROMOTIONS_EXTRA_DATA_KEY
          Deprecated. this key is no longer used by CSC
protected  CSRAgentTools mCSRAgentTools
          the agent profile
static java.lang.String TICKETID
          the current ticket id
 
Fields inherited from class atg.commerce.order.edit.CloneEditManager
CLONEDITMANAGER, CLONEEDITSTATE, CLONEORDER, CONSUMED_PROMOTIONS, mCatalogTools, mCloneEditHandlers, mInitializeEditChains, mInventoryManager, mOrderManager, mPipelineManager, mProfileTools, mReconcileOrderChains, mTransactionManager, PROMOTION_COUNTS_BEFORE_UPDATE, PROMOTION_COUPON_MAP
 
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
CSRCloneEditManager()
           
 
Method Summary
 void addConsumablePromotion(CloneEditState pCloneEditState, atg.repository.RepositoryItem pPromotion, int pOrderCountWhenClaimed)
          Deprecated. ConsumablePromotion objects are no longer used by CSC
 ConsumablePromotion createConsumablePromotion(atg.repository.RepositoryItem pPromotion, int pOrderCountWhenClaimed)
          Deprecated. ConsumablePromotion objects are no longer used by CSC
 ConsumablePromotion getConsumablePromotion(CloneEditState pCloneEditState, java.lang.String pPromotionId)
          Deprecated. ConsumablePromotion objects are no longer used by CSC
protected  java.util.Map getConsumablePromotions(CloneEditState pCloneEditState)
          Deprecated. ConsumablePromotion objects are no longer used by CSC
 CSRAgentTools getCSRAgentTools()
           
 java.lang.String getInitializeOrderEditChainId(atg.commerce.order.Order pOrder)
          If the original order is in one of the "submitted" states defined in CSRAgentTools, then the submitted state is returned.
 java.lang.String getReconcileOrderChainId(atg.commerce.order.Order pOrder)
          If the original order is in one of the "submitted" states defined in CSRAgentTools, then the submitted state is returned.
 atg.service.pipeline.PipelineResult reconcileOrder(CloneEditState pCloneEditState, java.util.Map pExtraParameters)
          Extends the base implementation to add a ticket id parameter based on the active ticket.
 void sendAgentEvents(CloneEditState pCloneEditState, atg.repository.RepositoryItem pCustomerProfile, java.lang.String pTicketId)
          This method sends agent events for the changes in the order.
 void setCSRAgentTools(CSRAgentTools pCSRAgentTools)
          Sets the property CSRAgentTools.
 
Methods inherited from class atg.commerce.order.edit.CloneEditManager
adjustCloneCommerceIdReferences, adjustOriginalCommerceIdReferences, applyChanges, buildPropertyValueMap, cloneOrder, consumePromotions, createAddItem, createCloneEditStateObject, createDeleteItem, createPromotionToCouponMap, createUpdateItem, detectUpdatesInFinalAmountInfo, findPropertyUpdate, getCatalogTools, getCloneEditHandlers, getInitializeEditChains, getInventoryManager, getOrderManager, getPipelineManager, getProfileTools, getPromotionTools, getReconcileOrderChains, getTransactionManager, initializeCloneEditState, initializeOrderEdit, initializeOrderEdit, initializeReconciliationProcess, parseConfigurationString, reconcileOrder, reconcileProperties, restoreCouponReferences, sendFulfillmentNotifications, setCatalogTools, setCloneEditHandlers, setInitializeEditChains, setInventoryManager, setOrderManager, setPipelineManager, setProfileTools, setPromotionTools, setReconcileOrderChains, setTransactionManager, validateClonedOrder
 
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
See Also:
Constant Field Values

CONSUMED_PROMOTIONS_EXTRA_DATA_KEY

public static final java.lang.String CONSUMED_PROMOTIONS_EXTRA_DATA_KEY
Deprecated. this key is no longer used by CSC
the string key used to store the consumable promotion objects in the CloneEditState

See Also:
Constant Field Values

TICKETID

public static final java.lang.String TICKETID
the current ticket id

See Also:
Constant Field Values

mCSRAgentTools

protected CSRAgentTools mCSRAgentTools
the agent profile

Constructor Detail

CSRCloneEditManager

public CSRCloneEditManager()
Method Detail

setCSRAgentTools

public void setCSRAgentTools(CSRAgentTools pCSRAgentTools)
Sets the property CSRAgentTools.


getCSRAgentTools

public CSRAgentTools getCSRAgentTools()
Returns:
The value of the property ProfileTools.

sendAgentEvents

public void sendAgentEvents(CloneEditState pCloneEditState,
                            atg.repository.RepositoryItem pCustomerProfile,
                            java.lang.String pTicketId)
This method sends agent events for the changes in the order. The sendAgentEvents method is called on each CloneEditHandler that's an instance of AgentEventHandler.


getConsumablePromotions

protected java.util.Map getConsumablePromotions(CloneEditState pCloneEditState)
Deprecated. ConsumablePromotion objects are no longer used by CSC

Returns the consumable promotions map from the order udpate state.

Parameters:
pCloneEditState -
Returns:
Map of ConsumablePromotions

getConsumablePromotion

public ConsumablePromotion getConsumablePromotion(CloneEditState pCloneEditState,
                                                  java.lang.String pPromotionId)
Deprecated. ConsumablePromotion objects are no longer used by CSC

Returns the ConsumablePromotion object from the CloneEditState based on the given promotion id.

Parameters:
pCloneEditState -
pPromotionId -
Returns:
ConsumablePromotion

addConsumablePromotion

public void addConsumablePromotion(CloneEditState pCloneEditState,
                                   atg.repository.RepositoryItem pPromotion,
                                   int pOrderCountWhenClaimed)
Deprecated. ConsumablePromotion objects are no longer used by CSC

Adds a pConsumablePromotion to the CloneEditState. These promotions are consumed when the order changes are reconciled and committed.

Parameters:
pCloneEditState -
pPromotion -
pOrderCountWhenClaimed - the number of times the promotion appears in the order when it was claimed. This value can be used later to determine if the promotion should be consumed, if the current count is still the same during reconciliation

createConsumablePromotion

public ConsumablePromotion createConsumablePromotion(atg.repository.RepositoryItem pPromotion,
                                                     int pOrderCountWhenClaimed)
Deprecated. ConsumablePromotion objects are no longer used by CSC

Creates an instance of a ConsumablePromotion for the given promotion.

Returns:
ConsumablePromotion

getReconcileOrderChainId

public java.lang.String getReconcileOrderChainId(atg.commerce.order.Order pOrder)
If the original order is in one of the "submitted" states defined in CSRAgentTools, then the submitted state is returned.

Overrides:
getReconcileOrderChainId in class CloneEditManager
Returns:
the name of the pipeline chain use to reconcile the edit updates
See Also:
CloneEditManager.getReconcileOrderChains()

getInitializeOrderEditChainId

public java.lang.String getInitializeOrderEditChainId(atg.commerce.order.Order pOrder)
If the original order is in one of the "submitted" states defined in CSRAgentTools, then the submitted state is returned.

Overrides:
getInitializeOrderEditChainId in class CloneEditManager
Returns:
the name of the pipeline chain use to init the edit updates
See Also:
CloneEditManager.getInitializeEditChains()

reconcileOrder

public atg.service.pipeline.PipelineResult reconcileOrder(CloneEditState pCloneEditState,
                                                          java.util.Map pExtraParameters)
                                                   throws atg.commerce.CommerceException
Extends the base implementation to add a ticket id parameter based on the active ticket.

Overrides:
reconcileOrder in class CloneEditManager
Parameters:
pCloneEditState -
pExtraParameters -
Returns:
the result object from the pipeline execution
Throws:
atg.commerce.CommerceException
See Also:
CloneEditManager.reconcileOrder(CloneEditState, String, Map)