atg.commerce.csr.returns
Class BaseReturnFormHandler

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.csr.returns.BaseReturnFormHandler
All Implemented Interfaces:
atg.commerce.util.PipelineErrorHandler, DropletFormHandler, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class BaseReturnFormHandler
extends PurchaseProcessFormHandler

This formhandler provides the basic operations needed to complete a merchandise return.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  java.lang.String mApplyRefundsErrorURL
           
protected  java.lang.String mApplyRefundsSuccessURL
           
protected  java.lang.String mCancelReturnRequestErrorURL
           
protected  java.lang.String mCancelReturnRequestSuccessURL
           
protected  java.lang.String mConfirmReturnErrorURL
           
protected  java.lang.String mCreateReturnRequestPipelineChainId
           
protected  atg.commerce.csr.returns.ProcessName mCreateReturnRequestProcessName
           
protected  java.lang.String mOriginOfReturn
           
protected  java.lang.String mReplacementOrderSalesChannel
           
protected  ReturnManager mReturnManager
           
protected  java.lang.String mReturnOrderId
           
protected  ReturnRequest mReturnRequest
           
protected  boolean mSelectAllItems
           
 java.lang.String mSelectAllItemsReturnReason
           
protected  java.lang.String mSelectItemsErrorURL
           
protected  atg.commerce.csr.returns.ProcessName mSelectItemsProcessName
           
protected  java.lang.String mSelectItemsSuccessURL
           
static java.lang.String MSG_ERROR_APPLYING_SELECTED_ITEMS
           
static java.lang.String MSG_ERROR_CONFIRMING_RETURN_REQUEST
           
static java.lang.String MSG_ERROR_WHILE_CREATING_RETURN_REQUEST
          Message id statics
protected  java.util.List<RefundMethod> mSortedRefundMethodList
           
 
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
BaseReturnFormHandler()
           
 
Method Summary
 void applyRefunds(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Executes the given pipeline to validate the refund method allocations.
 void cancelReturnRequest(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
           This method cancels the active return request by nulling out the ReturnRequest in the OrderHolder's returnRequest property.
 boolean confirmReturn(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Confirms the return request
 void createReturnRequest(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Creates a new return request for the orderId returned by getReturnOrderId() and puts it in the OrderHolder's returnRequest property.
protected  java.util.Map generateApplyRefundAllocationsExtraParameters()
          Generates the extra parameter for the apply refund allocations pipeline.
protected  java.util.Map generateConfirmExtraParameters()
          Called to generate the extra parameter Map that is passed to the confirmation pipeline
protected  java.util.Map generateCreateReturnRequestExtraParameters()
          Generates the extra parameter for the create return request pipeline.
protected  java.util.Map generateSelectItemsExtraParameters()
          Called to generate the extra parameter Map that is passed to the confirmation pipeline
 java.lang.String getApplyRefundsErrorURL()
           
 java.lang.String getApplyRefundsSuccessURL()
           
 java.lang.String getCancelReturnRequestErrorURL()
          Returns the cancelReturnRequestErrorURL.
 java.lang.String getCancelReturnRequestSuccessURL()
          Returns the cancelReturnRequestSuccessURL.
 java.lang.String getConfirmReturnErrorURL()
           
 java.lang.String getConfirmReturnSuccessURL()
           
 java.lang.String getCreateReturnRequestErrorURL()
           
 java.lang.String getCreateReturnRequestPipelineChainId()
           
 atg.commerce.csr.returns.ProcessName getCreateReturnRequestProcessName()
          This value is used to set the process name when creating a new ReturnRequest.
 java.lang.String getCreateReturnRequestSuccessURL()
           
 java.util.List<RefundMethod> getModifiableRefundMethodList()
          Returns a filtered List of the RefundMethods to remove the replacement order store credit refund method.
 java.lang.String getOriginOfReturn()
          This origin value is used to set the originOfReturn property of the ReturnRequest when a return is created.
 void getOriginOfReturn(java.lang.String pOriginOfReturn)
           
 java.util.List getReasonCodes()
          Retrieve a list of reason codes
 java.lang.String getReplacementOrderSalesChannel()
          Returns the salesChannel.
 ReturnManager getReturnManager()
          Returns the return manager object
 java.lang.String getReturnOrderId()
          This property specifies the order id for which the ReturnRequest will be created by {@link #createReturnRequest(DynamoHttpServletRequest, DynamoHttpServletResponse)
 ReturnRequest getReturnRequest()
          Returns the current return request from the OrderHolder
 java.lang.String getSelectAllItemsReturnReason()
          Returns the reason code used for returning all the items in the order.
 java.lang.String getSelectItemsErrorURL()
           
 atg.commerce.csr.returns.ProcessName getSelectItemsProcessName()
          This value is used to set the process name on the ReturnRequest prior to applying the selected ReturnItems.
 java.lang.String getSelectItemsSuccessURL()
           
 java.util.List<RefundMethod> getSortedRefundMethodList()
          This method takes the #getReturnRequest().getRefundMethodList() and sorts the refund method based on "refundType" property.
 boolean handleApplyRefunds(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          handler for applying the refund method allocations
 boolean handleCancelReturnRequest(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
           This method cancels the active return request
 boolean handleConfirmReturn(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Confirms a return request
 boolean handleCreateReturnRequest(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
           
 boolean handleSelectItems(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Selects Items for return
 boolean isSelectAllItems()
          If true, all returnable items are automatically selected for return.
 void postApplyRefunds(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called after all processing is done by the handleApplyRefunds method.
 void postCancelReturnRequest(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is called after all processing is done by the handleCancelReturnRequest method.
 void postConfirmReturn(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called after all processing is done by the handleConfirmReturn method.
 void postCreateReturnRequest(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Execute after creating the new ReturnRequest
 void postSelectItems(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called after any processing is done by the handleSelectItems method.
 void preApplyRefunds(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called before any processing is done by the handleApplyRefunds method.
 void preCancelReturnRequest(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This method is called before any processing is done by the handleCancelReturnRequest method.
 void preConfirmReturn(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called before any processing is done by the handleConfirmReturn method.
 void preCreateReturnRequest(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Executed prior to creating the ReturnRequest
 void preSelectItems(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          This is called before any processing is done by the handleSelectItems method.
 void rollbackTransaction()
          This method is used to roll-back the current transaction.
protected  void selectAllReturnItems(ReturnRequest pReturnRequest, java.lang.String pReturnReason)
          Selects all returnable items for return by setting their quantityToReturn and returnReason values.
 void selectItems(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Processes the selected items for the return request
 void setApplyRefundsErrorURL(java.lang.String pApplyRefundsErrorURL)
           
 void setApplyRefundsSuccessURL(java.lang.String pApplyRefundsSuccessURL)
           
 void setCancelReturnRequestErrorURL(java.lang.String pCancelReturnRequestErrorURL)
          Sets the cancelReturnRequestErrorURL.
 void setCancelReturnRequestSuccessURL(java.lang.String pCancelReturnRequestSuccessURL)
          Sets the cancelReturnRequestSuccessURL.
 void setConfirmReturnErrorURL(java.lang.String pConfirmReturnErrorURL)
          Sets URL to go to after an error occurs in handleConfirmReturn
 void setConfirmReturnSuccessURL(java.lang.String pConfirmReturnSuccessURL)
          Sets URL to go to after handleConfirmReturn successfully runs.
 void setCreateReturnRequestErrorURL(java.lang.String pCreateReturnRequestErrorURL)
          Sets URL to go to after an error occurs in handleCreateReturnRequest
 void setCreateReturnRequestPipelineChainId(java.lang.String pCreateReturnRequestPipelineChainId)
           
 void setCreateReturnRequestProcessName(atg.commerce.csr.returns.ProcessName pCreateReturnRequestProcessName)
           
 void setCreateReturnRequestSuccessURL(java.lang.String pCreateReturnRequestSuccessURL)
          Sets URL to go to after handleCreateReturnRequest successfully runs.
 void setReplacementOrderSalesChannel(java.lang.String pSalesChannel)
          Sets the salesChannel.
 void setReturnManager(ReturnManager pReturnManager)
          sets the return manager object
 void setReturnOrderId(java.lang.String pReturnOrderId)
           
 void setReturnRequest(ReturnRequest pReturnRequest)
          Sets the current return request
 void setSelectAllItems(boolean pSelectAllItems)
           
 void setSelectAllItemsReturnReason(java.lang.String pSelectAllItemsReturnReason)
           
 void setSelectItemsErrorURL(java.lang.String pSelectItemsErrorURL)
          Sets URL to go to after an error occurs in handleSelectItems
 void setSelectItemsProcessName(atg.commerce.csr.returns.ProcessName pSelectItemsProcessName)
           
 void setSelectItemsSuccessURL(java.lang.String pSelectItemsSuccessURL)
          Sets URL to go to after handleSelectItems successfully runs.
 
Methods inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler
acquireTransactionLock, acquireTransactionLock, afterSet, beforeSet, checkFormRedirect, commitTransaction, copyConfiguration, createRepriceParameterMap, 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, getUserPricingModels, handlePipelineError, isConcurrentUpdate, 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
Class version string


MSG_ERROR_WHILE_CREATING_RETURN_REQUEST

public static final java.lang.String MSG_ERROR_WHILE_CREATING_RETURN_REQUEST
Message id statics

See Also:
Constant Field Values

MSG_ERROR_CONFIRMING_RETURN_REQUEST

public static final java.lang.String MSG_ERROR_CONFIRMING_RETURN_REQUEST
See Also:
Constant Field Values

MSG_ERROR_APPLYING_SELECTED_ITEMS

public static final java.lang.String MSG_ERROR_APPLYING_SELECTED_ITEMS
See Also:
Constant Field Values

mReplacementOrderSalesChannel

protected java.lang.String mReplacementOrderSalesChannel

mOriginOfReturn

protected java.lang.String mOriginOfReturn

mReturnManager

protected ReturnManager mReturnManager

mReturnRequest

protected ReturnRequest mReturnRequest

mCancelReturnRequestErrorURL

protected java.lang.String mCancelReturnRequestErrorURL

mCancelReturnRequestSuccessURL

protected java.lang.String mCancelReturnRequestSuccessURL

mApplyRefundsErrorURL

protected java.lang.String mApplyRefundsErrorURL

mApplyRefundsSuccessURL

protected java.lang.String mApplyRefundsSuccessURL

mConfirmReturnErrorURL

protected java.lang.String mConfirmReturnErrorURL

mCreateReturnRequestPipelineChainId

protected java.lang.String mCreateReturnRequestPipelineChainId

mSelectItemsErrorURL

protected java.lang.String mSelectItemsErrorURL

mSelectItemsSuccessURL

protected java.lang.String mSelectItemsSuccessURL

mSelectItemsProcessName

protected atg.commerce.csr.returns.ProcessName mSelectItemsProcessName

mCreateReturnRequestProcessName

protected atg.commerce.csr.returns.ProcessName mCreateReturnRequestProcessName

mReturnOrderId

protected java.lang.String mReturnOrderId

mSelectAllItems

protected boolean mSelectAllItems

mSelectAllItemsReturnReason

public java.lang.String mSelectAllItemsReturnReason

mSortedRefundMethodList

protected java.util.List<RefundMethod> mSortedRefundMethodList
Constructor Detail

BaseReturnFormHandler

public BaseReturnFormHandler()
Method Detail

getReplacementOrderSalesChannel

public java.lang.String getReplacementOrderSalesChannel()
Returns the salesChannel. Returns the sales channel which is used to submit the order. This could be "Web", "Call Center", or "Scheduled Orders". These values are defined in the order repository.

Returns:
salesChannel

setReplacementOrderSalesChannel

public void setReplacementOrderSalesChannel(java.lang.String pSalesChannel)
Sets the salesChannel. Sets the sales channel which is used to submit the order. This could be "Web", "Call Center", or "Scheduled Orders". These values are defined in the order repository.

Parameters:
pSalesChannel -

getOriginOfReturn

public java.lang.String getOriginOfReturn()
This origin value is used to set the originOfReturn property of the ReturnRequest when a return is created.


getOriginOfReturn

public void getOriginOfReturn(java.lang.String pOriginOfReturn)

setReturnManager

public void setReturnManager(ReturnManager pReturnManager)
sets the return manager object

Parameters:
pReturnManager - the return manager

getReturnManager

public ReturnManager getReturnManager()
Returns the return manager object


setReturnRequest

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

Parameters:
pReturnRequest - the current return request

getReturnRequest

public ReturnRequest getReturnRequest()
Returns the current return request from the OrderHolder


getCancelReturnRequestErrorURL

public java.lang.String getCancelReturnRequestErrorURL()
Returns the cancelReturnRequestErrorURL.

Returns:
cancelReturnRequestErrorURL

setCancelReturnRequestErrorURL

public void setCancelReturnRequestErrorURL(java.lang.String pCancelReturnRequestErrorURL)
Sets the cancelReturnRequestErrorURL.

Parameters:
pCancelReturnRequestErrorURL -

getCancelReturnRequestSuccessURL

public java.lang.String getCancelReturnRequestSuccessURL()
Returns the cancelReturnRequestSuccessURL.

Returns:
cancelReturnRequestSuccessURL

setCancelReturnRequestSuccessURL

public void setCancelReturnRequestSuccessURL(java.lang.String pCancelReturnRequestSuccessURL)
Sets the cancelReturnRequestSuccessURL.

Parameters:
pCancelReturnRequestSuccessURL -

getApplyRefundsErrorURL

public java.lang.String getApplyRefundsErrorURL()
Returns:
the applyRefundsErrorURL

setApplyRefundsErrorURL

public void setApplyRefundsErrorURL(java.lang.String pApplyRefundsErrorURL)
Parameters:
pApplyRefundsErrorURL - The applyRefundsErrorURL to set.

getApplyRefundsSuccessURL

public java.lang.String getApplyRefundsSuccessURL()
Returns:
the applyRefundsSuccessURL

setApplyRefundsSuccessURL

public void setApplyRefundsSuccessURL(java.lang.String pApplyRefundsSuccessURL)
Parameters:
pApplyRefundsSuccessURL - The applyRefundsSuccessURL to set.

setConfirmReturnErrorURL

public void setConfirmReturnErrorURL(java.lang.String pConfirmReturnErrorURL)
Sets URL to go to after an error occurs in handleConfirmReturn

Parameters:
pConfirmReturnErrorURL - the URL to go to after an error occurs in handleConfirmReturn

getConfirmReturnErrorURL

public java.lang.String getConfirmReturnErrorURL()
Returns:
the URL to go to after an error occurs in handleConfirmReturn

setConfirmReturnSuccessURL

public void setConfirmReturnSuccessURL(java.lang.String pConfirmReturnSuccessURL)
Sets URL to go to after handleConfirmReturn successfully runs.

Parameters:
pConfirmReturnSuccessURL - the URL to go to after handleConfirmReturn successfully runs.

getConfirmReturnSuccessURL

public java.lang.String getConfirmReturnSuccessURL()
Returns:
the URL to go to after handleConfirmReturn successfully runs.

setCreateReturnRequestErrorURL

public void setCreateReturnRequestErrorURL(java.lang.String pCreateReturnRequestErrorURL)
Sets URL to go to after an error occurs in handleCreateReturnRequest

Parameters:
pCreateReturnRequestErrorURL - the URL to go to after an error occurs in handleCreateReturnRequest

getCreateReturnRequestErrorURL

public java.lang.String getCreateReturnRequestErrorURL()
Returns:
the URL to go to after an error occurs in handleCreateReturnRequest

setCreateReturnRequestSuccessURL

public void setCreateReturnRequestSuccessURL(java.lang.String pCreateReturnRequestSuccessURL)
Sets URL to go to after handleCreateReturnRequest successfully runs.

Parameters:
pCreateReturnRequestSuccessURL - the URL to go to after handleCreateReturnRequest successfully runs.

getCreateReturnRequestSuccessURL

public java.lang.String getCreateReturnRequestSuccessURL()
Returns:
the URL to go to after handleCreateReturnRequest successfully runs.

getCreateReturnRequestPipelineChainId

public java.lang.String getCreateReturnRequestPipelineChainId()

setCreateReturnRequestPipelineChainId

public void setCreateReturnRequestPipelineChainId(java.lang.String pCreateReturnRequestPipelineChainId)

setSelectItemsErrorURL

public void setSelectItemsErrorURL(java.lang.String pSelectItemsErrorURL)
Sets URL to go to after an error occurs in handleSelectItems

Parameters:
pSelectItemsErrorURL - the URL to go to after an error occurs in handleSelectItems

getSelectItemsErrorURL

public java.lang.String getSelectItemsErrorURL()
Returns:
the URL to go to after an error occurs in handleSelectItems

setSelectItemsSuccessURL

public void setSelectItemsSuccessURL(java.lang.String pSelectItemsSuccessURL)
Sets URL to go to after handleSelectItems successfully runs.

Parameters:
pSelectItemsSuccessURL - the URL to go to after handleSelectItems successfully runs.

getSelectItemsSuccessURL

public java.lang.String getSelectItemsSuccessURL()
Returns:
the URL to go to after handleSelectItems successfully runs.

getSelectItemsProcessName

public atg.commerce.csr.returns.ProcessName getSelectItemsProcessName()
This value is used to set the process name on the ReturnRequest prior to applying the selected ReturnItems.


setSelectItemsProcessName

public void setSelectItemsProcessName(atg.commerce.csr.returns.ProcessName pSelectItemsProcessName)

getCreateReturnRequestProcessName

public atg.commerce.csr.returns.ProcessName getCreateReturnRequestProcessName()
This value is used to set the process name when creating a new ReturnRequest.

Returns:

setCreateReturnRequestProcessName

public void setCreateReturnRequestProcessName(atg.commerce.csr.returns.ProcessName pCreateReturnRequestProcessName)

getReturnOrderId

public java.lang.String getReturnOrderId()
This property specifies the order id for which the ReturnRequest will be created by {@link #createReturnRequest(DynamoHttpServletRequest, DynamoHttpServletResponse)


setReturnOrderId

public void setReturnOrderId(java.lang.String pReturnOrderId)

isSelectAllItems

public boolean isSelectAllItems()
If true, all returnable items are automatically selected for return. This option can be used in conjuunction with the handleSelectItems handler to automatically select all items in the order for return.

Default is false


setSelectAllItems

public void setSelectAllItems(boolean pSelectAllItems)

getSelectAllItemsReturnReason

public java.lang.String getSelectAllItemsReturnReason()
Returns the reason code used for returning all the items in the order.

This value is propragated to the reasonCode on all return items when using the option to return all the items in the order.


setSelectAllItemsReturnReason

public void setSelectAllItemsReturnReason(java.lang.String pSelectAllItemsReturnReason)

getReasonCodes

public java.util.List getReasonCodes()
Retrieve a list of reason codes


handleCreateReturnRequest

public boolean handleCreateReturnRequest(DynamoHttpServletRequest pRequest,
                                         DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException

preCreateReturnRequest

public void preCreateReturnRequest(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
Executed prior to creating the ReturnRequest

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

postCreateReturnRequest

public void postCreateReturnRequest(DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
Execute after creating the new ReturnRequest

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

createReturnRequest

public void createReturnRequest(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
Creates a new return request for the orderId returned by getReturnOrderId() and puts it in the OrderHolder's returnRequest property.

Parameters:
pRequest -
pResponse -
Throws:
javax.servlet.ServletException
java.io.IOException
See Also:
ReturnManager.createReturnRequest(String, ProcessName, Map), getCreateReturnRequestProcessName()

generateCreateReturnRequestExtraParameters

protected java.util.Map generateCreateReturnRequestExtraParameters()
Generates the extra parameter for the create return request pipeline.

Returns:
Map of extra parameters

preSelectItems

public void preSelectItems(DynamoHttpServletRequest pRequest,
                           DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException
This is called before any processing is done by the handleSelectItems method. It currently does nothing.

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

handleSelectItems

public boolean handleSelectItems(DynamoHttpServletRequest pRequest,
                                 DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
Selects Items for return

Parameters:
pRequest -
pResponse -
Returns:
Throws:
javax.servlet.ServletException
java.io.IOException
See Also:
selectItems(DynamoHttpServletRequest, DynamoHttpServletResponse)

postSelectItems

public void postSelectItems(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
This is called after any processing is done by the handleSelectItems method. It currently does nothing.

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

selectItems

public void selectItems(DynamoHttpServletRequest pRequest,
                        DynamoHttpServletResponse pResponse)
                 throws java.io.IOException,
                        javax.servlet.ServletException
Processes the selected items for the return request

If isSelectAllItems is true, all items are automatically selected for return using the return reason provide by the selectAllItemsReturnReason property.

Parameters:
pRequest -
pResponse -
Throws:
java.io.IOException
javax.servlet.ServletException
See Also:
ReturnManager.applySelectedItems(ReturnRequest, ProcessName, Map)

generateSelectItemsExtraParameters

protected java.util.Map generateSelectItemsExtraParameters()
Called to generate the extra parameter Map that is passed to the confirmation pipeline

Returns:
Map

handleConfirmReturn

public boolean handleConfirmReturn(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
Confirms a return request

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

preConfirmReturn

public void preConfirmReturn(DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
This is called before any processing is done by the handleConfirmReturn method. It currently does nothing.

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

postConfirmReturn

public void postConfirmReturn(DynamoHttpServletRequest pRequest,
                              DynamoHttpServletResponse pResponse)
                       throws javax.servlet.ServletException,
                              java.io.IOException
This is called after all processing is done by the handleConfirmReturn method.

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

confirmReturn

public boolean confirmReturn(DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Confirms the return request

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
See Also:
ReturnManager.confirmReturn(ReturnRequest, Map)

generateConfirmExtraParameters

protected java.util.Map generateConfirmExtraParameters()
Called to generate the extra parameter Map that is passed to the confirmation pipeline

Returns:
Map

rollbackTransaction

public void rollbackTransaction()
This method is used to roll-back the current transaction.


getSortedRefundMethodList

public java.util.List<RefundMethod> getSortedRefundMethodList()
This method takes the #getReturnRequest().getRefundMethodList() and sorts the refund method based on "refundType" property.

Returns:
the #getReturnRequest().getRefundMethodList() is sorted and returned.

getModifiableRefundMethodList

public java.util.List<RefundMethod> getModifiableRefundMethodList()
Returns a filtered List of the RefundMethods to remove the replacement order store credit refund method.

This property can be used to build the page that allows the refund method allocations to be changed manually.


preApplyRefunds

public void preApplyRefunds(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
This is called before any processing is done by the handleApplyRefunds method. It currently does nothing.

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

handleApplyRefunds

public boolean handleApplyRefunds(DynamoHttpServletRequest pRequest,
                                  DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
handler for applying the refund method allocations

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

postApplyRefunds

public void postApplyRefunds(DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
This is called after all processing is done by the handleApplyRefunds method. It currently does nothing.

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

applyRefunds

public void applyRefunds(DynamoHttpServletRequest pRequest,
                         DynamoHttpServletResponse pResponse)
                  throws javax.servlet.ServletException,
                         java.io.IOException
Executes the given pipeline to validate the refund method allocations.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
See Also:
ReturnManager.applyRefundMethodAllocations(ReturnRequest, Map)

generateApplyRefundAllocationsExtraParameters

protected java.util.Map generateApplyRefundAllocationsExtraParameters()
Generates the extra parameter for the apply refund allocations pipeline.

Returns:

preCancelReturnRequest

public void preCancelReturnRequest(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
This method is called before any processing is done by the handleCancelReturnRequest method. It currently does nothing.

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

postCancelReturnRequest

public void postCancelReturnRequest(DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
This method is called after all processing is done by the handleCancelReturnRequest method. It currently does nothing.

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

handleCancelReturnRequest

public boolean handleCancelReturnRequest(DynamoHttpServletRequest pRequest,
                                         DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException

This method cancels the active return request

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

cancelReturnRequest

public void cancelReturnRequest(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException

This method cancels the active return request by nulling out the ReturnRequest in the OrderHolder's returnRequest property.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

selectAllReturnItems

protected void selectAllReturnItems(ReturnRequest pReturnRequest,
                                    java.lang.String pReturnReason)
Selects all returnable items for return by setting their quantityToReturn and returnReason values.

quantityToReturn is set to the item's quantityAvailable. returnReason is set to the form's selectAllItemsReturnReason.

Parameters:
pReturnRequest -
pReturnReason -