|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.droplet.EmptyFormHandler
atg.droplet.GenericFormHandler
atg.commerce.order.purchase.PurchaseProcessFormHandler
atg.commerce.order.purchase.CancelOrderFormHandler
public class CancelOrderFormHandler
The CancelOrderFormHandler is used to cancel the user's current Order, which deletes the Order from the ShoppingCart.
GenericFormHandler
,
PurchaseProcessFormHandler
Field Summary | |
---|---|
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
|
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 | |
---|---|
CancelOrderFormHandler()
Creates a new CancelOrderFormHandler instance. |
Method Summary | |
---|---|
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. |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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 |
---|
public 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
Constructor Detail |
---|
public CancelOrderFormHandler()
CancelOrderFormHandler
instance.
Method Detail |
---|
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
value
javax.servlet.ServletException
- if an error occurs
java.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
value
javax.servlet.ServletException
- if an error occurs
java.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
value
boolean
value
javax.servlet.ServletException
- if an error occurs
java.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
value
boolean
value
javax.servlet.ServletException
- if an error occurs
java.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
value
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void deleteOrder(java.lang.String pOrderId)
CancelOrderService
deleteOrder
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 deleted
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void deleteOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
CancelOrderService
deleteOrder
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
value
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void preserveOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
CancelOrderService
preserveOrder
is 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
value
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean isDeleteState(int pState)
CancelOrderService
isDeleteState
returns a boolean indicating whether the Order's
state is one of the DeleteStates.
pState
- an int
value
boolean
valuepublic boolean isIgnoreState(int pState)
CancelOrderService
isIgnoreState
returns a boolean indicating whether the Order's
state is one of the IgnoreStates.
pState
- an int
value
boolean
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 false
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |