|
|||||||||
| 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
public abstract class PurchaseProcessFormHandler
This abstract class defines the very general FormHandling functionality that the purchase process formhandlers require, including Transaction management, PipelineChain execution, central configuration, and error processing.
| Field Summary | |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected static java.lang.String |
LOCK_NAME_ATTRIBUTE_NAME
|
protected static java.lang.String |
PARAM_TRANSACTION_CREATED
|
protected static java.lang.String |
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 | |
|---|---|
PurchaseProcessFormHandler()
|
|
| Method Summary | |
|---|---|
protected void |
acquireTransactionLock()
Deprecated. please use acquireTransactionLock(DynamoHttpServletRequest pRequest) instead |
protected void |
acquireTransactionLock(DynamoHttpServletRequest pRequest)
Attempt to acquire a local lock before creating a transaction that may modify the order, but only if useLocksAroundTransactions is set to true. |
boolean |
afterSet(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after any setX methods on this form are set when a form that modifies properties of this form handler is submitted. |
boolean |
beforeSet(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any setX methods on this form are set when a form that modifies properties of this form handler is submitted. |
boolean |
checkFormRedirect(java.lang.String pSuccessURL,
java.lang.String pFailureURL,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
If the request coming in is for a new session (which would indicate that the session has expired or been failed over) AND is a form submission then we optionally redirect to a session expiration url. |
protected void |
commitTransaction(javax.transaction.Transaction pTransaction)
Commits the supplied transaction |
protected void |
copyConfiguration()
Copy property settings from the optional PurchaseProcessConfiguration component. |
protected java.util.Map |
createRepriceParameterMap()
Creates the extra parameter map that is used when the order is repriced after form handler modifications to the order. |
protected ClientLockManager |
defaultLocalLockManager(boolean pSetLocalLockManager)
Deprecated. Use the TransactionLockFactory instead |
protected RepositoryItem |
defaultUserProfile(boolean pSetProfile)
Get the default user profile to use if profile has not been
set. |
void |
doStartService()
Perform one-time startup operations, including copying property settings from the optional PurchaseProcessConfiguration
component. |
protected javax.transaction.Transaction |
ensureTransaction()
This method ensures that a transaction exists before returning. |
java.lang.String |
formatUserMessage(java.lang.String pKey,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to format a message with no arguments using the Locale of the user |
java.lang.String |
formatUserMessage(java.lang.String pKey,
java.lang.Object[] pParams,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to format a message with two arguments using our resource bundle. |
java.lang.String |
formatUserMessage(java.lang.String pKey,
java.lang.Object pParam,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to format a message with one argument using the Locale of the user |
java.lang.String |
formatUserMessage(java.lang.String pKey,
java.lang.Object pParam1,
java.lang.Object pParam2,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to format a message with two arguments using our resource bundle. |
java.lang.String |
generatePropertyPath(java.lang.String pPropertyName)
Returns a Nucleus property path which can be used in a DropletFormException |
ClaimableManager |
getClaimableManager()
Returns the ClaimableManager is used in determining the user's GiftCertificates. |
CommerceIdentifierPaymentInfoContainer |
getCommerceIdentifierPaymentInfoContainer()
Return the CommerceIdentifierPaymentInfoContainer property. |
CommerceItemManager |
getCommerceItemManager()
Return the CommerceItemManager property. |
CommerceItemShippingInfoContainer |
getCommerceItemShippingInfoContainer()
Return the CommerceItemShippingInfoContainer property. |
CommerceProfileTools |
getCommerceProfileTools()
Return the CommerceProfileTools property. |
CommercePropertyManager |
getCommercePropertyManager()
Return the CommercePropertyManager property. |
atg.commerce.order.purchase.PurchaseProcessConfiguration |
getConfiguration()
Returns property Configuration |
javax.transaction.Transaction |
getCurrentTransaction()
Returns property currentTransaction |
java.util.Locale |
getDefaultLocale()
Returns property DefaultLocale. |
GiftlistManager |
getGiftlistManager()
The giftlist manager |
HandlingInstructionManager |
getHandlingInstructionManager()
The HandlingInstruction manager |
ClientLockManager |
getLocalLockManager()
Deprecated. Use the TransactionLockFactory instead |
Order |
getOrder()
Return the Order property. |
SimpleOrderManager |
getOrderManager()
Return the OrderManager property. |
PaymentGroupManager |
getPaymentGroupManager()
Return the PaymentGroupManager property. |
PaymentGroupMapContainer |
getPaymentGroupMapContainer()
Return the PaymentGroupMapContainer property. |
PipelineManager |
getPipelineManager()
Returns property PipelineManager |
protected RepositoryItem |
getPriceList()
Returns the price list identified by the priceListId |
java.lang.String |
getPriceListId()
Returns property PriceListId |
PriceListManager |
getPriceListManager()
Returns the Price List Manager |
RepositoryItem |
getProfile()
Return the Profile property. |
Repository |
getProfileRepository()
Return the ProfileRepository property. |
atg.commerce.order.purchase.PurchaseProcessHelper |
getPurchaseProcessHelper()
Returns property purchaseProcessHelper |
RepeatingRequestMonitor |
getRepeatingRequestMonitor()
Return the RepeatingRequestMonitor property. |
java.lang.String |
getRepriceOrderChainId()
Return the RepriceOrderChainId property. |
protected java.util.ResourceBundle |
getResourceBundle()
Returns the error message ResourceBundle |
protected java.lang.String |
getResourceBundleName()
Returns the name of the error message ResourceBundle |
java.lang.String |
getSessionExpirationURL()
Return the SessionExpirationURL property. |
ShippingGroupManager |
getShippingGroupManager()
Return the ShippingGroupManager property. |
ShippingGroupMapContainer |
getShippingGroupMapContainer()
Return the ShippingGroupMapContainer property. |
OrderHolder |
getShoppingCart()
Returns property ShoppingCart |
javax.transaction.TransactionManager |
getTransactionManager()
Returns property TransactionManager |
java.util.Locale |
getUserLocale()
Return the UserLocale property. |
java.util.Locale |
getUserLocale(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns the locale associated with the request. |
PricingModelHolder |
getUserPricingModels()
Returns property UserPricingModels |
void |
handlePipelineError(java.lang.Object pError,
java.lang.String pErrorKey)
Add a pipeline error to the list of form exceptions. |
boolean |
isEnsureTransaction()
Returns property EnsureTransaction |
boolean |
isFormSubmission(DynamoHttpServletRequest pRequest)
If it is a form submission then return true. |
protected boolean |
isTransactionCreated(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
|
protected boolean |
isTransactionMarkedAsRollBack()
Returns true if the transaction associated with the current thread is marked for rollback. |
boolean |
isUseLocksAroundTransactions()
Deprecated. Use the TransactionLockFactory instead |
boolean |
isUseRequestLocale()
Returns property UseRequestLocale |
void |
processException(java.lang.Exception pException,
java.lang.String pMsgId,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Add a user error message to the form exceptions, and then display the exception in the logs |
protected boolean |
processPipelineErrors(PipelineResult pResult)
Examine the pipeline result looking for any error messages, creates DropletFormExceptions and adds them as form exceptions |
protected void |
releaseTransactionLock()
Deprecated. please use releaseTransactionLock(DynamoHttpServletRequest pRequest) instead |
protected void |
releaseTransactionLock(DynamoHttpServletRequest pRequest)
Attempt to release the local lock that was acquired before creating a transaction that may have modified the order, but only if useLocksAroundTransactions is set to true. |
protected PipelineResult |
runProcess(java.lang.String pChainId,
java.util.Map pParameters)
Executes a Pipeline Chain. |
protected PipelineResult |
runProcess(java.lang.String pChainId,
Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Executes a Pipeline Chain and places the supplies method parameters into a HashMap which is supplied to the chain to execute. |
protected PipelineResult |
runProcess(java.lang.String pChainId,
Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pParameters,
java.util.Map pExtraParameters)
Executes a Pipeline Chain and places the supplies method parameters into a HashMap which is supplied to the chain to execute. |
protected void |
runProcessRepriceOrder(Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Run the pipeline which should be executed when the order needs to be repriced. |
protected void |
runProcessRepriceOrder(java.lang.String pPricingOperation,
Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Run the pipeline which should be executed when the order needs to be repriced |
protected PipelineResult |
runRepricingProcess(java.lang.String pChainId,
java.lang.String pPricingOperation,
Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Executes a Pipeline Chain and places the supplies method parameters into a HashMap which is supplied to the chain to execute. |
void |
setClaimableManager(ClaimableManager pClaimableManager)
Specifies the ClaimableManager to use in determining the user's GiftCertificates. |
void |
setCommerceIdentifierPaymentInfoContainer(CommerceIdentifierPaymentInfoContainer pCommerceIdentifierPaymentInfoContainer)
Set the CommerceIdentifierPaymentInfoContainer property. |
void |
setCommerceItemManager(CommerceItemManager pCommerceItemManager)
Set the CommerceItemManager property. |
void |
setCommerceItemShippingInfoContainer(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer)
Set the CommerceItemShippingInfoContainer property. |
void |
setCommerceProfileTools(CommerceProfileTools pCommerceProfileTools)
Set the CommerceProfileTools property. |
void |
setCommercePropertyManager(CommercePropertyManager pCommercePropertyManager)
Set the CommercePropertyManager property. |
void |
setConfiguration(atg.commerce.order.purchase.PurchaseProcessConfiguration pConfiguration)
Sets property Configuration |
void |
setCurrentTransaction(javax.transaction.Transaction pCurrentTransaction)
Sets property CurrentTransaction |
void |
setDefaultLocale(java.util.Locale pDefaultLocale)
Sets property DefaultLocale |
void |
setEnsureTransaction(boolean pEnsureTransaction)
Sets property EnsureTransaction |
void |
setGiftlistManager(GiftlistManager pGiftlistManager)
Specifies the GiftlistManager. |
void |
setHandlingInstructionManager(HandlingInstructionManager pHandlingInstructionManager)
Specifies the HandlingInstructionManager. |
void |
setLocalLockManager(ClientLockManager pLocalLockManager)
Deprecated. Use the TransactionLockFactory instead |
void |
setOrder(Order pOrder)
Set the Order property. |
void |
setOrderManager(SimpleOrderManager pOrderManager)
Set the OrderManager property. |
void |
setPaymentGroupManager(PaymentGroupManager pPaymentGroupManager)
Set the PaymentGroupManager property. |
void |
setPaymentGroupMapContainer(PaymentGroupMapContainer pPaymentGroupMapContainer)
Set the PaymentGroupMapContainer property. |
void |
setPipelineManager(PipelineManager pPipelineManager)
Sets property PipelineManager |
void |
setPriceListId(java.lang.String pPriceListId)
Sets property PriceListId |
void |
setPriceListManager(PriceListManager pPriceListManager)
Sets the Price List Manager |
void |
setProfile(RepositoryItem pProfile)
Set the Profile property. |
void |
setProfileRepository(Repository pProfileRepository)
Set the ProfileRepository property. |
void |
setPurchaseProcessHelper(atg.commerce.order.purchase.PurchaseProcessHelper pPurchaseProcessHelper)
Sets property purchaseProcessHelper |
void |
setRepeatingRequestMonitor(RepeatingRequestMonitor pRepeatingRequestMonitor)
Set the RepeatingRequestMonitor property. |
void |
setRepriceOrderChainId(java.lang.String pRepriceOrderChainId)
Set the RepriceOrderChainId property. |
void |
setSessionExpirationURL(java.lang.String pSessionExpirationURL)
Set the SessionExpirationURL property. |
void |
setShippingGroupManager(ShippingGroupManager pShippingGroupManager)
Set the ShippingGroupManager property. |
void |
setShippingGroupMapContainer(ShippingGroupMapContainer pShippingGroupMapContainer)
Set the ShippingGroupMapContainer property. |
void |
setShoppingCart(OrderHolder pShoppingCart)
Sets property ShoppingCart |
protected void |
setTransactionCreated(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
|
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets property TransactionManager |
protected void |
setTransactionToRollbackOnly()
Sets the transaction to rollback |
void |
setUseLocksAroundTransactions(boolean pUseLocksAroundTransactions)
Deprecated. Use the TransactionLockFactory instead |
void |
setUseRequestLocale(boolean pUseRequestLocale)
Sets property UseRequestLocale |
void |
setUserLocale(java.util.Locale pUserLocale)
Set the UserLocale property. |
void |
setUserPricingModels(PricingModelHolder pUserPricingModels)
Sets property UserPricingModels |
protected java.lang.String |
transactionLockName()
Deprecated. Use the TransactionLockFactory instead |
protected void |
unsetTransactionCreated(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
|
| 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
protected static final java.lang.String PARAM_TRANSACTION_CREATED
protected static final java.lang.String PARAM_VALUE_TRUE
protected static final java.lang.String LOCK_NAME_ATTRIBUTE_NAME
| Constructor Detail |
|---|
public PurchaseProcessFormHandler()
| Method Detail |
|---|
public void setPriceListId(java.lang.String pPriceListId)
This price list will be used when repricing after add and delete of items.
PriceListId - a String valuepublic java.lang.String getPriceListId()
String valueprotected RepositoryItem getPriceList()
priceListId
public void setConfiguration(atg.commerce.order.purchase.PurchaseProcessConfiguration pConfiguration)
public atg.commerce.order.purchase.PurchaseProcessConfiguration getConfiguration()
public void setCommercePropertyManager(CommercePropertyManager pCommercePropertyManager)
pCommercePropertyManager - the Commerce profile property managerpublic CommercePropertyManager getCommercePropertyManager()
public void setPriceListManager(PriceListManager pPriceListManager)
pPriceListManager - the Price List Managerpublic PriceListManager getPriceListManager()
public void setDefaultLocale(java.util.Locale pDefaultLocale)
pDefaultLocale - a Locale valuepublic java.util.Locale getDefaultLocale()
Locale valuepublic void setUserLocale(java.util.Locale pUserLocale)
pUserLocale - a Locale valuepublic java.util.Locale getUserLocale()
Locale valuepublic void setUseRequestLocale(boolean pUseRequestLocale)
pUseRequestLocale - a boolean valuepublic boolean isUseRequestLocale()
boolean valuepublic void setRepriceOrderChainId(java.lang.String pRepriceOrderChainId)
pRepriceOrderChainId - a String valuepublic java.lang.String getRepriceOrderChainId()
String valuepublic void setUseLocksAroundTransactions(boolean pUseLocksAroundTransactions)
If this property is set to true, locking will be used to prevent one
user from trying to modify orders in multiple concurrent threads.
This has a small performance impact as we obtain and release the lock,
but minimizes the possibility of concurrent update exceptions if
two threads try to modify the same order for the same user.
The default value for useLocksAroundTransactions is true.
public boolean isUseLocksAroundTransactions()
public void setLocalLockManager(ClientLockManager pLocalLockManager)
useLocksAroundTransactions
is true.
setUseLocksAroundTransactions(boolean)public ClientLockManager getLocalLockManager()
useLocksAroundTransactions
is true.
setUseLocksAroundTransactions(boolean)protected ClientLockManager defaultLocalLockManager(boolean pSetLocalLockManager)
localLockManager
has not been set. If pSetLocalLockManager is true, then also
set localLockManager to the value returned so future calls to
getLocalLockManager will succeed.
public void setProfile(RepositoryItem pProfile)
pProfile - a RepositoryItem valuepublic RepositoryItem getProfile()
RepositoryItem valueprotected RepositoryItem defaultUserProfile(boolean pSetProfile)
profile has not been
set. If pSetProfile is true, then also set profile
to the value returned so future calls to getProfile will succeed.
public void setProfileRepository(Repository pProfileRepository)
pProfileRepository - a Repository valuepublic Repository getProfileRepository()
Repository valuepublic void setCommerceProfileTools(CommerceProfileTools pCommerceProfileTools)
pCommerceProfileTools - a CommerceProfileTools valuepublic CommerceProfileTools getCommerceProfileTools()
CommerceProfileTools valuepublic void setOrder(Order pOrder)
pOrder - an Order valuepublic Order getOrder()
Order valuepublic void setShoppingCart(OrderHolder pShoppingCart)
pShoppingCart - an OrderHolder valuepublic OrderHolder getShoppingCart()
OrderHolder valuepublic void setCommerceItemManager(CommerceItemManager pCommerceItemManager)
pCommerceItemManager - a CommerceItemManager valuepublic CommerceItemManager getCommerceItemManager()
CommerceItemManager valuepublic void setOrderManager(SimpleOrderManager pOrderManager)
pOrderManager - a SimpleOrderManager valuepublic SimpleOrderManager getOrderManager()
SimpleOrderManager valuepublic void setCommerceIdentifierPaymentInfoContainer(CommerceIdentifierPaymentInfoContainer pCommerceIdentifierPaymentInfoContainer)
pCommerceIdentifierPaymentInfoContainer - a CommerceIdentifierPaymentInfoContainer valuepublic CommerceIdentifierPaymentInfoContainer getCommerceIdentifierPaymentInfoContainer()
CommerceIdentifierPaymentInfoContainer valuepublic void setPaymentGroupManager(PaymentGroupManager pPaymentGroupManager)
pPaymentGroupManager - a PaymentGroupManager valuepublic PaymentGroupManager getPaymentGroupManager()
PaymentGroupManager valuepublic void setPaymentGroupMapContainer(PaymentGroupMapContainer pPaymentGroupMapContainer)
pPaymentGroupMapContainer - a PaymentGroupMapContainer valuepublic PaymentGroupMapContainer getPaymentGroupMapContainer()
PaymentGroupMapContainer valuepublic void setPipelineManager(PipelineManager pPipelineManager)
pPipelineManager - a PipelineManager valuepublic PipelineManager getPipelineManager()
PipelineManager valuepublic javax.transaction.Transaction getCurrentTransaction()
public void setCurrentTransaction(javax.transaction.Transaction pCurrentTransaction)
pCurrentTransaction - a Transaction valuepublic void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
pTransactionManager - a TransactionManager valuepublic javax.transaction.TransactionManager getTransactionManager()
TransactionManager valuepublic void setEnsureTransaction(boolean pEnsureTransaction)
pEnsureTransaction - a boolean valuepublic boolean isEnsureTransaction()
boolean valuepublic void setClaimableManager(ClaimableManager pClaimableManager)
pClaimableManager - a ClaimableManager valuepublic ClaimableManager getClaimableManager()
ClaimableManager valuepublic void setGiftlistManager(GiftlistManager pGiftlistManager)
pGiftlistManager - a GiftlistManager valuepublic GiftlistManager getGiftlistManager()
GiftlistManager valuepublic void setHandlingInstructionManager(HandlingInstructionManager pHandlingInstructionManager)
pHandlingInstructionManager - a HandlingInstructionManager valuepublic HandlingInstructionManager getHandlingInstructionManager()
HandlingInstructionManager valuepublic void setShippingGroupManager(ShippingGroupManager pShippingGroupManager)
pShippingGroupManager - a ShippingGroupManager valuepublic ShippingGroupManager getShippingGroupManager()
ShippingGroupManager valuepublic void setCommerceItemShippingInfoContainer(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer)
pCommerceItemShippingInfoContainer - a CommerceItemShippingInfoContainer valuepublic CommerceItemShippingInfoContainer getCommerceItemShippingInfoContainer()
CommerceItemShippingInfoContainer valuepublic void setShippingGroupMapContainer(ShippingGroupMapContainer pShippingGroupMapContainer)
pShippingGroupMapContainer - a ShippingGroupMapContainer valuepublic ShippingGroupMapContainer getShippingGroupMapContainer()
ShippingGroupMapContainer valuepublic void setRepeatingRequestMonitor(RepeatingRequestMonitor pRepeatingRequestMonitor)
pRepeatingRequestMonitor - a RepeatingRequestMonitor valuepublic RepeatingRequestMonitor getRepeatingRequestMonitor()
RepeatingRequestMonitor valuepublic void setSessionExpirationURL(java.lang.String pSessionExpirationURL)
pSessionExpirationURL - a String valuepublic java.lang.String getSessionExpirationURL()
String valuepublic void setUserPricingModels(PricingModelHolder pUserPricingModels)
pUserPricingModels - a PricingModelHolder valuepublic PricingModelHolder getUserPricingModels()
PricingModelHolder valuepublic void setPurchaseProcessHelper(atg.commerce.order.purchase.PurchaseProcessHelper pPurchaseProcessHelper)
pPurchaseProcessHelper - a PurchaseProcessHelper valuepublic atg.commerce.order.purchase.PurchaseProcessHelper getPurchaseProcessHelper()
PurchaseProcessHelper valueprotected java.util.ResourceBundle getResourceBundle()
protected java.lang.String getResourceBundleName()
public boolean checkFormRedirect(java.lang.String pSuccessURL,
java.lang.String pFailureURL,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
checkFormRedirect in class GenericFormHandlerpSuccessURL - a String valuepFailureURL - a String valuepRequest - the servlet's requestpResponse - the servlet's response
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet iopublic boolean isFormSubmission(DynamoHttpServletRequest pRequest)
pRequest - a DynamoHttpServletRequest value
boolean valuepublic java.lang.String generatePropertyPath(java.lang.String pPropertyName)
pPropertyName - a String value
String value
public void processException(java.lang.Exception pException,
java.lang.String pMsgId,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
pException - an Exception valuepMsgId - a String valuepRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse value
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
public java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
locale. This value can be
either a java.util.Locale object or a String which represents the locale.
Next if the useRequestLocale property is true, then the locale
of the request will be returned. Finally, if the locale cannot be determined,
the the defaultLocale property is used.
pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse value
Locale value
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
public java.lang.String formatUserMessage(java.lang.String pKey,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
pKey - the identifier for the message to retrieve out of the ResourceBundlepRequest - the request object which can be used to extract the user's localepResponse - a DynamoHttpServletResponse value
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occursPurchaseUserMessage
public java.lang.String formatUserMessage(java.lang.String pKey,
java.lang.Object pParam,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
pKey - the identifier for the message to retrieve out of the ResourceBundlepParam - the first (and only argument) in the messagepRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse value
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occursPurchaseUserMessage
public java.lang.String formatUserMessage(java.lang.String pKey,
java.lang.Object pParam1,
java.lang.Object pParam2,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
pKey - the identifier for the message to retrieve out of the ResourceBundlepParam1 - the first parameter in the messagepParam2 - the second parameter in the messagepRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse value
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occursPurchaseUserMessage
public java.lang.String formatUserMessage(java.lang.String pKey,
java.lang.Object[] pParams,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
pKey - the identifier for the message to retrieve out of the ResourceBundlepParams - a set of parameters to use in the formatting.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse value
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occursPurchaseUserMessage
protected PipelineResult runProcess(java.lang.String pChainId,
Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
throws RunProcessException
pChainId - the pipeline chain to executepOrder - the order to repricepPricingModels - the set of all pricing models for the user (item, order, shipping, tax)pLocale - the locale that the order should be priced withinpProfile - the user who owns the orderpExtraParameters - A Map of extra parameters to be used in the pricing
PipelineResult value
RunProcessException - if an error occurs
protected PipelineResult runProcess(java.lang.String pChainId,
Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pParameters,
java.util.Map pExtraParameters)
throws RunProcessException
pChainId - the pipeline chain to executepOrder - the order to repricepPricingModels - the set of all pricing models for the user (item, order, shipping, tax)pLocale - the locale that the order should be priced withinpProfile - the user who owns the orderpParameters - A Map of parameters to be used when calling the PipelineChainpExtraParameters - A Map of extra parameters to be used in the pricing
PipelineResult value
RunProcessException - if an error occurs
protected PipelineResult runProcess(java.lang.String pChainId,
java.util.Map pParameters)
throws RunProcessException
pChainId - the pipeline chain to executepParameters - A Map of parameters to be passed to the chain during execution
PipelineResult value
RunProcessException - if an error occursprotected boolean processPipelineErrors(PipelineResult pResult)
pResult - a PipelineResult value
protected void runProcessRepriceOrder(Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
throws RunProcessException
pOrder - the order to repricepPricingModels - the set of all pricing models for the user (item, order, shipping, tax)pLocale - the locale that the order should be priced withinpProfile - the user who owns the orderpExtraParameters - A Map of extra parameters to be used in the pricing
RunProcessException - if an error occursatg.commerce.pricing.PricingConstants.OP_REPRICE_ORDER_TOTAL.
protected void runProcessRepriceOrder(java.lang.String pPricingOperation,
Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
throws RunProcessException
pPricingOperation - the pricing operation (e.g. order total, subtotal, shipping, etc) that
should be performed.pOrder - the order to repricepPricingModels - the set of all pricing models for the user (item, order, shipping, tax)pLocale - the locale that the order should be priced withinpProfile - the user who owns the orderpExtraParameters - A Map of extra parameters to be used in the pricing
RunProcessException - if an error occurs
protected PipelineResult runRepricingProcess(java.lang.String pChainId,
java.lang.String pPricingOperation,
Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
throws RunProcessException
pChainId - the pipeline chain to executepPricingOperation - a String valuepOrder - the order to repricepPricingModels - the set of all pricing models for the user (item, order, shipping, tax)pLocale - the locale that the order should be priced withinpProfile - the user who owns the orderpExtraParameters - A Map of extra parameters to be used in the pricing
PipelineResult value
RunProcessException - if an error occursprotected javax.transaction.Transaction ensureTransaction()
Transaction valueprotected void commitTransaction(javax.transaction.Transaction pTransaction)
pTransaction - a Transaction value
protected void setTransactionToRollbackOnly()
throws javax.transaction.SystemException
javax.transaction.SystemException - if an error occursprotected boolean isTransactionMarkedAsRollBack()
boolean value
protected void acquireTransactionLock()
throws DeadlockException
useLocksAroundTransactions is set to true.
DeadlockException
protected void acquireTransactionLock(DynamoHttpServletRequest pRequest)
throws DeadlockException
useLocksAroundTransactions is set to true.
DeadlockException
protected void releaseTransactionLock()
throws LockManagerException
useLocksAroundTransactions is set to true.
LockManagerException
protected void releaseTransactionLock(DynamoHttpServletRequest pRequest)
throws LockManagerException
useLocksAroundTransactions is set to true.
LockManagerExceptionprotected java.lang.String transactionLockName()
acquireTransactionLock and releaseTransactionLock.
By default this returns the repository id of the current user profile,
generating an error message and returning null if no profile is available.
Subclasses may override this behavior to choose a different locking
strategy.
public boolean beforeSet(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws DropletFormException
beforeSet in interface DropletFormHandlerbeforeSet in class GenericFormHandlerpRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse value
boolean value
DropletFormException - if an error occursafterSet(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse),
ensureTransaction(),
setUseLocksAroundTransactions(boolean)
public boolean afterSet(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws DropletFormException
afterSet in interface DropletFormHandlerafterSet in class GenericFormHandlerpRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse value
boolean value
DropletFormException - if an error occursbeforeSet(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse),
ensureTransaction(),
setUseLocksAroundTransactions(boolean)
protected void setTransactionCreated(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
protected boolean isTransactionCreated(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
protected void unsetTransactionCreated(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
public void handlePipelineError(java.lang.Object pError,
java.lang.String pErrorKey)
handlePipelineError in interface atg.commerce.util.PipelineErrorHandlerpError - the error reported by the pipeline.pErrorKey - the key of the error, used for localization.protected java.util.Map createRepriceParameterMap()
protected void copyConfiguration()
PurchaseProcessConfiguration component. Property
values that were configured locally are preserved.
Configures the following properties (if not already set):
public void doStartService()
throws ServiceException
PurchaseProcessConfiguration
component.
doStartService in class GenericServiceServiceException - if the Service had a problem starting up
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||