public class CancelOrderFormHandler extends PurchaseProcessFormHandler
GenericFormHandler,
PurchaseProcessFormHandler| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
static java.lang.String |
MSG_ERROR_CANCELLING_ORDER |
static java.lang.String |
MSG_ERROR_LOADING_ORDER |
static java.lang.String |
MSG_ERROR_SENDING_MESSAGE |
static java.lang.String |
MSG_INVALID_ORDER_ID |
static java.lang.String |
MSG_ORDER_NOT_CURRENT |
static java.lang.String |
MSG_USER_INFO_NOT_AVAILABLE |
static java.lang.String |
MSG_USER_NO_PERMISSION_TO_CANCEL |
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUEPARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDSSERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
CancelOrderFormHandler()
Creates a new
CancelOrderFormHandler instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelOrder(Order pOrder,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method calls the
CancelOrderService.cancelOrder method. |
protected boolean |
canUserCancelOrder(Order pOrder,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Checks whether the order is created by the user in the request.
|
void |
deleteOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Deprecated.
This method is not used anymore, See
CancelOrderService |
void |
deleteOrder(java.lang.String pOrderId)
Deprecated.
This method is not used anymore, See
CancelOrderService |
java.lang.String |
getCancelOrderErrorURL()
Return the CancelOrderErrorURL property.
|
atg.commerce.order.CancelOrderService |
getCancelOrderService()
The Nucleus service used to cancel orders
|
java.lang.String |
getCancelOrderSuccessURL()
Return the CancelOrderSuccessURL property.
|
java.lang.String[] |
getDeleteStates()
Return the DeleteStates property.
|
java.lang.String[] |
getIgnoreStates()
Return the IgnoreStates property.
|
MessageSender |
getMessageSender()
Return the MessageSender property.
|
java.lang.String |
getOrderIdToCancel()
Return the OrderIdToCancel property.
|
boolean |
handleCancelCurrentOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
The
handleCancelCurrentOrder method cancels the
ShoppingCart's current order. |
boolean |
handleCancelOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
The
handleCancelOrder method cancels the Order specified
by the OrderIdToCancel property. |
boolean |
isDeleteState(int pState)
Deprecated.
This method is not used anymore, See
CancelOrderService |
boolean |
isIgnoreState(int pState)
Deprecated.
This method is not used anymore, See
CancelOrderService |
void |
postCancelOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
postCancelOrder is used for work that must happen after the
Order is cancelled. |
void |
preCancelOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
preCancelOrder is used for work that must happen before the
Order is cancelled. |
void |
preserveOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Deprecated.
This method is not used anymore, See
CancelOrderService |
void |
setCancelOrderErrorURL(java.lang.String pCancelOrderErrorURL)
Set the CancelOrderErrorURL property.
|
void |
setCancelOrderService(atg.commerce.order.CancelOrderService pCancelOrderService)
The Nucleus service used to cancel orders
|
void |
setCancelOrderSuccessURL(java.lang.String pCancelOrderSuccessURL)
Set the CancelOrderSuccessURL property.
|
void |
setDeleteStates(java.lang.String[] pDeleteStates)
Set the DeleteStates property.
|
void |
setIgnoreStates(java.lang.String[] pIgnoreStates)
Set the IgnoreStates property.
|
void |
setMessageSender(MessageSender pMessageSender)
Set the MessageSender property.
|
void |
setOrderIdToCancel(java.lang.String pOrderIdToCancel)
Set the OrderIdToCancel property.
|
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, unsetTransactionCreatedaddFormException, 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, setUseForwardsafterGet, beforeGetaddLogListener, 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, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
public static final java.lang.String MSG_INVALID_ORDER_ID
public static final java.lang.String MSG_ERROR_LOADING_ORDER
public static final java.lang.String MSG_ERROR_SENDING_MESSAGE
public static final java.lang.String MSG_ERROR_CANCELLING_ORDER
public static final java.lang.String MSG_ORDER_NOT_CURRENT
public static final java.lang.String MSG_USER_NO_PERMISSION_TO_CANCEL
public static final java.lang.String MSG_USER_INFO_NOT_AVAILABLE
public CancelOrderFormHandler()
CancelOrderFormHandler instance.public void setCancelOrderSuccessURL(java.lang.String pCancelOrderSuccessURL)
pCancelOrderSuccessURL - a String valuepublic java.lang.String getCancelOrderSuccessURL()
String valuepublic void setCancelOrderErrorURL(java.lang.String pCancelOrderErrorURL)
pCancelOrderErrorURL - a String valuepublic java.lang.String getCancelOrderErrorURL()
String valuepublic void setOrderIdToCancel(java.lang.String pOrderIdToCancel)
pOrderIdToCancel - a String valuepublic java.lang.String getOrderIdToCancel()
String valuepublic void setDeleteStates(java.lang.String[] pDeleteStates)
pDeleteStates - a String[] valuepublic java.lang.String[] getDeleteStates()
String[] valuepublic void setIgnoreStates(java.lang.String[] pIgnoreStates)
pIgnoreStates - a String[] valuepublic java.lang.String[] getIgnoreStates()
String[] valuepublic void setMessageSender(MessageSender pMessageSender)
pMessageSender - a MessageSender valuepublic MessageSender getMessageSender()
MessageSender valuepublic void setCancelOrderService(atg.commerce.order.CancelOrderService pCancelOrderService)
pCancelOrderService - a CancelOrderService valuepublic atg.commerce.order.CancelOrderService getCancelOrderService()
public void preCancelOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
preCancelOrder is used for work that must happen before the
Order is cancelled.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void postCancelOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
postCancelOrder is used for work that must happen after the
Order is cancelled.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic boolean handleCancelOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleCancelOrder method cancels the Order specified
by the OrderIdToCancel property.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valueboolean valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic boolean handleCancelCurrentOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleCancelCurrentOrder method cancels the
ShoppingCart's current order. If the OrderIdToCancel
property is set, its value is compared to the current order
to make sure they match.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valueboolean valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void cancelOrder(Order pOrder, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
CancelOrderService.cancelOrder method.
All logic for what to do happens there.pOrder - the Order to be canceledpRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void deleteOrder(java.lang.String pOrderId)
CancelOrderServicedeleteOrder is used to handle an Order whose state is one
of the configured DeleteStates of this component. This deletes the
specified order if that order is in the ShoppingCart.pOrderId - the ID of the Order to be deletedjavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void deleteOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
CancelOrderServicedeleteOrder is used to handle an Order whose state is one
of the configured DeleteStates of this component. This deletes the
Order identified by the orderIdToCancel property if that
order is in the ShoppingCart.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void preserveOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
CancelOrderServicepreserveOrderis used to handle an Order whose state is not
one of the configured DeleteStates of this component. This is used to
send a ModifyOrder message to Fulfillment with a GenericRemove Modification.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic boolean isDeleteState(int pState)
CancelOrderServiceisDeleteState returns a boolean indicating whether the Order's
state is one of the DeleteStates.pState - an int valueboolean valuepublic boolean isIgnoreState(int pState)
CancelOrderServiceisIgnoreState returns a boolean indicating whether the Order's
state is one of the IgnoreStates.pState - an int valueboolean valueprotected boolean canUserCancelOrder(Order pOrder, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pOrder - is the order to checkpRequest - is the request created for user's sessionpResponse - is the response to the user'ns request.true if order is created by the user, otherwise returns falsejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurs