public class CSRCreateCreditCardFormHandler
extends atg.commerce.order.purchase.CreateCreditCardFormHandler
CSRCreateCreditCardFormHandler class extends
CreateCreditCardFormHandler to allow the agent to designate the
amount that should be paid for by the new credit card.CreateCreditCardFormHandler,
PurchaseProcessFormHandler| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
static java.lang.String |
COULD_NOT_CLONE_CONTACT_INFO_ITEM |
static java.lang.String |
COULD_NOT_FIND_EXISTING_ADDRESS |
static java.lang.String |
COULD_NOT_FIND_PAYMENT_GROUP |
static java.lang.String |
ERROR_WHILE_COPYING_ADDRESS |
protected atg.svc.agent.customer.CustomerProfileTools |
mCustomerProfileTools |
static java.lang.String |
MSG_ERROR_COPYING_CONTACT_INFO_TO_CREDIT_CARD |
static java.lang.String |
MSG_ERROR_CREATING_PAYMENT_INFO_FROM_ORIGINAL |
static java.lang.String |
MSG_ERROR_UPDATING_ORDER_ON_ADD_CREDIT_CARD |
static java.lang.String |
MY_RESOURCE_NAME |
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUEPARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS| Constructor and Description |
|---|
CSRCreateCreditCardFormHandler()
Creates a new
CSRCreateCreditCardFormHandler instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
copyContactInfoToCreditCard()
While creating a brand new credit card, user could use already existing addresses or user could enter a brand new
address.
|
protected void |
createCreateCreditCardTicketActivity(atg.repository.RepositoryItem pTicket,
java.util.Collection pPropertyUpdates)
Creates the ticket activities associated with creating a new credit card that was saved to the
customer's profile.
|
protected atg.commerce.order.purchase.CommerceIdentifierPaymentInfo |
createSpecificPaymentInfo(atg.commerce.order.purchase.CommerceIdentifierPaymentInfo pCommerceIdentifierPaymentInfo)
The
createSpecificPaymentInfo method takes a CommerceIdentifierPaymentInfo
and creates a new one whose subtype matches that of the original. |
atg.commerce.csr.profile.AddressHolder |
getAddressHolder()
Returns the addressHolder.
|
int |
getAddressIndex()
Returns the addressIndex.
|
CSRAgentMessagingTools |
getAgentMessagingTools()
Returns component for sending agent messages
|
double |
getAmount()
Returns amount that will be assigned to this credit card
|
CSRAgentTools |
getCSRAgentTools()
Returns the cSRAgentTools.
|
atg.svc.agent.customer.CustomerProfileTools |
getCustomerProfileTools() |
java.util.List |
getExistingAddresses()
If the address holder does not have any addresses, this method calls the
CSRAgentTools to generate
a list of unique addresses. |
java.lang.String |
getItemUpdateActivityType() |
java.lang.String |
getRelationshipType()
Returns the type of PaymentGroupRelationship that the PaymentGroup
created with the new credit card will have.
|
atg.repository.RepositoryItem |
getTicket()
Returns the current ticket
|
java.lang.String |
getTicketId()
Returns the Id of the current ticket
|
boolean |
isUseExistingAddress() |
void |
postCreateCreditCard(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
postCreateCreditCard is for work that must happen after
a new CreditCard is created. |
void |
preCreateCreditCard(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
preCreateCreditCard is for work that must happen before
a new CreditCard is created. |
void |
setAddressHolder(atg.commerce.csr.profile.AddressHolder pAddressHolder)
Sets the addressHolder.
|
void |
setAddressIndex(int pAddressIndex)
Sets the addressIndex.
|
void |
setAgentMessagingTools(CSRAgentMessagingTools pAgentMessagingTools)
Sets the component for sending agent messages
|
void |
setAmount(double pAmount)
Sets the amount that will be assigned to this credit card
|
void |
setAutoSelectInitialAddress(boolean pFlag)
This method is called from the page to pre-select the addresses in the
add credit card drop down box.
|
void |
setClearCreditCard(java.lang.String pClearFlag)
After successfully adding the credit card, if we display the add credit card
page, we need to clear out the credit card from the page.
|
void |
setCSRAgentTools(CSRAgentTools pAgentTools)
Sets the cSRAgentTools.
|
void |
setCustomerProfileTools(atg.svc.agent.customer.CustomerProfileTools pCustomerProfileTools) |
void |
setItemUpdateActivityType(java.lang.String pItemUpdateActivityType)
Sets the activity type used for sending the item update agent events.
|
void |
setRelationshipType(java.lang.String pRelationshipType)
Sets the PaymentGroupRelationship type that the PaymentGroup
created with the new credit card will have.
|
void |
setUseExistingAddress(boolean pUseExistingAddress) |
protected void |
splitCommerceIdentifierPaymentInfoByAmount(atg.commerce.order.purchase.CommerceIdentifierPaymentInfo pCommerceIdentifierPaymentInfo,
double pSplitAmount)
splitCommerceIdentifierPaymentInfoByAmount splits a CommerceIdentifierPaymentInfo
by amount. |
copyConfiguration, createCreditCard, getContainer, getCreditCard, getCreditCardName, getCreditCardTools, getCreditCardType, getNewCreditCardErrorURL, getNewCreditCardSuccessURL, handleNewCreditCard, isAddToContainer, isAssignNewCreditCardAsDefault, isCopyToProfile, isGenerateNickname, isValidateCreditCard, setAddToContainer, setAssignNewCreditCardAsDefault, setContainer, setCopyToProfile, setCreditCard, setCreditCardName, setCreditCardTools, setCreditCardType, setGenerateNickname, setNewCreditCardErrorURL, setNewCreditCardSuccessURL, setValidateCreditCard, validateCreditCardacquireTransactionLock, 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, setUseForwardsaddLogListener, clearAbsoluteNameAndContext, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, isStartServiceComplete, 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, toStringvlogDebug, 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 MY_RESOURCE_NAME
public static final java.lang.String COULD_NOT_CLONE_CONTACT_INFO_ITEM
public static final java.lang.String COULD_NOT_FIND_PAYMENT_GROUP
public static final java.lang.String COULD_NOT_FIND_EXISTING_ADDRESS
public static final java.lang.String ERROR_WHILE_COPYING_ADDRESS
public static final java.lang.String MSG_ERROR_UPDATING_ORDER_ON_ADD_CREDIT_CARD
public static final java.lang.String MSG_ERROR_CREATING_PAYMENT_INFO_FROM_ORIGINAL
public static final java.lang.String MSG_ERROR_COPYING_CONTACT_INFO_TO_CREDIT_CARD
protected atg.svc.agent.customer.CustomerProfileTools mCustomerProfileTools
public CSRCreateCreditCardFormHandler()
CSRCreateCreditCardFormHandler instance.public atg.svc.agent.customer.CustomerProfileTools getCustomerProfileTools()
public void setCustomerProfileTools(atg.svc.agent.customer.CustomerProfileTools pCustomerProfileTools)
public int getAddressIndex()
public void setAddressIndex(int pAddressIndex)
pAddressIndex - public atg.commerce.csr.profile.AddressHolder getAddressHolder()
public void setAddressHolder(atg.commerce.csr.profile.AddressHolder pAddressHolder)
pAddressHolder - public void setAgentMessagingTools(CSRAgentMessagingTools pAgentMessagingTools)
pAgentMessagingTools - public CSRAgentMessagingTools getAgentMessagingTools()
public void setAmount(double pAmount)
pAmount - the amount that will be assigned to this credit cardpublic double getAmount()
public void setRelationshipType(java.lang.String pRelationshipType)
pRelationshipType - the PaymentGroupRelationship type that the PaymentGroup
created with the new credit card will have.public java.lang.String getRelationshipType()
public boolean isUseExistingAddress()
public void setUseExistingAddress(boolean pUseExistingAddress)
pUseExistingAddress - The useExistingAddress to set.public CSRAgentTools getCSRAgentTools()
public void setCSRAgentTools(CSRAgentTools pAgentTools)
pAgentTools - public void setItemUpdateActivityType(java.lang.String pItemUpdateActivityType)
pItemUpdateActivityType - the activity type used when sending the item update agent events.public java.lang.String getItemUpdateActivityType()
public java.lang.String getTicketId()
public void preCreateCreditCard(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
preCreateCreditCard is for work that must happen before
a new CreditCard is created.preCreateCreditCard in class atg.commerce.order.purchase.CreateCreditCardFormHandlerpRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occurspublic void postCreateCreditCard(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
postCreateCreditCard is for work that must happen after
a new CreditCard is created.postCreateCreditCard in class atg.commerce.order.purchase.CreateCreditCardFormHandlerpRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse valuejavax.servlet.ServletException - if an error occursjava.io.IOException - if an error occursprotected void createCreateCreditCardTicketActivity(atg.repository.RepositoryItem pTicket,
java.util.Collection pPropertyUpdates)
pTicket - pPropertyUpdates - protected void splitCommerceIdentifierPaymentInfoByAmount(atg.commerce.order.purchase.CommerceIdentifierPaymentInfo pCommerceIdentifierPaymentInfo,
double pSplitAmount)
splitCommerceIdentifierPaymentInfoByAmount splits a CommerceIdentifierPaymentInfo
by amount. This creates a new CommerceIdentifierPaymentInfo, adjusts properties of both
the original and the new object, and adds the new object to the
CommerceIdentifierPaymentInfoContainer.pCommerceIdentifierPaymentInfo - a CommerceIdentifierPaymentInfo valuepSplitAmount - a double valueprotected atg.commerce.order.purchase.CommerceIdentifierPaymentInfo createSpecificPaymentInfo(atg.commerce.order.purchase.CommerceIdentifierPaymentInfo pCommerceIdentifierPaymentInfo)
createSpecificPaymentInfo method takes a CommerceIdentifierPaymentInfo
and creates a new one whose subtype matches that of the original.pCommerceIdentifierPaymentInfo - a CommerceIdentifierPaymentInfo valueCommerceIdentifierPaymentInfo valuepublic void copyContactInfoToCreditCard()
public java.util.List getExistingAddresses()
CSRAgentTools to generate
a list of unique addresses. If the addresses are already in the address holder, then returns the addressespublic void setClearCreditCard(java.lang.String pClearFlag)
public void setAutoSelectInitialAddress(boolean pFlag)
public atg.repository.RepositoryItem getTicket()