atg.commerce.csr.order
Class CSRPaymentGroupFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by atg.commerce.order.purchase.PurchaseProcessFormHandler
                      extended by atg.commerce.order.purchase.PaymentGroupFormHandler
                          extended by atg.commerce.csr.order.CSRPaymentGroupFormHandler
All Implemented Interfaces:
atg.commerce.order.purchase.CreatePaymentGroupFormHandler, atg.commerce.util.PipelineErrorHandler, atg.droplet.DropletFormHandler, 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 CSRPaymentGroupFormHandler
extends atg.commerce.order.purchase.PaymentGroupFormHandler
implements atg.commerce.order.purchase.CreatePaymentGroupFormHandler

The CSRPaymentGroupFormHandler class is used to claim gift certificates and coupons. A GiftCertificate is added to a PaymentGroupMapContainer

See Also:
GenericFormHandler, PurchaseProcessFormHandler

Field Summary
static java.lang.String CLASS_VERSION
           
protected static java.lang.String COULD_NOT_FIND_CLAIMABLE_ITEM
           
protected static java.lang.String COULD_NOT_PROCESS_COUPON
           
protected static java.lang.String COUPON_TYPE
           
protected static java.lang.String EMPTY_CLAIMABLE_CODE
           
protected static java.lang.String ERROR_CLAIMING_CLAIM_CODE
           
protected static java.lang.String ERROR_WHILE_FETCHING_PRICE_LIST
           
protected static java.lang.String ERROR_WHILE_PERSISTING_ORDER
           
protected static java.lang.String GIFT_CERTIFICATE_TYPE
           
protected static java.lang.String JSON_ERROR_ATTRIBUTE
           
protected  CSRAgentTools mCSRAgentTools
           
protected  CSREnvironmentTools mCSREnvironmentTools
           
protected  atg.web.messaging.MessageTools mMessageTools
           
protected  ReturnManager mReturnManager
           
protected static java.lang.String MSG_ERROR_SAVING_PAYMENT_INFO
           
protected static java.lang.String NO_CLAIMABLE_ITEM_FUNDS
           
protected static java.lang.String ORDERRESOURCES
          Resources file
protected  java.util.ResourceBundle sBundle
           
protected static java.lang.String STORE_CREDIT_TYPE
           
 
Fields inherited from class atg.commerce.order.purchase.PaymentGroupFormHandler
MSG_INVALID_PAYMENT_SPLIT_NUMBER, MSG_NO_DEFAULT_PAYMENT_GROUP
 
Fields inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUE
 
Fields inherited from class atg.droplet.GenericFormHandler
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
 
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
CSRPaymentGroupFormHandler()
          Creates a new CSRPaymentGroupFormHandler instance.
 
Method Summary
protected  void claimCoupon(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, java.lang.String pClaimCode)
          If the order hasn't been submitted yet, the ClaimableManager is called to claim the coupon.
 void claimItem(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          claimItem claims a coupon or creates a new GiftCertificate.
protected  java.util.Map createRepriceParameterMap()
          Creates the extra parameter map for pricing the order after form handler modifications.
 CSRAgentMessagingTools getAgentMessagingTools()
          Returns component for sending agent messages
 java.lang.String getClaimCode()
          Return the ClaimCode property.
 java.lang.String getClaimItemErrorURL()
          Return the ClaimItemErrorURL property.
 java.lang.String getClaimItemSuccessURL()
          Return the ClaimItemSuccessURL property.
 CSRAgentTools getCSRAgentTools()
           
 CSREnvironmentTools getCSREnvironmentTools()
           
 java.lang.String getGiftCertificateType()
          Return the GiftCertificateType property.
 atg.web.messaging.MessageTools getMessageTools()
          Returns the MessageTools component
 ReturnManager getReturnManager()
           
 java.lang.String getStoreCreditType()
          Return the StoreCreditType property.
 SubmittedOrderPricingModelHolder getSubmittedOrderPricingModels()
          Returns property SubmittedOrderPricingModels
 java.lang.String getTicketId()
          Returns the Id of the current ticket
 atg.commerce.pricing.PricingModelHolder getUserPricingModels()
          Returns the PricingModelHolder that should be used for the current order.
 boolean handleClaimItem(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          handleClaimItem is used to claim the coupon or gift certificate.
 boolean handlePreserveUserInputOnServerSide(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method is used to preserve any user inputs in the server's memeory.
 boolean isAllowCouponClaim()
          If the coupon is allowed to be claim as claimables for payment options with Gift Certificate/Store Credit/ Coupon,then set this falg to true to claim the coupon.
 boolean isPersistOrder()
           
 void postApplyPaymentGroups(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          postApplyPaymentGroups is for work that must happen after the PaymentGroups are applied.
 void postClaimItem(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          postClaimItem is for work that must happen after a coupon or GiftCertificate is claimed.
 void postPreserveUserInputOnServerSide(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          postPreserveUserInputOnServerSide is for work that must happen after the user selections are saved.
 void preApplyPaymentGroups(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          preApplyPaymentGroups is for work that must happen before the PaymentGroups are applied to the Order.
 void preClaimItem(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          preClaimItem is for work that must happen before a coupon or gift certificate is claimed.
 void prePreserveUserInputOnServerSide(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          prePreserveUserInputOnServerSide is for work that must happen before the user selections are retained.
 void setAgentMessagingTools(CSRAgentMessagingTools pAgentMessagingTools)
          Sets the component for sending agent messages
 void setAllowCouponClaim(boolean pAllowCouponClaim)
          If the coupon is allowed to be claim as claimables for payment options with Gift Certificate/Store Credit/ Coupon,then set this falg to true to claim the coupon.
 void setClaimCode(java.lang.String pClaimCode)
          Set the ClaimCode property.
 void setClaimItemErrorURL(java.lang.String pClaimItemErrorURL)
          Set the ClaimItemErrorURL property.
 void setClaimItemSuccessURL(java.lang.String pClaimItemSuccessURL)
          Set the ClaimItemSuccessURL property.
 void setCSRAgentTools(CSRAgentTools pCSRAgentTools)
          Sets the property CSRAgentTools.
 void setCSREnvironmentTools(CSREnvironmentTools pCSREnvironmentTools)
           
 void setGiftCertificateType(java.lang.String pGiftCertificateType)
          Set the GiftCertificateType property.
 void setMessageTools(atg.web.messaging.MessageTools pMessageTools)
           
 void setPersistOrder(boolean pPersistOrder)
           
 void setReturnManager(ReturnManager pReturnManager)
          Sets the property ReturnManager.
 void setStoreCreditType(java.lang.String pStoreCreditType)
          Set the StoreCreditType property.
 void setSubmittedOrderPricingModels(SubmittedOrderPricingModelHolder pSubmittedOrderPricingModels)
          Sets property SubmittedOrderPricingModels
 
Methods inherited from class atg.commerce.order.purchase.PaymentGroupFormHandler
applyCommerceIdentifierPaymentInfo, applyDefaultPaymentGroup, applyPaymentGroups, createSpecificPaymentInfo, getApplyPaymentGroupsErrorURL, getApplyPaymentGroupsSuccessURL, getCurrentList, getCurrentPaymentGroup, getDefaultPaymentGroupName, getListId, getPaymentGroup, getPaymentGroupId, getSpecifyDefaultPaymentGroupErrorURL, getSpecifyDefaultPaymentGroupSuccessURL, getSplitPaymentInfosErrorURL, getSplitPaymentInfosSuccessURL, getValidatePaymentGroupsChainId, handleApplyPaymentGroups, handleSpecifyDefaultPaymentGroup, handleSplitPaymentInfos, isAllowPaymentGroupsWithZeroAmount, isApplyDefaultPaymentGroup, isPaymentGroupInOrder, postSpecifyDefaultPaymentGroup, postSplitPaymentInfos, preSpecifyDefaultPaymentGroup, preSplitPaymentInfos, runProcessValidatePaymentGroups, setAllowPaymentGroupsWithZeroAmount, setApplyDefaultPaymentGroup, setApplyPaymentGroupsErrorURL, setApplyPaymentGroupsSuccessURL, setCurrentList, setCurrentPaymentGroup, setDefaultPaymentGroupName, setListId, setPaymentGroupId, setSpecifyDefaultPaymentGroupErrorURL, setSpecifyDefaultPaymentGroupSuccessURL, setSplitPaymentInfosErrorURL, setSplitPaymentInfosSuccessURL, setValidatePaymentGroupsChainId, specifyDefaultPaymentGroup, splitCommerceIdentifierPaymentInfo, splitCommerceIdentifierPaymentInfoByAmount, splitPaymentInfos
 
Methods inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler
acquireTransactionLock, acquireTransactionLock, afterSet, beforeSet, checkFormRedirect, commitTransaction, copyConfiguration, defaultLocalLockManager, defaultUserProfile, doStartService, ensureTransaction, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getClaimableManager, getCommerceIdentifierPaymentInfoContainer, getCommerceItemManager, getCommerceItemShippingInfoContainer, getCommerceProfileTools, getCommercePropertyManager, getConfiguration, getCurrentTransaction, getDefaultLocale, getGiftlistManager, getHandlingInstructionManager, getLocalLockManager, getOrder, getOrderManager, getPaymentGroupManager, getPaymentGroupMapContainer, getPipelineManager, getPriceList, getPriceListId, getPriceListManager, getProfile, getProfileRepository, getPurchaseProcessHelper, getRepeatingRequestMonitor, getRepriceOrderChainId, getResourceBundle, getResourceBundle, getResourceBundleName, getSessionExpirationURL, getShippingGroupManager, getShippingGroupMapContainer, getShoppingCart, getTransactionManager, getUserLocale, getUserLocale, handlePipelineError, isEnsureTransaction, isFormSubmission, isTransactionCreated, isTransactionMarkedAsRollBack, isUseLocksAroundTransactions, isUseRequestLocale, processException, processPipelineErrors, releaseTransactionLock, releaseTransactionLock, runProcess, runProcess, runProcess, runProcessRepriceOrder, runProcessRepriceOrder, runRepricingProcess, setClaimableManager, setCommerceIdentifierPaymentInfoContainer, setCommerceItemManager, setCommerceItemShippingInfoContainer, setCommerceProfileTools, setCommercePropertyManager, setConfiguration, setCurrentTransaction, setDefaultLocale, setEnsureTransaction, setGiftlistManager, setHandlingInstructionManager, setLocalLockManager, setOrder, setOrderManager, setPaymentGroupManager, setPaymentGroupMapContainer, setPipelineManager, setPriceListId, setPriceListManager, setProfile, setProfileRepository, setPurchaseProcessHelper, setRepeatingRequestMonitor, setRepriceOrderChainId, setSessionExpirationURL, setShippingGroupManager, setShippingGroupMapContainer, setShoppingCart, setTransactionCreated, setTransactionManager, setTransactionToRollbackOnly, setUseLocksAroundTransactions, setUseRequestLocale, setUserLocale, setUserPricingModels, transactionLockName, unsetTransactionCreated
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
 
Methods inherited from class atg.droplet.EmptyFormHandler
afterGet, beforeGet
 
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

CLASS_VERSION

public static java.lang.String CLASS_VERSION

ORDERRESOURCES

protected static final java.lang.String ORDERRESOURCES
Resources file

See Also:
Constant Field Values

sBundle

protected final java.util.ResourceBundle sBundle

COUPON_TYPE

protected static final java.lang.String COUPON_TYPE
See Also:
Constant Field Values

GIFT_CERTIFICATE_TYPE

protected static final java.lang.String GIFT_CERTIFICATE_TYPE
See Also:
Constant Field Values

STORE_CREDIT_TYPE

protected static final java.lang.String STORE_CREDIT_TYPE
See Also:
Constant Field Values

JSON_ERROR_ATTRIBUTE

protected static final java.lang.String JSON_ERROR_ATTRIBUTE
See Also:
Constant Field Values

NO_CLAIMABLE_ITEM_FUNDS

protected static final java.lang.String NO_CLAIMABLE_ITEM_FUNDS
See Also:
Constant Field Values

EMPTY_CLAIMABLE_CODE

protected static final java.lang.String EMPTY_CLAIMABLE_CODE
See Also:
Constant Field Values

COULD_NOT_FIND_CLAIMABLE_ITEM

protected static final java.lang.String COULD_NOT_FIND_CLAIMABLE_ITEM
See Also:
Constant Field Values

COULD_NOT_PROCESS_COUPON

protected static final java.lang.String COULD_NOT_PROCESS_COUPON
See Also:
Constant Field Values

ERROR_WHILE_PERSISTING_ORDER

protected static final java.lang.String ERROR_WHILE_PERSISTING_ORDER
See Also:
Constant Field Values

ERROR_WHILE_FETCHING_PRICE_LIST

protected static final java.lang.String ERROR_WHILE_FETCHING_PRICE_LIST
See Also:
Constant Field Values

ERROR_CLAIMING_CLAIM_CODE

protected static final java.lang.String ERROR_CLAIMING_CLAIM_CODE
See Also:
Constant Field Values

MSG_ERROR_SAVING_PAYMENT_INFO

protected static final java.lang.String MSG_ERROR_SAVING_PAYMENT_INFO
See Also:
Constant Field Values

mCSRAgentTools

protected CSRAgentTools mCSRAgentTools

mReturnManager

protected ReturnManager mReturnManager

mMessageTools

protected atg.web.messaging.MessageTools mMessageTools

mCSREnvironmentTools

protected CSREnvironmentTools mCSREnvironmentTools
Constructor Detail

CSRPaymentGroupFormHandler

public CSRPaymentGroupFormHandler()
Creates a new CSRPaymentGroupFormHandler instance.

Method Detail

isPersistOrder

public boolean isPersistOrder()
Returns:
the persistOrder

setPersistOrder

public void setPersistOrder(boolean pPersistOrder)
Parameters:
pPersistOrder - The persistOrder to set.

getUserPricingModels

public atg.commerce.pricing.PricingModelHolder getUserPricingModels()
Returns the PricingModelHolder that should be used for the current order.

Overrides:
getUserPricingModels in class atg.commerce.order.purchase.PurchaseProcessFormHandler
Returns:
a PricingModelHolder value
See Also:
CSREnvironmentTools.getOrderPricingModelHolder(Order)

setSubmittedOrderPricingModels

public void setSubmittedOrderPricingModels(SubmittedOrderPricingModelHolder pSubmittedOrderPricingModels)
Sets property SubmittedOrderPricingModels

Parameters:
pSubmittedOrderPricingModels - a SubmittedOrderPricingModels value

getSubmittedOrderPricingModels

public SubmittedOrderPricingModelHolder getSubmittedOrderPricingModels()
Returns property SubmittedOrderPricingModels

Returns:
a SubmittedOrderPricingModels value

setCSRAgentTools

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


getCSRAgentTools

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

setReturnManager

public void setReturnManager(ReturnManager pReturnManager)
Sets the property ReturnManager.


getReturnManager

public ReturnManager getReturnManager()
Returns:
The value of the property ReturnManager.

getMessageTools

public atg.web.messaging.MessageTools getMessageTools()
Returns the MessageTools component

Returns:
MessageTools

setMessageTools

public void setMessageTools(atg.web.messaging.MessageTools pMessageTools)

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

setClaimCode

public void setClaimCode(java.lang.String pClaimCode)
Set the ClaimCode property.

Parameters:
pClaimCode - a String value

getClaimCode

public java.lang.String getClaimCode()
Return the ClaimCode property.

Returns:
a String value

setClaimItemSuccessURL

public void setClaimItemSuccessURL(java.lang.String pClaimItemSuccessURL)
Set the ClaimItemSuccessURL property.

Parameters:
pClaimItemSuccessURL - a String value

getClaimItemSuccessURL

public java.lang.String getClaimItemSuccessURL()
Return the ClaimItemSuccessURL property.

Returns:
a String value

setClaimItemErrorURL

public void setClaimItemErrorURL(java.lang.String pClaimItemErrorURL)
Set the ClaimItemErrorURL property.

Parameters:
pClaimItemErrorURL - a String value

getClaimItemErrorURL

public java.lang.String getClaimItemErrorURL()
Return the ClaimItemErrorURL property.

Returns:
a String value

setGiftCertificateType

public void setGiftCertificateType(java.lang.String pGiftCertificateType)
Set the GiftCertificateType property.

Parameters:
pGiftCertificateType - a String value

getGiftCertificateType

public java.lang.String getGiftCertificateType()
Return the GiftCertificateType property.

Returns:
a String value

setStoreCreditType

public void setStoreCreditType(java.lang.String pStoreCreditType)
Set the StoreCreditType property.

Parameters:
pStoreCreditType - a String value

getStoreCreditType

public java.lang.String getStoreCreditType()
Return the StoreCreditType property.

Returns:
a String value

isAllowCouponClaim

public boolean isAllowCouponClaim()
If the coupon is allowed to be claim as claimables for payment options with Gift Certificate/Store Credit/ Coupon,then set this falg to true to claim the coupon. In some forms, user may want to claim only gift certificate (GC) and store credit (SC),in those cases you can use isAllowCouponClaim() to restrict the claimables to be within GC and SC.

Returns:
the allowCouponClaim

setAllowCouponClaim

public void setAllowCouponClaim(boolean pAllowCouponClaim)
If the coupon is allowed to be claim as claimables for payment options with Gift Certificate/Store Credit/ Coupon,then set this falg to true to claim the coupon. In some forms, user may want to claim only gift certificate (GC) and store credit (SC),in those cases you can use isAllowCouponClaim() to restrict the claimables to be within GC and SC.

Parameters:
pAllowCouponClaim - The allowCouponClaim to set.

setCSREnvironmentTools

public void setCSREnvironmentTools(CSREnvironmentTools pCSREnvironmentTools)
Parameters:
pCSREnvironmentTools - the CSREnvironmentTools to set

getCSREnvironmentTools

public CSREnvironmentTools getCSREnvironmentTools()
Returns:
the CSREnvironmentTools

getTicketId

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


handleClaimItem

public boolean handleClaimItem(atg.servlet.DynamoHttpServletRequest pRequest,
                               atg.servlet.DynamoHttpServletResponse pResponse)
                        throws javax.servlet.ServletException,
                               java.io.IOException
handleClaimItem is used to claim the coupon or gift certificate.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
a boolean value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

preClaimItem

public void preClaimItem(atg.servlet.DynamoHttpServletRequest pRequest,
                         atg.servlet.DynamoHttpServletResponse pResponse)
                  throws javax.servlet.ServletException,
                         java.io.IOException
preClaimItem is for work that must happen before a coupon or gift certificate is claimed.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postClaimItem

public void postClaimItem(atg.servlet.DynamoHttpServletRequest pRequest,
                          atg.servlet.DynamoHttpServletResponse pResponse)
                   throws javax.servlet.ServletException,
                          java.io.IOException
postClaimItem is for work that must happen after a coupon or GiftCertificate is claimed.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

claimItem

public void claimItem(atg.servlet.DynamoHttpServletRequest pRequest,
                      atg.servlet.DynamoHttpServletResponse pResponse)
claimItem claims a coupon or creates a new GiftCertificate. The GiftCertficateType property gives the type of PaymentGroup to create. The GiftCertificateNumber property gives the name of the new PaymentGroup, as it will be referenced in the PaymentGroupMapContainer. The GiftCertificate is added to the PaymentGroupMapContainer and either the gift certificate amount or the total amount of the order is assigned to the gift certificate (whichever is smaller).

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value

claimCoupon

protected void claimCoupon(atg.commerce.order.Order pOrder,
                           atg.repository.RepositoryItem pProfile,
                           java.lang.String pClaimCode)
                    throws atg.commerce.claimable.ClaimableException,
                           atg.repository.RepositoryException,
                           atg.commerce.promotion.PromotionException,
                           atg.commerce.CommerceException
If the order hasn't been submitted yet, the ClaimableManager is called to claim the coupon. Otherwise, the coupon is claimed for the submitted order.

Parameters:
pOrder - the order for which the coupon is being claimed (ignored)
pProfile - the customer profile (ignored)
pClaimCode - the coupon claim code
Throws:
atg.commerce.claimable.ClaimableException
atg.repository.RepositoryException
atg.commerce.promotion.PromotionException
atg.commerce.CommerceException
See Also:
CSRAgentTools.claimCoupon(String, String, Map)

prePreserveUserInputOnServerSide

public void prePreserveUserInputOnServerSide(atg.servlet.DynamoHttpServletRequest pRequest,
                                             atg.servlet.DynamoHttpServletResponse pResponse)
                                      throws javax.servlet.ServletException,
                                             java.io.IOException
prePreserveUserInputOnServerSide is for work that must happen before the user selections are retained.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postPreserveUserInputOnServerSide

public void postPreserveUserInputOnServerSide(atg.servlet.DynamoHttpServletRequest pRequest,
                                              atg.servlet.DynamoHttpServletResponse pResponse)
                                       throws javax.servlet.ServletException,
                                              java.io.IOException
postPreserveUserInputOnServerSide is for work that must happen after the user selections are saved.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

handlePreserveUserInputOnServerSide

public boolean handlePreserveUserInputOnServerSide(atg.servlet.DynamoHttpServletRequest pRequest,
                                                   atg.servlet.DynamoHttpServletResponse pResponse)
                                            throws javax.servlet.ServletException,
                                                   java.io.IOException
This method is used to preserve any user inputs in the server's memeory. For example if an agent is in the billing page and the page has few drop downs or input element and edit icon to edit a credit card. If the agent changes the values in the drop down/input element and prefers to click on the edit icon to edit a credit card. The edit credit card action will refresh the multiple shipping page with current information (without the user's selection. because it is not saved in the server object). In order to retain the user information, they have to call this method to preserve the user input or selections. This method creates a json object and sends them in the response. The data or response receiving layer should understand text/json data stream.

Parameters:
pRequest -
pResponse -
Returns:
boolean
Throws:
javax.servlet.ServletException
java.io.IOException

postApplyPaymentGroups

public void postApplyPaymentGroups(atg.servlet.DynamoHttpServletRequest pRequest,
                                   atg.servlet.DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
postApplyPaymentGroups is for work that must happen after the PaymentGroups are applied.

Overrides:
postApplyPaymentGroups in class atg.commerce.order.purchase.PaymentGroupFormHandler
Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

createRepriceParameterMap

protected java.util.Map createRepriceParameterMap()
Creates the extra parameter map for pricing the order after form handler modifications.

Overrides:
createRepriceParameterMap in class atg.commerce.order.purchase.PurchaseProcessFormHandler
Returns:
Map of parameters or null
See Also:
CSRAgentTools.addCurrentOrderPricingParameters(Map)

preApplyPaymentGroups

public void preApplyPaymentGroups(atg.servlet.DynamoHttpServletRequest pRequest,
                                  atg.servlet.DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
preApplyPaymentGroups is for work that must happen before the PaymentGroups are applied to the Order.

This extension ensures that one of the OrderPaymentInfos in the container, if there are any, has a relationship type of ORDER_AMOUNT_REMAINING.

Overrides:
preApplyPaymentGroups in class atg.commerce.order.purchase.PaymentGroupFormHandler
Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
See Also:
CSRAgentTools.ensureOrderAmountRemainingType(CommerceIdentifierPaymentInfoContainer, PaymentGroupMapContainer)