public class CreateCreditCardFormHandler extends PurchaseProcessFormHandler implements CreatePaymentGroupFormHandler
CreateCreditCardFormHandler class is used to create a CreditCard
PaymentGroup. This CreditCard is optionally added to a PaymentGroupMapContainer
and copied to the Profile.GenericFormHandler,
PurchaseProcessFormHandler| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
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 |
|---|
CreateCreditCardFormHandler()
Creates a new
CreateCreditCardFormHandler instance. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyConfiguration()
Copy property settings from the optional
PurchaseProcessConfiguration component. |
void |
createCreditCard(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
createCreditCard creates a new CreditCard. |
PaymentGroupMapContainer |
getContainer()
Return the Container property.
|
CreditCard |
getCreditCard()
Return the CreditCard property.
|
java.lang.String |
getCreditCardName()
Return the CreditCardName property.
|
atg.payment.creditcard.ExtendableCreditCardTools |
getCreditCardTools()
Return the CreditCardTools property.
|
java.lang.String |
getCreditCardType()
Return the CreditCardType property.
|
java.lang.String |
getNewCreditCardErrorURL()
Return the NewCreditCardErrorURL property.
|
java.lang.String |
getNewCreditCardSuccessURL()
Return the NewCreditCardSuccessURL property.
|
boolean |
handleNewCreditCard(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
handleNewCreditCard is used to create a new CreditCard. |
boolean |
isAddToContainer()
Return the AddToContainer property.
|
boolean |
isAssignNewCreditCardAsDefault() |
boolean |
isCopyToProfile()
Return the CopyToProfile property.
|
boolean |
isGenerateNickname() |
boolean |
isValidateCreditCard() |
void |
postCreateCreditCard(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
postCreateCreditCard is for work that must happen after
a new CreditCard is created. |
void |
preCreateCreditCard(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
preCreateCreditCard is for work that must happen before
a new CreditCard is created. |
void |
setAddToContainer(boolean pAddToContainer)
Set the AddToContainer property.
|
void |
setAssignNewCreditCardAsDefault(boolean pAssignNewCreditCardAsDefault) |
void |
setContainer(PaymentGroupMapContainer pContainer)
Set the Container property.
|
void |
setCopyToProfile(boolean pCopyToProfile)
Set the CopyToProfile property.
|
void |
setCreditCard(CreditCard pCreditCard)
Set the CreditCard property.
|
void |
setCreditCardName(java.lang.String pCreditCardName)
Set the CreditCardName property.
|
void |
setCreditCardTools(atg.payment.creditcard.ExtendableCreditCardTools pCreditCardTools)
Set the ExtendableCreditCardTools property
|
void |
setCreditCardType(java.lang.String pCreditCardType)
Set the CreditCardType property.
|
void |
setGenerateNickname(boolean pGenerateNickname) |
void |
setNewCreditCardErrorURL(java.lang.String pNewCreditCardErrorURL)
Set the NewCreditCardErrorURL property.
|
void |
setNewCreditCardSuccessURL(java.lang.String pNewCreditCardSuccessURL)
Set the NewCreditCardSuccessURL property.
|
void |
setValidateCreditCard(boolean pValidateCreditCard) |
void |
validateCreditCard(CreditCard pCreditCard,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method validates the credit card and if there is any errors adds the
form exceptions.
|
acquireTransactionLock, acquireTransactionLock, afterSet, beforeSet, checkFormRedirect, commitTransaction, 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 CreateCreditCardFormHandler()
CreateCreditCardFormHandler instance.public void setCreditCardTools(atg.payment.creditcard.ExtendableCreditCardTools pCreditCardTools)
pCreditCardTools - a ExtendableCreditCardTools valuepublic atg.payment.creditcard.ExtendableCreditCardTools getCreditCardTools()
ExtendableCreditCardTools valuepublic void setAddToContainer(boolean pAddToContainer)
pAddToContainer - a boolean valuepublic boolean isAddToContainer()
boolean valuepublic void setCopyToProfile(boolean pCopyToProfile)
pCopyToProfile - a boolean valuepublic boolean isCopyToProfile()
boolean valuepublic void setContainer(PaymentGroupMapContainer pContainer)
pContainer - a PaymentGroupMapContainer valuepublic PaymentGroupMapContainer getContainer()
PaymentGroupMapContainer valuepublic void setCreditCardName(java.lang.String pCreditCardName)
pCreditCardName - a String valuepublic java.lang.String getCreditCardName()
String valuepublic void setCreditCardType(java.lang.String pCreditCardType)
pCreditCardType - a String valuepublic java.lang.String getCreditCardType()
String valuepublic void setNewCreditCardSuccessURL(java.lang.String pNewCreditCardSuccessURL)
pNewCreditCardSuccessURL - a String valuepublic java.lang.String getNewCreditCardSuccessURL()
String valuepublic void setNewCreditCardErrorURL(java.lang.String pNewCreditCardErrorURL)
pNewCreditCardErrorURL - a String valuepublic java.lang.String getNewCreditCardErrorURL()
String valuepublic void setCreditCard(CreditCard pCreditCard)
pCreditCard - a CreditCard valuepublic CreditCard getCreditCard()
CreditCard valuepublic boolean isAssignNewCreditCardAsDefault()
public void setAssignNewCreditCardAsDefault(boolean pAssignNewCreditCardAsDefault)
pAssignNewCreditCardAsDefault - The assignNewCreditCardAsDefault to set.public boolean isValidateCreditCard()
public void setValidateCreditCard(boolean pValidateCreditCard)
pValidateCreditCard - The validateCreditCard to set.public boolean isGenerateNickname()
public void setGenerateNickname(boolean pGenerateNickname)
pGenerateNickname - The generateNickname to set.public boolean handleNewCreditCard(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleNewCreditCard is used to create a new CreditCard.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valueboolean valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void preCreateCreditCard(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
preCreateCreditCard is for work that must happen before
a new CreditCard is created.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void postCreateCreditCard(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
postCreateCreditCard is for work that must happen after
a new CreditCard is created.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void createCreditCard(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
createCreditCard creates a new CreditCard. The CreditCardType
property gives the type of PaymentGroup to create. The CreditCardName property
gives the name of the new PaymentGroup, as it will be referenced in the
PaymentGroupMapContainer. If isAddToContainer is true then
the CreditCard is added to the PaymentGroupMapContainer and made the default
PaymentGroup. If isCopyToProfile is true then the CreditCard is copied
to the Profile.pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valueatg.commerce.profile.CommerceProfileTools.getUniqueCreditCardNickname()public void validateCreditCard(CreditCard pCreditCard, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pCreditCard - java.io.IOExceptionjavax.servlet.ServletExceptionprotected void copyConfiguration()
PurchaseProcessConfiguration component. Property
values that were configured locally are preserved.
Configures the following properties (if not already set):
copyConfiguration in class PurchaseProcessFormHandler