|
|||||||||
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.OrderModifierFormHandler
atg.commerce.order.ShoppingCartFormHandler
atg.commerce.order.FullShoppingCartFormHandler
public class FullShoppingCartFormHandler
The FullShoppingCartFormHandler extends the functionality of the @see ShoppingCartFormHandler by giving the additional functionality of handling multiple payment method (GiftCertificates and Credit Cards), multiple location ship to addresses, express checkout and adding an item to a person's gift list. Added handle methods are:
defaultShippingAddrName
specified by the @see propertyManager.
The FullShoppingCartFormHandler follows the same pattern as the ShoppingCartFormHandler where each handleXXX method provides a hook into additional functionality via preXXX and postXXX method.
This FormHandler provides an example of how this can be used. The @see #preMoveToConfirmation method provides the additional functionality of interacting with the user's saved credit cards and also handling the possibility of multiple payment methods. First, a call to the super preMoveToConfirmation is called, then the method provides the additional functionality supplied by this FormHandler.
ShoppingCartFormHandler
,
GenericFormHandler
Field Summary | |
---|---|
protected static java.lang.String |
BILLING_ADDR_PROP_NAME
|
static java.lang.String |
CLASS_VERSION
Class version String |
protected static java.lang.String |
CONTACT_INFO_ITEM_NAME
|
protected static java.lang.String[] |
CREDIT_CARD_PROPERTIES
|
protected static java.lang.String |
DEFAULT_CREDIT_CARD
|
protected static java.lang.String |
ERROR_MISSING_BILLING_ADDRESS
|
protected static java.lang.String |
ERROR_MISSING_CREDIT_CARD
|
protected static java.lang.String[] |
GIFT_CERTIFICATE_PROPERTIES
|
protected static java.lang.String |
MSG_ADDRESS_ALREADY_EXISTS
|
protected static java.lang.String |
MSG_ERROR_ADDING_ADDRESS
|
protected static java.lang.String |
MSG_ERROR_MOVING_ITEM_TO_NEW_ADDRESS
|
protected static java.lang.String |
MSG_ERROR_UNABLE_TO_ADD_CC
|
protected static java.lang.String |
MSG_NO_CREDIT_CARD_NUMBER
|
protected static java.lang.String |
MSG_NO_NEW_ADDRESS_ENTERED
|
protected static java.lang.String |
MSG_NO_NICKNAME
|
protected static java.lang.String |
MSG_UNABLE_TO_COPY_CREDIT_CARD
|
protected static java.lang.String |
NEW
|
protected static java.lang.String |
NO_CREDIT_CARD
|
protected static java.lang.String |
REDUNDANT_CREDIT_CARD
|
protected static java.lang.String |
SECONDARY_ADDRESS_PROPERTY_NAME
|
protected static java.lang.String |
UNEQUAL_GC_SIZE
|
protected static java.lang.String |
UNSUPPORTED_PAYMENTGROUP
|
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 | |
---|---|
FullShoppingCartFormHandler()
Empty Constructor |
Method Summary | |
---|---|
protected void |
addNewShippingAddress(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
A shipping address exists in the getShippingGroup(), but not in the Profile so it needs to be propogated there. |
protected void |
copyAddressesToProfile(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Copy all the addresses that currently exist in the Order's list of Shipping Groups to the Profile's list of secondary addresses. |
protected void |
copyCreditCard(CreditCard pFromCreditCard,
RepositoryItem pToCreditCard)
Deprecated. this method has been moved to CommerceProfileTools |
protected void |
copyCreditCard(RepositoryItem pFromCreditCard,
CreditCard pToCreditCard)
Deprecated. this method has been moved to CommerceProfileTools |
protected void |
copyCreditCardToPaymentGroup(java.lang.String pNickname,
CreditCard paymentGroup,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Deprecated. this method has been moved to CommerceProfileTools |
protected void |
copyCreditCardToProfile(CreditCard pCreditCard)
Deprecated. this method has been moved to CommerceProfileTools |
protected void |
copyExistingAddress(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Copies the address named by the property shipToAddressName to the primary shipping group in the order. |
protected void |
copyProfileAddressToShippingGroupAddress(java.lang.String pProfileAddressName,
ShippingGroup pShippingGroup,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
The address as specified by the pProfileAddressName is copied
from the user's profile to the shippingGroup specified by pShippingGroup
The profile address is obtained by using the @see #commerceProfileTools. |
protected void |
copyShallowCreditCardProperties(java.lang.Object pFromCreditCard,
java.lang.Object pToCreditCard)
Deprecated. this method has been moved to CommerceProfileTools |
protected java.util.List |
createGiftCertificatePaymentGroups(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method will parse a string and attempt to create giftCertificatePaymentGroups out of the tokens of the string. |
java.lang.String |
getAddGiftItemToOrderErrorURL()
Returns property AddGiftItemToOrderErrorURL |
java.lang.String |
getAddGiftItemToOrderSuccessURL()
Returns property AddGiftItemToOrderSuccessURL |
java.lang.String[] |
getAddressesToCopy()
Get the array of addresses to copy. |
ClaimableManager |
getClaimableManager()
Return the ClaimableManager property. |
ClaimableTools |
getClaimableTools()
Return the ClaimableTools property. |
CommerceProfileTools |
getCommerceProfileTools()
Return the CommerceProfileTools property. |
java.lang.String |
getCreateAddressErrorURL()
Returns property CreateAddressErrorURL |
java.lang.String |
getCreateAddressSuccessURL()
Returns property CreateAddressSuccessURL |
java.lang.String[] |
getCreditCardProperties()
Return the creditCardProperties property. |
java.lang.String |
getExpressCheckoutErrorURL()
The URL to go to if Express Checkout fails |
java.lang.String |
getExpressCheckoutSuccessURL()
The URL to go to if Express Checkout is successful |
java.lang.String[] |
getGiftCertificateProperties()
Return the giftCertificateProperties property. |
java.lang.String |
getMoveToNewShippingAddressErrorURL()
Returns property MoveToNewShippingAddressErrorURL |
java.lang.String |
getMoveToNewShippingAddressSuccessURL()
Returns property MoveToNewShippingAddressSuccessURL |
java.lang.String |
getNewShippingAddressName()
Returns property NewShippingAddressName |
java.lang.String |
getOriginalShippingAddressName()
Returns property OriginalShippingAddressName |
java.util.Collection |
getProfileAddressNames()
Return the profileAddressNames property. |
CommercePropertyManager |
getPropertyManager()
Return the PropertyManager property. |
int |
getQuantityToMove()
Returns property QuantityToMove |
java.lang.String |
getSelectedCreditCardName()
Return the SelectedCreditCardName property. |
java.lang.String |
getShipToAddressName()
Get the name of the address to ship the goods to |
java.lang.String |
getShipToDoneErrorURL()
Returns property ShipToDoneErrorURL |
java.lang.String |
getShipToDoneSuccessURL()
Returns property ShipToDoneSuccessURL |
java.lang.String |
getShipToMultipleDoneErrorURL()
Returns property ShipToMultipleDoneErrorURL |
java.lang.String |
getShipToMultipleDoneSuccessURL()
Returns property ShipToMultipleDoneSuccessURL |
java.lang.String |
getShipToMultipleErrorURL()
Returns property ShipToMultipleErrorURL |
java.lang.String |
getShipToMultipleSuccessURL()
Returns property ShipToMultipleSuccessURL |
java.lang.String |
getValidateShippingGroupsChainId()
Return the validateShippingGroupsChainId property. |
boolean |
handleAddGiftItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
The same as @see ShoppingCartFormHandler#handleAddItemToOrder with the added affect of adding handling to the shipping group |
boolean |
handleCreateAddress(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Handles creating a new address object in the user's secondary address property. |
boolean |
handleExpressCheckout(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
|
boolean |
handleMoveToNewShippingAddress(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method handles the moving of a commerce item from one shipping group to another in a user's order. |
boolean |
handleShipToDone(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after the user has finished inputting their shipping information. |
boolean |
handleShipToMultiple(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called when the user selects to ship their items to multiple locations. |
boolean |
handleShipToMultipleDone(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after a user is done specifying the addresses that they want to move their commerce items to. |
protected boolean |
isCreditCardEmpty(CreditCard pCreditCard)
Deprecated. this method has been moved to CommerceProfileTools |
protected boolean |
isGiftCertificateEmpty(GiftCertificate pGiftCertificate)
Checks to see if a GiftCertificate object is empty. |
protected boolean |
isNewCreditCards()
Check to see if there have been any new credit payment groups added to the List of creditCardPaymentGroups. |
protected boolean |
isNewGiftCertificates()
Check to see if there have been any new gift certificate payment groups added to the List of giftCertificatePaymentGroups. |
protected boolean |
isOrderRelationshipExists(Order pOrder,
java.lang.String pPaymentGroupId)
Determines if a relationship exists between a specified paymentGroup and the specified order object. |
protected boolean |
isPaymentGroupEmpty(java.lang.Object pPaymentGroup,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method knows about two types of payment methods: CreditCards and GiftCertificates. |
protected boolean |
isSingletonRelationship(ShippingGroup pShippingGroup,
CommerceItem pCommerceItem,
Order order,
int pQuantityToMove)
This method will determine if the relationship between a given shippingGroup and commerceItem is singleton. |
protected void |
mergePaymentGroupsToOrder(java.util.List pGiftCertificateAmounts,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Check two lists of payment groups: giftCertificatePaymentGroups and creditCardPaymentGroups. |
protected void |
moveCommerceItemsToNewShippingGroup(java.lang.String pFromAddress,
java.lang.String pToAddress,
java.lang.String pCommerceItemIdToMove,
int pQuantityToMove,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method moves commerce items from one shipping group to another. |
void |
postAddGiftItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
|
void |
postCreateAddress(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called right after any processing is done by the handleCreateAddress
method. |
void |
postExpressCheckout(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
|
void |
postMoveToConfirmation(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method will check to see if the user entered a new credit card and additionally see if there were any errors. |
void |
postMoveToNewShippingAddress(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after any processing is done by the handleMoveToNewShippingAddress
method. |
void |
postShipToDone(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after any processing is done by the handleShipToDone
method. |
void |
postShipToMultiple(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after processing has been done by the handleShipToMultiple
method. |
void |
postShipToMultipleDone(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after processing by the handleShipToMultipleDone method. |
void |
preAddGiftItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
|
void |
preCreateAddress(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called right before any processing is done by the handleCreateAddress
method. |
void |
preExpressCheckout(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
|
void |
preMoveToConfirmation(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Provide ability to interact with credit cards in user's profile and to handle multiple forms of payment. |
void |
preMoveToNewShippingAddress(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any processing is done by the handleMoveToNewShippingAddress
method. |
void |
preShipToDone(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any processing is done by the handleShipToDone |
void |
preShipToMultiple(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any processing has been done by the handleShipToMultiple
method. |
void |
preShipToMultipleDone(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any processing is done by the handleShipToMultipleDone
method. |
protected void |
removeAddedNickNameEntries()
|
protected void |
removeCreditCardPaymentGroupsFromOrder()
This function removes all the credit card paymentgroups from the order. |
protected void |
removePaymentGroupsFromOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Removes all payment groups from the order. |
protected boolean |
runProcessValidateShippingGroups(Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Run the pipeline which should be executed when the handleMoveToPurchaseInfo method is invoked |
void |
setAddGiftItemToOrderErrorURL(java.lang.String pAddGiftItemToOrderErrorURL)
Sets property AddGiftItemToOrderErrorURL |
void |
setAddGiftItemToOrderSuccessURL(java.lang.String pAddGiftItemToOrderSuccessURL)
Sets property AddGiftItemToOrderSuccessURL |
void |
setAddressesToCopy(java.lang.String[] pAddressesToCopy)
Set the addresses that need to be copied from the ShippingGroup objects to the Profile "secondary addresses" map. |
void |
setClaimableManager(ClaimableManager pClaimableManager)
Set the ClaimableManager property. |
void |
setClaimableTools(ClaimableTools pClaimableTools)
Set the ClaimableTools property. |
void |
setCommerceProfileTools(CommerceProfileTools pCommerceProfileTools)
Set the CommerceProfileTools property. |
void |
setConfiguration(ShoppingCartModifierConfiguration pConfiguration)
Sets property Configuration, and in the process configures the following properties: ClaimableManager ClaimableTools PropertyManager CommerceProfileTools Plus the properties in the super-class. |
void |
setCreateAddressErrorURL(java.lang.String pCreateAddressErrorURL)
Sets property CreateAddressErrorURL. |
void |
setCreateAddressSuccessURL(java.lang.String pCreateAddressSuccessURL)
Sets property CreateAddressSuccessURL. |
void |
setCreditCardProperties(java.lang.String[] pCreditCardProperties)
Set the creditCardProperties property. |
void |
setExpressCheckoutErrorURL(java.lang.String pURL)
|
void |
setExpressCheckoutSuccessURL(java.lang.String pURL)
|
void |
setGiftCertificateProperties(java.lang.String[] pGiftCertificateProperties)
Set the giftCertificateProperties property. |
void |
setMoveToNewShippingAddressErrorURL(java.lang.String pMoveToNewShippingAddressErrorURL)
Sets property MoveToNewShippingAddressErrorURL. |
void |
setMoveToNewShippingAddressSuccessURL(java.lang.String pMoveToNewShippingAddressSuccessURL)
Sets property MoveToNewShippingAddressSuccessURL. |
void |
setNewShippingAddressName(java.lang.String pNewShippingAddressName)
Sets property which contains the Shipping Address name where Commerce Items should be shipped to. |
void |
setOriginalShippingAddressName(java.lang.String pOriginalShippingAddressName)
Sets property OriginalShippingAddressName. |
protected void |
setPaymentMethodsInOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Method that deals with setting the payment methods that are to be used in an order. |
void |
setPropertyManager(CommercePropertyManager pPropertyManager)
Set the PropertyManager property. |
void |
setQuantityToMove(int pQuantityToMove)
Sets property QuantityToMove. |
void |
setSelectedCreditCardName(java.lang.String pSelectedCreditCardName)
Set the SelectedCreditCardName property. |
void |
setShipToAddressName(java.lang.String pShipToAddressName)
Set the nickname of the address from the secondary address map that will be used to ship the goods to. |
void |
setShipToDoneErrorURL(java.lang.String pShipToDoneErrorURL)
Sets property ShipToDoneErrorURL |
void |
setShipToDoneSuccessURL(java.lang.String pShipToDoneSuccessURL)
Sets property ShipToDoneSuccessURL. |
void |
setShipToMultipleDoneErrorURL(java.lang.String pShipToMultipleDoneErrorURL)
Sets property ShipToMultipleDoneErrorURL. |
void |
setShipToMultipleDoneSuccessURL(java.lang.String pShipToMultipleDoneSuccessURL)
Sets property ShipToMultipleDoneSuccessURL. |
void |
setShipToMultipleErrorURL(java.lang.String pShipToMultipleErrorURL)
Sets property ShipToMultipleErrorURL. |
void |
setShipToMultipleSuccessURL(java.lang.String pShipToMultipleSuccessURL)
Sets property ShipToMultipleSuccessURL. |
void |
setValidateShippingGroupsChainId(java.lang.String pValidateShippingGroupsChainId)
Set the validateShippingGroupsChainId property. |
void |
updateShippingAddress(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method does two things: checks to see if a new address has been input by the user and else copies an existing profile address to the shippingGroup. |
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 MSG_ERROR_MOVING_ITEM_TO_NEW_ADDRESS
protected static final java.lang.String MSG_ADDRESS_ALREADY_EXISTS
protected static final java.lang.String MSG_ERROR_ADDING_ADDRESS
protected static final java.lang.String MSG_NO_NEW_ADDRESS_ENTERED
protected static final java.lang.String MSG_ERROR_UNABLE_TO_ADD_CC
protected static final java.lang.String MSG_UNABLE_TO_COPY_CREDIT_CARD
protected static final java.lang.String MSG_NO_NICKNAME
protected static final java.lang.String MSG_NO_CREDIT_CARD_NUMBER
protected static final java.lang.String SECONDARY_ADDRESS_PROPERTY_NAME
protected static final java.lang.String DEFAULT_CREDIT_CARD
protected static final java.lang.String CONTACT_INFO_ITEM_NAME
protected static final java.lang.String BILLING_ADDR_PROP_NAME
protected static final java.lang.String NO_CREDIT_CARD
protected static final java.lang.String UNSUPPORTED_PAYMENTGROUP
protected static final java.lang.String UNEQUAL_GC_SIZE
protected static final java.lang.String ERROR_MISSING_BILLING_ADDRESS
protected static final java.lang.String ERROR_MISSING_CREDIT_CARD
protected static final java.lang.String[] CREDIT_CARD_PROPERTIES
protected static final java.lang.String[] GIFT_CERTIFICATE_PROPERTIES
protected static final java.lang.String NEW
protected static final java.lang.String REDUNDANT_CREDIT_CARD
Constructor Detail |
---|
public FullShoppingCartFormHandler()
Method Detail |
---|
public void setConfiguration(ShoppingCartModifierConfiguration pConfiguration)
setConfiguration
in class ShoppingCartFormHandler
public void setGiftCertificateProperties(java.lang.String[] pGiftCertificateProperties)
public java.lang.String[] getGiftCertificateProperties()
public void setCreditCardProperties(java.lang.String[] pCreditCardProperties)
public java.lang.String[] getCreditCardProperties()
public void setValidateShippingGroupsChainId(java.lang.String pValidateShippingGroupsChainId)
public java.lang.String getValidateShippingGroupsChainId()
public void setPropertyManager(CommercePropertyManager pPropertyManager)
public CommercePropertyManager getPropertyManager()
public void setCommerceProfileTools(CommerceProfileTools pCommerceProfileTools)
public CommerceProfileTools getCommerceProfileTools()
public void setClaimableManager(ClaimableManager pClaimableManager)
public ClaimableManager getClaimableManager()
public void setClaimableTools(ClaimableTools pClaimableTools)
public ClaimableTools getClaimableTools()
public void setAddressesToCopy(java.lang.String[] pAddressesToCopy)
pAddressesToCopy
- the names of the addresses to copypublic java.lang.String[] getAddressesToCopy()
public void setSelectedCreditCardName(java.lang.String pSelectedCreditCardName)
public java.lang.String getSelectedCreditCardName()
public void setNewShippingAddressName(java.lang.String pNewShippingAddressName)
public java.lang.String getNewShippingAddressName()
public void setOriginalShippingAddressName(java.lang.String pOriginalShippingAddressName)
public java.lang.String getOriginalShippingAddressName()
public void setQuantityToMove(int pQuantityToMove)
public int getQuantityToMove()
public void setShipToAddressName(java.lang.String pShipToAddressName)
pShipToAddressName
- location to ship goods topublic java.lang.String getShipToAddressName()
public java.util.Collection getProfileAddressNames()
public void setExpressCheckoutSuccessURL(java.lang.String pURL)
public java.lang.String getExpressCheckoutSuccessURL()
public void setExpressCheckoutErrorURL(java.lang.String pURL)
public java.lang.String getExpressCheckoutErrorURL()
public void setCreateAddressSuccessURL(java.lang.String pCreateAddressSuccessURL)
public java.lang.String getCreateAddressSuccessURL()
public void setCreateAddressErrorURL(java.lang.String pCreateAddressErrorURL)
public java.lang.String getCreateAddressErrorURL()
public void setShipToDoneSuccessURL(java.lang.String pShipToDoneSuccessURL)
public java.lang.String getShipToDoneSuccessURL()
public void setShipToDoneErrorURL(java.lang.String pShipToDoneErrorURL)
public java.lang.String getShipToDoneErrorURL()
public void setShipToMultipleErrorURL(java.lang.String pShipToMultipleErrorURL)
public java.lang.String getShipToMultipleErrorURL()
public void setShipToMultipleDoneSuccessURL(java.lang.String pShipToMultipleDoneSuccessURL)
public java.lang.String getShipToMultipleDoneSuccessURL()
public void setShipToMultipleDoneErrorURL(java.lang.String pShipToMultipleDoneErrorURL)
public java.lang.String getShipToMultipleDoneErrorURL()
public void setShipToMultipleSuccessURL(java.lang.String pShipToMultipleSuccessURL)
public java.lang.String getShipToMultipleSuccessURL()
public void setMoveToNewShippingAddressSuccessURL(java.lang.String pMoveToNewShippingAddressSuccessURL)
public java.lang.String getMoveToNewShippingAddressSuccessURL()
public void setMoveToNewShippingAddressErrorURL(java.lang.String pMoveToNewShippingAddressErrorURL)
public java.lang.String getMoveToNewShippingAddressErrorURL()
public void setAddGiftItemToOrderSuccessURL(java.lang.String pAddGiftItemToOrderSuccessURL)
public java.lang.String getAddGiftItemToOrderSuccessURL()
public void setAddGiftItemToOrderErrorURL(java.lang.String pAddGiftItemToOrderErrorURL)
public java.lang.String getAddGiftItemToOrderErrorURL()
public void preMoveToConfirmation(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
To see if a credit card needs to be copied to/from the profile
the value of
Next, check to see if there have been new credit cards entered
into list of credit cards and the user input gift certificate
numbers. If either of these is true, then attempt to place the various
payment methods into the user's Order object by calling
selectedCreditCardName
is checked.
If it has a value then make a call to setPaymentMethodsInOrder
. The method isNewCreditCards()
is used to see if there are new credit cards.
preMoveToConfirmation
in class ShoppingCartFormHandler
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurs
public void postMoveToConfirmation(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
postMoveToConfirmation
in class ShoppingCartFormHandler
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void preAddGiftItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public void postAddGiftItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public boolean handleAddGiftItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- 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 void preCreateAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleCreateAddress
method.
Currently is empty.
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void postCreateAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleCreateAddress
method.
Currently is empty.
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleCreateAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
newShippingAddressName
. Two conditions are checked for
in this new address name
CommerceProfileTools
to create an entry in the user's secondary address map using the name supplied
by newShippingAddressName
. Only an entry is made at this point,
no actual address information is inserted. i.e. the key now exists, but the value
for the key does not.
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void preShipToMultiple(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleShipToMultiple
method. Currently nothing is being done.
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void postShipToMultiple(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleShipToMultiple
method. Currently nothing is being done.
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleShipToMultiple(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
PropertyManager
.
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void preMoveToNewShippingAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleMoveToNewShippingAddress
method. Currently, nothing is being done.
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void postMoveToNewShippingAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleMoveToNewShippingAddress
method. Currently, nothing is being done.
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleMoveToNewShippingAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
originalShippingAddressName, newShippingAddressName,
commerceItemIdToEdit and quantityToMove
. The originalShippingAddressName
is the description name of the shipping group that the commerce items will
be moved from. The newShippingAddressName is the nickname from the user's secondary
address map that contains the address that the items will be moved to. The
commerceItemIdToEdit should be the id of the CommerceItem that will be moved.
This method simply makes a call to
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occursto actually do movement of the commerce items.
public void preShipToMultipleDone(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleShipToMultipleDone
method. Currently, nothing is being done.
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void postShipToMultipleDone(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleShipToMultipleDone
method.
Currently, nothing is being done.
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleShipToMultipleDone(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- 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 void preShipToDone(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleShipToDone
method. Currently, it does nothing.
- Parameters:
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
- Throws:
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurs
public void postShipToDone(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleShipToDone
method. Currently, it does nothing.
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleShipToDone(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
shipToAddressName
.
If there is a name specified for this property than
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occursis called to copy the address information from the correct location.
Additionally, the user could have addresses info in their order which do
not exist in their profile yet. If this is the case, then the names of those
addresses should be in the addressesToCopy
property. These
addresses will be copied over by the
,
method.
Finally, the shipping groups in the order will attempt to be validated via
the runProcessValidateShippingGroups method. If there are errors, then
any added nicknames to the profile during the current submit will be removed.
This is because the shipping groups have not been validated and the user will
need to chagne their address info before continuing. This prevents "half" addresses
from appearing in the user's profile. Since the nicknames will have been removed the
copyAddressesToProfile method will not get called and the new address that the user
just input will not get copied to the Profile.
public void preExpressCheckout(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- 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 void postExpressCheckout(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- 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 handleExpressCheckout(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
pRequest
- 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 io
pjeprotected void copyCreditCardToProfile(CreditCard pCreditCard)
pCreditCard
- the credit card that is to be copied to a user's profileprotected void copyCreditCardToPaymentGroup(java.lang.String pNickname, CreditCard paymentGroup, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pNickname
- a value of type 'String'paymentGroup
- a value of type 'CreditCard'pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
java.io.IOException
protected void copyCreditCard(RepositoryItem pFromCreditCard, CreditCard pToCreditCard)
The first is copying the shallow properties of the credit card. These are objects like String, Integer etc. that can be copied. This shallow copying is performed by the @see #copyShallowCreditCardProperties method.
Next, any post copying is done. The single object that must have a "deep" coyp performed on it is the billingAddress of the credit card. The billingAddress is obtained from both objects and then a call is made to the
pFromCreditCard
- a value of type 'RepositoryItem'pToCreditCard
- a value of type 'CreditCard'to perform the copy.
If there is additional deep copying that needs to be done, this method should be overriden.
protected void copyCreditCard(CreditCard pFromCreditCard, RepositoryItem pToCreditCard)
The first is copying the shallow properties of the credit card. These are objects like String, Integer etc. that can be copied. This shallow copying is performed by the @see #copyShallowCreditCardProperties method.
Next, any post copying is done. The single object that must have a "deep" copy performed on it is the billingAddress of the credit card. The billingAddress is obtained from both objects and then a call is made to the
pFromCreditCard
- a value of type 'RepositoryItem'pToCreditCard
- a value of type 'CreditCard'to perform the copy.
If there is additional deep copying that needs to be done, this method should be overriden.
protected void copyShallowCreditCardProperties(java.lang.Object pFromCreditCard, java.lang.Object pToCreditCard) throws PropertyNotFoundException
shallowCreditCardPropertyNames
property. These properties
are then copied via DynamicBeans
pFromCreditCard
- the credit card that the address is copied frompToCreditCard
- the destination credit card for address
PropertyNotFoundException
- if a property listed by shallowCreditCardPropertyNames
is not foundprotected void removeAddedNickNameEntries() throws RepositoryException
RepositoryException
protected void moveCommerceItemsToNewShippingGroup(java.lang.String pFromAddress, java.lang.String pToAddress, java.lang.String pCommerceItemIdToMove, int pQuantityToMove, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws CommerceException, javax.servlet.ServletException, java.io.IOException
pToAddress
is
obtained from the Profile and the info is copied. The
pFromAddress
- a value of type 'String'pToAddress
- a value of type 'String'pCommerceItemIdToMove
- a value of type 'String'pQuantityToMove
- a value of type 'int'pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
CommerceException
- if an error occurs
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occursmethod performs the copying
protected boolean isSingletonRelationship(ShippingGroup pShippingGroup, CommerceItem pCommerceItem, Order order, int pQuantityToMove) throws CommerceException
pQuantityToMove
parameter should equal each other.
pShippingGroup
- shippingGroup the commerceItem currently belongs topCommerceItem
- the commerceItem to moveorder
- user's orderpQuantityToMove
- the quantity of the commerceItem to move
CommerceException
- if an error occursprotected void copyProfileAddressToShippingGroupAddress(java.lang.String pProfileAddressName, ShippingGroup pShippingGroup, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pProfileAddressName
is copied
from the user's profile to the shippingGroup specified by pShippingGroup
The profile address is obtained by using the @see #commerceProfileTools. The
profile is then copied using the @see OrderManager.
pProfileAddressName
- the profile address nickname that is the source addresspShippingGroup
- the destination shippinGroup where the address is copied topRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void updateShippingAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException, RepositoryException
shipToAddressName
property. After the address has been created, we add it to the list of addresses
to be copied via the addressesToCopy
property. This will then allow
the address to be copied from the order to the profile (once info has been filled in).
If a new shipping address is not specified, that means that the user selected an address that exists in their profile. This profile address is copied to the order via the @see #copyProfileAddressToShippingGroupAddress method.
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
java.io.IOException
- if an error occurs
javax.servlet.ServletException
- if an error occurs
RepositoryException
protected void addNewShippingAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
java.io.IOException
protected void copyExistingAddress(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, RepositoryException
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
java.io.IOException
RepositoryException
protected void copyAddressesToProfile(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
java.io.IOException
javax.servlet.ServletException
protected void setPaymentMethodsInOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws CommerceException, java.io.IOException, javax.servlet.ServletException
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
CommerceException
java.io.IOException
javax.servlet.ServletException
protected void removePaymentGroupsFromOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws CommerceException, javax.servlet.ServletException, java.io.IOException
CommerceException
- if an error occurs
javax.servlet.ServletException
java.io.IOException
protected boolean isPaymentGroupEmpty(java.lang.Object pPaymentGroup, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws CommerceException, javax.servlet.ServletException, java.io.IOException
pPaymentGroup
- payment group to test for isEmpty
CommerceException
- if the supplied parameter is not of type
CreditCard or GiftCertificate.
javax.servlet.ServletException
java.io.IOException
protected boolean isCreditCardEmpty(CreditCard pCreditCard)
This behavior can be overriden by making additions to the String array creditCardProperties, or if necessary extending this method.
pCreditCard
- a value of type 'CreditCard'
protected boolean isGiftCertificateEmpty(GiftCertificate pGiftCertificate)
This behavior can be overriden by making additions to the String array GiftCertificateProperties, or if necessary extending this method.
pGiftCertificate
- a value of type 'GiftCertificate'
protected java.util.List createGiftCertificatePaymentGroups(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws CommerceException, ClaimableException, java.io.IOException, javax.servlet.ServletException, RepositoryException, PropertyNotFoundException
giftCertificateNumbers
property
pRequest
- a value of type 'DynamoHttpServletRequest'pResponse
- a value of type 'DynamoHttpServletResponse'
CommerceException
- if an error occurs
ClaimableException
- if an error occurs
java.io.IOException
- if an error occurs
javax.servlet.ServletException
- if an error occurs
PropertyNotFoundException
- if an error occurs
RepositoryException
protected void mergePaymentGroupsToOrder(java.util.List pGiftCertificateAmounts, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws CommerceException, javax.servlet.ServletException, java.io.IOException
pGiftCertificateAmounts
- a list of the amounts that each gift certificate representspRequest
- servletRequest objectpResponse
- servletResponse object
CommerceException
javax.servlet.ServletException
java.io.IOException
protected boolean isOrderRelationshipExists(Order pOrder, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- user's orderpPaymentGroupId
- paymentGrou checked for relationship
CommerceException
- if an error occursprotected void removeCreditCardPaymentGroupsFromOrder() throws CommerceException
CommerceException
- if an error occursprotected boolean isNewCreditCards()
Because the list of credit cards defaults to one, return true only if there is at least one CreditCard that is not empty.
protected boolean isNewGiftCertificates()
Ensure that if there are GiftCertificates that they are not empty. i.e. they have information inputted into their necessary fields, as specified by the giftCertificateProperties property.
protected boolean runProcessValidateShippingGroups(Order pOrder, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws RunProcessException
handleMoveToPurchaseInfo
method is invoked
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |