|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.droplet.EmptyFormHandler atg.droplet.GenericFormHandler atg.commerce.order.purchase.PurchaseProcessFormHandler atg.commerce.order.purchase.CartModifierFormHandler
public class CartModifierFormHandler
This formhandler is used to modify a ShoppingCart by adding items to it, deleting items from it, modifying the quantities of items in it, and preparing it for the checkout process.
GenericFormHandler
,
PurchaseProcessFormHandler
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
static java.lang.String |
MSG_AMBIGUOUS_INPUT_FOR_ADD
|
static java.lang.String |
MSG_ERROR_ADDING_TO_ORDER
|
static java.lang.String |
MSG_ERROR_MOVE_TO_PURCHASE_INFO
|
static java.lang.String |
MSG_ERROR_REMOVING_ITEM
|
static java.lang.String |
MSG_ERROR_UPDATE_ORDER
|
static java.lang.String |
MSG_INVALID_QUANTITY
|
static java.lang.String |
MSG_NO_ITEMS_TO_ADD
|
static java.lang.String |
MSG_NO_ORDER_TO_MODIFY
|
static java.lang.String |
MSG_QUANTITY_LESSTHAN_OR_EQUALTO_ZERO
|
static java.lang.String |
MSG_QUANTITY_LESSTHAN_ZERO
|
static java.lang.String |
MSG_UNSUPPORTED_RELATIONSHIP
|
Fields inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler |
---|
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUE |
Fields inherited from class atg.droplet.GenericFormHandler |
---|
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
CartModifierFormHandler()
|
Method Summary | |
---|---|
protected void |
addConfigurableItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Adds one or more commerce items to the order (the shopping cart), using configurableItemTypeName as the default commerce item type. |
protected void |
addConfigurableItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
boolean pIsGift)
Deprecated. replaced by addConfigurableItemToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse) |
protected void |
addItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Adds one or more commerce items to the order (the shopping cart), using commerceItemType as the default commerce item type. |
protected void |
addItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
boolean pIsGift)
Deprecated. replaced by addItemToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse) |
protected void |
addItemToShippingGroup(CommerceItem pItem,
int pItemIndex)
Associate a commerce item with the shipping group specified by the shippingGroup property. |
protected void |
addMultipleItemsToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Adds commerce items to the order (the shopping cart). |
protected void |
addMultipleItemsToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
boolean pIsGift)
Deprecated. replaced by addConfigurableItemToOrder(DynamoHttpServletRequest, DynamoHttpServletResponse) |
protected void |
applyValueDictionary(java.lang.Object pBean,
java.util.Dictionary pValues,
java.lang.String pPropertyPathPrefix)
Copy properties from the value dictionary or one of its descendents. |
protected CommerceItem |
createCommerceItem(int pItemIndex,
java.lang.String pCatalogKey)
Create a commerce item and add it to the order. |
protected void |
createConfigurableSubitems(CommerceItem pItem,
int pItemIndex)
Create subitems for a base configurable commerce item. |
protected void |
deleteItems(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Delete all items from the order whose id appears in the RemovalCommerceIds property. |
protected void |
deleteItemsByRelationshipId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is responsible for deleting items from the order by shipping group commerce item relationship id. |
protected void |
doAddItemsToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Add one or more items to the order (the shopping cart). |
int |
getAddItemCount()
Returns the number of elements to allocate in the items array |
java.lang.String |
getAddItemInfoClass()
Returns the name of the class to be used for elements in the items array |
java.lang.String |
getAddItemToOrderChainId()
Returns property AddItemToOrderChainId |
java.lang.String |
getAddItemToOrderErrorURL()
Returns property AddItemToOrderErrorURL |
java.lang.String |
getAddItemToOrderPricingOp()
Returns the pricing operation that should be performed when an item is added to the order |
java.lang.String |
getAddItemToOrderSuccessURL()
Returns property AddItemToOrderSuccessURL |
java.lang.String |
getAddMultipleItemsToOrderErrorURL()
Returns property AddMultipleItemsToOrderErrorURL |
java.lang.String |
getAddMultipleItemsToOrderSuccessURL()
Returns property AddMultipleItemsToOrderSuccessURL |
protected java.lang.String |
getCatalogKey(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Get a string that will be used to identify the catalog to use when obtaining a catalogRef and productRef for the creation of a commerce item. |
java.lang.String[] |
getCatalogRefIds()
Returns property CatalogRefIds |
java.lang.String[] |
getCommerceIds()
Return the list of CommerceIds to be operated on. |
java.lang.String |
getCommerceItemType()
Returns the default item type for added commerce items |
java.lang.String |
getConfigurableItemTypeName()
Returns the configurableItemTypeName |
CreditCard |
getCreditCard()
Returns credit card bean to use for modifying of billing groups |
protected java.util.List |
getDeletedSkus()
|
java.lang.String |
getDeleteItemsFromOrderPricingOp()
Returns the pricing operation that should be performed when an item is deleted from the order |
GiftCertificate |
getGiftCertificate()
Returns gift certificate bean to use for modifying of billing grps |
java.lang.String |
getGiftlistId()
The giftlist that an item was added from |
java.lang.String |
getGiftlistItemId()
The giftlist item being added |
HardgoodShippingGroup |
getHardgoodShippingGroup()
Returns hardgood shipping group bean |
boolean |
getInvalidQuantityCancelsAdd()
Determine if the FormHandler should treat invalid quantities as errors when adding multiple items to an order in a single form submission. |
atg.commerce.order.purchase.AddCommerceItemInfo[] |
getItems()
Returns items array of property holders for add operations |
java.lang.String |
getModifyOrderPricingOp()
Returns the pricing operation that should be performed when the order is updated |
java.lang.String |
getMoveToPurchaseInfoByRelIdErrorURL()
Return the moveToPurchaseInfoByRelIdErrorURL property. |
java.lang.String |
getMoveToPurchaseInfoByRelIdSuccessURL()
Return the moveToPurchaseInfoByRelIdSuccessURL property. |
java.lang.String |
getMoveToPurchaseInfoChainId()
Returns property MoveToPurchaseInfoChainId |
java.lang.String |
getMoveToPurchaseInfoErrorURL()
Returns property MoveToPurchaseInfoErrorURL |
java.lang.String |
getMoveToPurchaseInfoSuccessURL()
Returns property MoveToPurchaseInfoSuccessURL |
PaymentGroup |
getPaymentGroup()
Returns property PaymentGroup |
java.lang.String |
getProductId()
Returns property ProductId |
java.lang.String[] |
getProductIds()
Returns productIds |
long |
getQuantity()
Returns property Quantity |
long |
getQuantity(java.lang.String pCatalogRefId,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Retrieve the quanity that should be used for the given catalog reference id or commerce item id. |
java.lang.String[] |
getRemovalCatalogRefIds()
Returns property RemovalCatalogRefIds |
java.lang.String[] |
getRemovalCommerceIds()
Returns property RemovalCommerceIds |
java.lang.String[] |
getRemovalRelationshipIds()
Return the removalRelationshipIds property. |
java.lang.String |
getRemoveAndAddItemToOrderErrorURL()
Returns property RemoveAndAddItemToOrderErrorURL |
java.lang.String |
getRemoveAndAddItemToOrderSuccessURL()
Returns property RemoveAndAddItemToOrderSuccessURL |
java.lang.String |
getRemoveItemFromOrderByRelationshipIdErrorURL()
Return the RemoveItemFromOrderByRelationshipIdErrorURL property. |
java.lang.String |
getRemoveItemFromOrderByRelationshipIdSuccessURL()
Return the RemoveItemFromOrderByRelationshipIdSuccessURL property. |
java.lang.String |
getRemoveItemFromOrderErrorURL()
Returns property RemoveItemFromOrderErrorURL |
java.lang.String |
getRemoveItemFromOrderSuccessURL()
Returns property RemoveItemFromOrderSuccessURL |
java.lang.String |
getRepriceOrderErrorURL()
Return the RepriceOrderErrorURL property. |
java.lang.String |
getRepriceOrderSuccessURL()
Return the RepriceOrderSuccessURL property. |
java.lang.String |
getSetOrderByRelationshipIdErrorURL()
Return the SetOrderByRelationshipIdErrorURL property. |
java.lang.String |
getSetOrderByRelationshipIdSuccessURL()
Return the setOrderByRelationshipIdSuccessURL property. |
java.lang.String |
getSetOrderChainId()
Returns property SetOrderChainId |
java.lang.String |
getSetOrderErrorURL()
Returns property SetOrderErrorURL |
java.lang.String |
getSetOrderSuccessURL()
Returns property SetOrderSuccessURL |
ShippingGroup |
getShippingGroup()
Returns property ShippingGroup. |
protected java.util.List |
getShippingGroupCommerceItemRelationships(Order pOrder)
Get a list of all the shippingGroupCommerceItemRelationships that are contained within a particular order. |
java.lang.String |
getSiteId()
Returns property SiteId |
java.util.Dictionary |
getValue()
Returns property Value |
boolean |
handleAddConfigurableItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is used to add configurable items to the order. |
boolean |
handleAddItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is used to add items to the order. |
boolean |
handleAddMultipleItemsToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is used to add items to the order. |
boolean |
handleMoveToPurchaseInfo(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called when the user wants to starts the CHECKOUT process for an order. |
boolean |
handleMoveToPurchaseInfoByCommerceId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called when the user wants to starts the CHECKOUT process for an order. |
boolean |
handleMoveToPurchaseInfoByRelId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is called when the user wants to starts the CHECKOUT process for an order. |
boolean |
handleRemoveAndAddItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is meant to be used on a page where a user wants to both remove an item from the order as well as add an item to an order. |
boolean |
handleRemoveItemFromOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This will make calls to the preRemoveItemFromOrder method and then will call the deleteItems method. |
boolean |
handleRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is similiar to the handleRemoveItemFromOrder method, except that it removes items from the order via ShippingGroupCommerceItemRelationship object Ids. |
boolean |
handleSetOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method handles all of the work necessary to save an Order. |
boolean |
handleSetOrderByCommerceId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is responsible for adjusting the quantities of commerce items that exist in a users shopping cart. |
boolean |
handleSetOrderByRelationshipId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is responsible for adjusting the quantities of commerce items that exist in a users shopping cart. |
boolean |
isCheckForChangedQuantity()
Determine if the FormHandler should check for changes in quantities of commerce items. |
protected boolean |
mergeItemInputForAdd(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
java.lang.String pCommerceItemType,
boolean pUseProductIds)
Construct or fill in default values in an items array containing
input values for the methods involved in adding items to orders. |
protected boolean |
mergeValueDictionaries(java.util.Dictionary pCommonValues,
java.util.Dictionary pItemValues,
int pItemIndex,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
java.lang.String pPropertyPathPrefix)
Merges the common value dictionary into one item-specific value dictionary. |
protected boolean |
modifyCommerceItemsProperties(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
java.util.Map pQuantityChangedItems,
java.util.Map pRemovedItems)
This method is invoked from the modifyOrder*() methods in order to allow subclasses an opportunity to implement additional processing after the quantity of items in the order has been changed. |
protected void |
modifyOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Modify the order (accessed from the order property) based on the changes in the request. |
protected void |
modifyOrderByCommerceId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Modify the order (accessed from the order property) based on the changes in
the request. |
protected void |
modifyOrderByRelationshipId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method causes the contents of a users order to be adjusted by quantity. |
protected void |
modifyOrderPostReprice(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
java.util.Map pQuantityChangedItems,
java.util.Map pRemovedItems)
|
void |
postAddItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after all work is done by the handleAddItemToOrder method. |
void |
postAddMultipleItemsToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after all work is done by the handleAddMultipleItemsToOrder method. |
void |
postMoveToPurchaseInfo(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after all processing is done by the moveToPurchaseInfo method. |
void |
postRemoveAndAddItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after all processing is done by the handleRemoveAndAddItemToOrder method. |
void |
postRemoveItemFromOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after all processing is done by the removeItemFromOrder method. |
void |
postRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is currently empty. |
void |
postSetOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This is called after all processing is done by the handleSetOrder method. |
void |
postSetOrderByCommerceId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This is called after all processing is done by the handleSetOrderByCommerceId method. |
void |
postSetOrderByRelationshipId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This is called after all processing is done by the handleSetOrderByRelationshipId method. |
void |
preAddItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any work is done by the handleAddItemToOrder method. |
void |
preAddMultipleItemsToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any work is done by the handleAddMultipleItemsToOrder method. |
void |
preMoveToPurchaseInfo(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any processing is done by the moveToPurchaseInfo method. |
void |
preRemoveAndAddItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any processing is done by the handleRemoveAndAddItemToOrder method. |
void |
preRemoveItemFromOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any processing is done by the removeItemFromOrder method. |
void |
preRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is currently empty. |
void |
preSetOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This is called before any processing is done by the handleSetOrder method. |
void |
preSetOrderByCommerceId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This is called before any processing is done by the handleSetOrderByCommerceId method. |
void |
preSetOrderByRelationshipId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This is called before any processing is done by the handleSetOrderByRelationshipId method. |
protected void |
processGiftAddition(CommerceItem pItem,
int pItemIndex)
Perform giftlist related processing for an item being ordered from a giftlist. |
protected void |
runProcessAddItemToOrder(Order pOrder,
CommerceItem pCommerceItem,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Run the pipeline which should be executed when the handleAddItemToOrder method is invoked
This method will add pCommerceItem to pExtraParameters unless the key
PipelineConstants.COMMERCEITEM is already in the map |
protected void |
runProcessAddItemToOrder(Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Deprecated. Use runProcessAddItemToOrder(Order, CommerceItem, PricingModelHolder, Locale, RepositoryItem, Map) instead |
protected void |
runProcessMoveToPurchaseInfo(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 |
protected void |
runProcessSendScenarioEvent(Order pOrder,
CommerceItem pItem,
long pQuantity,
java.lang.String pType)
The runProcessSendScenarioEvent method sends a scenario event. |
protected void |
runProcessSendScenarioEvent(Order pOrder,
CommerceItem pItem,
long pQuantity,
java.lang.String pType,
java.lang.String pSiteId)
The runProcessSendScenarioEvent method sends a scenario event. |
protected void |
runProcessSendScenarioEvent(Order pOrder,
CommerceItem pItem,
java.lang.String pType,
java.util.Map pParams)
The runProcessSendScenarioEvent method sends a
scenario event . |
protected void |
runProcessSendScenarioEvent(Order pOrder,
CommerceItem pItem,
java.lang.String pType,
java.lang.String pSiteId,
java.util.Map pParams)
The runProcessSendScenarioEvent method sends a
scenario event . |
protected void |
runProcessSetOrder(Order pOrder,
PricingModelHolder pPricingModels,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Run the pipeline which should be executed when the handleSetOrder method is invoked |
void |
setAddItemCount(int pAddItemCount)
Sets the number of elements to allocate in the items array and allocates the array |
void |
setAddItemInfoClass(java.lang.String pAddItemInfoClass)
Sets the name of the class to be used for elements in the items array |
void |
setAddItemToOrderChainId(java.lang.String pAddItemToOrderChainId)
Sets property AddItemToOrderChainId |
void |
setAddItemToOrderErrorURL(java.lang.String pAddItemToOrderErrorURL)
Sets property AddItemToOrderErrorURL |
void |
setAddItemToOrderPricingOp(java.lang.String pAddItemToOrderPricingOp)
This property should be set to the type of pricing operation that should be executed when an item is added to the order. |
void |
setAddItemToOrderSuccessURL(java.lang.String pAddItemToOrderSuccessURL)
Sets property AddItemToOrderSuccessURL |
void |
setAddMultipleItemsToOrderErrorURL(java.lang.String pAddMultipleItemsToOrderErrorURL)
Sets property AddMultipleItemsToOrderErrorURL |
void |
setAddMultipleItemsToOrderSuccessURL(java.lang.String pAddMultipleItemsToOrderSuccessURL)
Sets property AddMultipleItemsToOrderSuccessURL |
void |
setCatalogRefIds(java.lang.String[] pCatalogRefIds)
Sets property CatalogRefIds |
void |
setCheckForChangedQuantity(boolean pCheckForChangedQuantity)
Set the checkForChangedQuantity property. |
void |
setCommerceIds(java.lang.String[] pCommerceIds)
Sets the CommerceIds property which is a list of the CommerceItems to be operated on. |
protected void |
setCommerceItemProperties(CommerceItem pItem,
int pItemIndex)
Fill in "extra" commerce item properties. |
void |
setCommerceItemType(java.lang.String pCommerceItemType)
Sets the default item type for added commerce items |
void |
setConfigurableItemTypeName(java.lang.String pConfigurableItemTypeName)
Sets the configurableItemTypeName |
void |
setCreditCard(CreditCard pCreditCard)
Sets credit card bean to use for modifying of billing groups |
protected void |
setDeletedSkus(java.util.List pDeletedSkus)
Deleted skus is a list that maintains which items were removed by the deleteItems call and is consulted in the addItemToOrder call to determine whether a quantity of 0 is being added or whether it is simply an artifact of a design that calls handleAddItemToOrder in the handleRemoveAndAddItem. |
void |
setDeleteItemsFromOrderPricingOp(java.lang.String pDeleteItemsFromOrderPricingOp)
This property should be set to the type of pricing operation that should be executed when an item is deleted from the order. |
void |
setGiftCertificate(GiftCertificate pGiftCertificate)
Sets gift certificate bean to use for modifying of billing grps |
void |
setGiftlistId(java.lang.String pGiftlistId)
Specifies the id of the Giftlist. |
void |
setGiftlistItemId(java.lang.String pGiftlistItemId)
Specifies the id of the Giftlist Item |
void |
setHardgoodShippingGroup(HardgoodShippingGroup pHardgoodShippingGroup)
Sets hardgood shipping group bean |
void |
setInvalidQuantityCancelsAdd(boolean pInvalidQuantityCancelsAdd)
Set the invalidQuantityCancelsAdd property. |
void |
setModifyOrderPricingOp(java.lang.String pModifyOrderPricingOp)
This property should be set to the type of pricing operation that should be executed when the order is updated without adding or removing an item (e.g. |
void |
setMoveToPurchaseInfoByRelIdErrorURL(java.lang.String pMoveToPurchaseInfoByRelIdErrorURL)
Set the moveToPurchaseInfoByRelIdErrorURL property. |
void |
setMoveToPurchaseInfoByRelIdSuccessURL(java.lang.String pMoveToPurchaseInfoByRelIdSuccessURL)
Set the moveToPurchaseInfoByRelIdSuccessURL property. |
void |
setMoveToPurchaseInfoChainId(java.lang.String pMoveToPurchaseInfoChainId)
Sets property MoveToPurchaseInfoChainId |
void |
setMoveToPurchaseInfoErrorURL(java.lang.String pMoveToPurchaseInfoErrorURL)
Sets property MoveToPurchaseInfoErrorURL |
void |
setMoveToPurchaseInfoSuccessURL(java.lang.String pMoveToPurchaseInfoSuccessURL)
Sets property MoveToPurchaseInfoSuccessURL |
void |
setPaymentGroup(PaymentGroup pPaymentGroup)
Sets payment group bean to use for modifying payment groups |
void |
setProductId(java.lang.String pProductId)
Sets property ProductId |
void |
setProductIds(java.lang.String[] pProductIds)
Sets productIds |
void |
setQuantity(long pQuantity)
Sets property Quantity |
void |
setRemovalCatalogRefIds(java.lang.String[] pRemovalCatalogRefIds)
Sets property RemovalCatalogRefIds |
void |
setRemovalCommerceIds(java.lang.String[] pRemovalCommerceIds)
Sets property RemovalCommerceIds |
void |
setRemovalRelationshipIds(java.lang.String[] pRemovalRelationshipIds)
Set the removalRelationshipIds property. |
void |
setRemoveAndAddItemToOrderErrorURL(java.lang.String pRemoveAndAddItemToOrderErrorURL)
Sets property RemoveAndAddItemToOrderErrorURL |
void |
setRemoveAndAddItemToOrderSuccessURL(java.lang.String pRemoveAndAddItemToOrderSuccessURL)
Sets property RemoveAndAddItemToOrderSuccessURL |
void |
setRemoveItemFromOrderByRelationshipIdErrorURL(java.lang.String pRemoveItemFromOrderByRelationshipIdErrorURL)
Set the RemoveItemFromOrderByRelationshipIdErrorURL property. |
void |
setRemoveItemFromOrderByRelationshipIdSuccessURL(java.lang.String pRemoveItemFromOrderByRelationshipIdSuccessURL)
Set the RemoveItemFromOrderByRelationshipIdSuccessURL property. |
void |
setRemoveItemFromOrderErrorURL(java.lang.String pRemoveItemFromOrderErrorURL)
Sets property RemoveItemFromOrderErrorURL |
void |
setRemoveItemFromOrderSuccessURL(java.lang.String pRemoveItemFromOrderSuccessURL)
Sets property RemoveItemFromOrderSuccessURL |
void |
setRepriceOrderErrorURL(java.lang.String pRepriceOrderErrorURL)
Set the RepriceOrderErrorURL property. |
void |
setRepriceOrderSuccessURL(java.lang.String pRepriceOrderSuccessURL)
Set the RepriceOrderSuccessURL property. |
void |
setSetOrderByRelationshipIdErrorURL(java.lang.String pSetOrderByRelationshipIdErrorURL)
Set the SetOrderByRelationshipIdErrorURL property. |
void |
setSetOrderByRelationshipIdSuccessURL(java.lang.String pSetOrderByRelationshipIdSuccessURL)
Set the setOrderByRelationshipIdSuccessURL property. |
void |
setSetOrderChainId(java.lang.String pSetOrderChainId)
Sets property SetOrderChainId |
void |
setSetOrderErrorURL(java.lang.String pSetOrderErrorURL)
Sets property SetOrderErrorURL |
void |
setSetOrderSuccessURL(java.lang.String pSetOrderSuccessURL)
Sets property SetOrderSuccessURL |
void |
setShippingGroup(ShippingGroup pShippingGroup)
Sets shipping group bean to use for modifying the shipping groups |
void |
setSiteId(java.lang.String pSiteId)
Sets property SiteId |
protected void |
updateOrder(Order pOrder,
java.lang.String pMsgId,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to update an order and process any exception that happens during the update. |
protected boolean |
validateShippingGroupForAdd(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Validate shipping information for add operations. |
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 final java.lang.String CLASS_VERSION
public static final java.lang.String MSG_INVALID_QUANTITY
public static final java.lang.String MSG_ERROR_UPDATE_ORDER
public static final java.lang.String MSG_ERROR_MOVE_TO_PURCHASE_INFO
public static final java.lang.String MSG_ERROR_REMOVING_ITEM
public static final java.lang.String MSG_UNSUPPORTED_RELATIONSHIP
public static final java.lang.String MSG_NO_ITEMS_TO_ADD
public static final java.lang.String MSG_QUANTITY_LESSTHAN_OR_EQUALTO_ZERO
public static final java.lang.String MSG_QUANTITY_LESSTHAN_ZERO
public static final java.lang.String MSG_NO_ORDER_TO_MODIFY
public static final java.lang.String MSG_ERROR_ADDING_TO_ORDER
public static final java.lang.String MSG_AMBIGUOUS_INPUT_FOR_ADD
Constructor Detail |
---|
public CartModifierFormHandler()
Method Detail |
---|
protected void setDeletedSkus(java.util.List pDeletedSkus)
pDeletedSkus
- - the list of skus that were removedprotected java.util.List getDeletedSkus()
public void setCommerceItemType(java.lang.String pCommerceItemType)
public java.lang.String getCommerceItemType()
public java.lang.String getConfigurableItemTypeName()
public void setConfigurableItemTypeName(java.lang.String pConfigurableItemTypeName)
public void setCatalogRefIds(java.lang.String[] pCatalogRefIds)
pCatalogRefIds
- a String[]
valuepublic java.lang.String[] getCatalogRefIds()
String[]
valuepublic void setCommerceIds(java.lang.String[] pCommerceIds)
pCommerceIds
- a String[]
value of the commerce items to be operated on.public java.lang.String[] getCommerceIds()
String[]
value of the CommerceItem ids to be operated on.public void setProductIds(java.lang.String[] pProductIds)
pProductIds
- a String[]
valuepublic java.lang.String[] getProductIds()
String[]
valuepublic void setProductId(java.lang.String pProductId)
pProductId
- a String
valuepublic java.lang.String getProductId()
String
valuepublic void setSiteId(java.lang.String pSiteId)
pSiteId
- a String
valuepublic java.lang.String getSiteId()
String
valuepublic java.util.Dictionary getValue()
Dictionary
containing item level
properties for add operationspublic atg.commerce.order.purchase.AddCommerceItemInfo[] getItems()
public void setAddItemInfoClass(java.lang.String pAddItemInfoClass)
public java.lang.String getAddItemInfoClass()
public void setAddItemCount(int pAddItemCount)
pAddItemCount
- an int
valuepublic int getAddItemCount()
int
valuepublic void setQuantity(long pQuantity)
pQuantity
- a long
valuepublic long getQuantity()
long
valuepublic boolean getInvalidQuantityCancelsAdd()
public void setInvalidQuantityCancelsAdd(boolean pInvalidQuantityCancelsAdd)
pInvalidQuantityCancelsAdd
- false if formhandler should add some
items even when others have invalid quantities.public void setPaymentGroup(PaymentGroup pPaymentGroup)
pPaymentGroup
- a PaymentGroup
valuepublic PaymentGroup getPaymentGroup()
PaymentGroup
valuepublic void setCreditCard(CreditCard pCreditCard)
pCreditCard
- a CreditCard
valuepublic CreditCard getCreditCard()
CreditCard
valuepublic void setGiftCertificate(GiftCertificate pGiftCertificate)
pGiftCertificate
- a GiftCertificate
valuepublic GiftCertificate getGiftCertificate()
GiftCertificate
valuepublic void setHardgoodShippingGroup(HardgoodShippingGroup pHardgoodShippingGroup)
pHardgoodShippingGroup
- a HardgoodShippingGroup
valuepublic HardgoodShippingGroup getHardgoodShippingGroup()
HardgoodShippingGroup
valuepublic void setShippingGroup(ShippingGroup pShippingGroup)
pShippingGroup
- a ShippingGroup
valuepublic ShippingGroup getShippingGroup()
ShippingGroup
valuepublic void setGiftlistId(java.lang.String pGiftlistId)
pGiftlistId
- a String
valuepublic java.lang.String getGiftlistId()
String
valuepublic void setGiftlistItemId(java.lang.String pGiftlistItemId)
pGiftlistItemId
- a String
valuepublic java.lang.String getGiftlistItemId()
String
valuepublic void setAddItemToOrderPricingOp(java.lang.String pAddItemToOrderPricingOp)
atg.commerce.pricing.PricingConstants
interface. They include:
ORDER_TOTAL
ORDER_SUBTOTAL
ORDER_SUBTOTAL_SHIPPING
ORDER_SUBTOTAL_TAX
ITEMS
SHIPPING
ORDER
TAX
NO_REPRICE
pAddItemToOrderPricingOp
- a String
valuepublic java.lang.String getAddItemToOrderPricingOp()
String
valuepublic void setAddItemToOrderSuccessURL(java.lang.String pAddItemToOrderSuccessURL)
pAddItemToOrderSuccessURL
- a String
valuepublic java.lang.String getAddItemToOrderSuccessURL()
String
valuepublic void setAddItemToOrderErrorURL(java.lang.String pAddItemToOrderErrorURL)
pAddItemToOrderErrorURL
- a String
valuepublic java.lang.String getAddItemToOrderErrorURL()
String
valuepublic void setAddMultipleItemsToOrderSuccessURL(java.lang.String pAddMultipleItemsToOrderSuccessURL)
pAddMultipleItemsToOrderSuccessURL
- a String
valuepublic java.lang.String getAddMultipleItemsToOrderSuccessURL()
String
valuepublic void setAddMultipleItemsToOrderErrorURL(java.lang.String pAddMultipleItemsToOrderErrorURL)
pAddMultipleItemsToOrderErrorURL
- a String
valuepublic java.lang.String getAddMultipleItemsToOrderErrorURL()
String
valuepublic void setAddItemToOrderChainId(java.lang.String pAddItemToOrderChainId)
pAddItemToOrderChainId
- a String
valuepublic java.lang.String getAddItemToOrderChainId()
String
valuepublic void setRemoveItemFromOrderSuccessURL(java.lang.String pRemoveItemFromOrderSuccessURL)
pRemoveItemFromOrderSuccessURL
- a String
valuepublic java.lang.String getRemoveItemFromOrderSuccessURL()
String
valuepublic void setRemoveItemFromOrderErrorURL(java.lang.String pRemoveItemFromOrderErrorURL)
pRemoveItemFromOrderErrorURL
- a String
valuepublic java.lang.String getRemoveItemFromOrderErrorURL()
String
valuepublic void setRemoveItemFromOrderByRelationshipIdSuccessURL(java.lang.String pRemoveItemFromOrderByRelationshipIdSuccessURL)
pRemoveItemFromOrderByRelationshipIdSuccessURL
- a String
valuepublic java.lang.String getRemoveItemFromOrderByRelationshipIdSuccessURL()
String
valuepublic void setRemoveItemFromOrderByRelationshipIdErrorURL(java.lang.String pRemoveItemFromOrderByRelationshipIdErrorURL)
pRemoveItemFromOrderByRelationshipIdErrorURL
- a String
valuepublic java.lang.String getRemoveItemFromOrderByRelationshipIdErrorURL()
String
valuepublic void setRemoveAndAddItemToOrderErrorURL(java.lang.String pRemoveAndAddItemToOrderErrorURL)
pRemoveAndAddItemToOrderErrorURL
- a String
valuepublic java.lang.String getRemoveAndAddItemToOrderErrorURL()
String
valuepublic void setRemoveAndAddItemToOrderSuccessURL(java.lang.String pRemoveAndAddItemToOrderSuccessURL)
pRemoveAndAddItemToOrderSuccessURL
- a String
valuepublic java.lang.String getRemoveAndAddItemToOrderSuccessURL()
String
valuepublic void setDeleteItemsFromOrderPricingOp(java.lang.String pDeleteItemsFromOrderPricingOp)
atg.commerce.pricing.PricingConstants
interface. They include:
ORDER_TOTAL
ORDER_SUBTOTAL
ORDER_SUBTOTAL_SHIPPING
ORDER_SUBTOTAL_TAX
ITEMS
SHIPPING
ORDER
TAX
NO_REPRICE
pDeleteItemsFromOrderPricingOp
- a String
valuepublic java.lang.String getDeleteItemsFromOrderPricingOp()
String
valuepublic void setModifyOrderPricingOp(java.lang.String pModifyOrderPricingOp)
atg.commerce.pricing.PricingConstants
interface. They include:
ORDER_TOTAL
ORDER_SUBTOTAL
ORDER_SUBTOTAL_SHIPPING
ORDER_SUBTOTAL_TAX
ITEMS
SHIPPING
ORDER
TAX
NO_REPRICE
pModifyOrderPricingOp
- a String
valuepublic java.lang.String getModifyOrderPricingOp()
String
valuepublic void setMoveToPurchaseInfoChainId(java.lang.String pMoveToPurchaseInfoChainId)
pMoveToPurchaseInfoChainId
- a String
valuepublic java.lang.String getMoveToPurchaseInfoChainId()
String
valuepublic void setSetOrderChainId(java.lang.String pSetOrderChainId)
pSetOrderChainId
- a String
valuepublic java.lang.String getSetOrderChainId()
String
valuepublic void setRepriceOrderErrorURL(java.lang.String pRepriceOrderErrorURL)
pRepriceOrderErrorURL
- a String
valuepublic java.lang.String getRepriceOrderErrorURL()
String
valuepublic void setRepriceOrderSuccessURL(java.lang.String pRepriceOrderSuccessURL)
pRepriceOrderSuccessURL
- a String
valuepublic java.lang.String getRepriceOrderSuccessURL()
String
valuepublic void setSetOrderByRelationshipIdSuccessURL(java.lang.String pSetOrderByRelationshipIdSuccessURL)
pSetOrderByRelationshipIdSuccessURL
- a String
valuepublic java.lang.String getSetOrderByRelationshipIdSuccessURL()
String
valuepublic void setSetOrderByRelationshipIdErrorURL(java.lang.String pSetOrderByRelationshipIdErrorURL)
pSetOrderByRelationshipIdErrorURL
- a String
valuepublic java.lang.String getSetOrderByRelationshipIdErrorURL()
String
valuepublic void setSetOrderSuccessURL(java.lang.String pSetOrderSuccessURL)
pSetOrderSuccessURL
- a String
valuepublic java.lang.String getSetOrderSuccessURL()
String
valuepublic void setSetOrderErrorURL(java.lang.String pSetOrderErrorURL)
pSetOrderErrorURL
- a String
valuepublic java.lang.String getSetOrderErrorURL()
String
valuepublic boolean isCheckForChangedQuantity()
public void setCheckForChangedQuantity(boolean pCheckForChangedQuantity)
pCheckForChangedQuantity
- true if formhandler should check for changed
quantities.public void setRemovalCatalogRefIds(java.lang.String[] pRemovalCatalogRefIds)
pRemovalCatalogRefIds
- a String[]
valuepublic java.lang.String[] getRemovalCatalogRefIds()
String[]
valuepublic void setRemovalRelationshipIds(java.lang.String[] pRemovalRelationshipIds)
pRemovalRelationshipIds
- a String[]
valuepublic java.lang.String[] getRemovalRelationshipIds()
String[]
valuepublic void setRemovalCommerceIds(java.lang.String[] pRemovalCommerceIds)
pRemovalCommerceIds
- a String[]
valuepublic java.lang.String[] getRemovalCommerceIds()
String[]
valuepublic void setMoveToPurchaseInfoByRelIdSuccessURL(java.lang.String pMoveToPurchaseInfoByRelIdSuccessURL)
pMoveToPurchaseInfoByRelIdSuccessURL
- a String
valuepublic java.lang.String getMoveToPurchaseInfoByRelIdSuccessURL()
String
valuepublic void setMoveToPurchaseInfoByRelIdErrorURL(java.lang.String pMoveToPurchaseInfoByRelIdErrorURL)
pMoveToPurchaseInfoByRelIdErrorURL
- a String
valuepublic java.lang.String getMoveToPurchaseInfoByRelIdErrorURL()
String
valuepublic void setMoveToPurchaseInfoSuccessURL(java.lang.String pMoveToPurchaseInfoSuccessURL)
pMoveToPurchaseInfoSuccessURL
- a String
valuepublic java.lang.String getMoveToPurchaseInfoSuccessURL()
String
valuepublic void setMoveToPurchaseInfoErrorURL(java.lang.String pMoveToPurchaseInfoErrorURL)
pMoveToPurchaseInfoErrorURL
- a String
valuepublic java.lang.String getMoveToPurchaseInfoErrorURL()
String
valuepublic boolean handleAddConfigurableItemToOrder(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 ioprotected void addConfigurableItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
configurableItemTypeName
as the default commerce item type.
The list of catalog items to be added comes from the catalogRefIds array
and productId or from the items array.
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 iomergeItemInputForAdd(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse, java.lang.String, boolean)
,
doAddItemsToOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)
protected void addConfigurableItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, boolean pIsGift) throws javax.servlet.ServletException, java.io.IOException
configurableItemTypeName
as the default commerce item type.
The list of catalog items to be added comes from the catalogRefIds array
and productId or from the items array.
pRequest
- the servlet's requestpResponse
- the servlet's responsepIsGift
- ignored, covered by the giftlistId
and
giftlistItemId
properties
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic long getQuantity(java.lang.String pCatalogRefId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, java.lang.NumberFormatException
pCatalogRefId
- a String
valuepRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
value
long
value
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurs
java.lang.NumberFormatException
- if an error occursprotected java.lang.String getCatalogKey(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- servlet request objectpResponse
- servlet response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occursCatalogTools
public void preSetOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void postSetOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleSetOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
boolean
value
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet ioprotected void modifyOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException, RunProcessException
order
property) based on the changes in the request.
This method iterates over each of the current CommerceItems in the order and finds the current
quantity submitted. In addition we check to make sure that the item should even be included
in the order any longer. If the quantity is greater than zero we adjust the quantity in the CommerceItem
and the ShippingGroupCommerceItemRelationship. Otherwise we remove the CommerceItem and the
relationships.
Items are identified by their catalogRefId (Sku).
pRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
value
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurs
CommerceException
- if an error occurs
RunProcessException
- if an error occurspublic void preSetOrderByRelationshipId(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
- if an error occurs
java.io.IOException
- if an error occurspublic void postSetOrderByRelationshipId(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
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleSetOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void preSetOrderByCommerceId(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
- if an error occurs
java.io.IOException
- if an error occurspublic void postSetOrderByCommerceId(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
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleSetOrderByCommerceId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void preMoveToPurchaseInfo(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void postMoveToPurchaseInfo(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleMoveToPurchaseInfo(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
boolean
value
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic boolean handleMoveToPurchaseInfoByRelId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
boolean
value
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet ioprotected void modifyOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException, RunProcessException
If the quantity is now 0, or the item appears in the removalRelationshipIds array then the quantity will be put to 0. If the original quantity of the shipping group commerce item relationship is equal to the quantity of the commerce item then the commerce item and the relationship are removed from the order. If the quantity is less than the quantity of the commerce item then the relationship is removed and the quantity of the commerce item is adjusted appropriately.
This assumes that the type of relationship being used on the ShippingGroupCommerceItemRelationship is of type SHIPPINGQUANTITY. If it is not, an exception wil be thrown.
pRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
value
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurs
CommerceException
- if an error occurs
RunProcessException
- if an error occurspublic boolean handleMoveToPurchaseInfoByCommerceId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
boolean
value
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet ioprotected boolean modifyCommerceItemsProperties(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.util.Map pQuantityChangedItems, java.util.Map pRemovedItems) throws java.io.IOException, CommerceException, javax.servlet.ServletException, RunProcessException
pRequest
- the requestpResponse
- the responsepQuantityChangedItems
- a map of items who's quantities have
been changed. The map key is the commerce item, and the value is
the old quantity.pRemovedItems
- a map of items that have been removed from
the order because their quantity was set to something less than
or equal to zero. 1. The key is the commerce item and the value
is the old quantity. This parameter may be null.
java.io.IOException
CommerceException
javax.servlet.ServletException
RunProcessException
protected void modifyOrderPostReprice(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.util.Map pQuantityChangedItems, java.util.Map pRemovedItems) throws java.io.IOException, CommerceException, javax.servlet.ServletException, RunProcessException
pRequest
- the requestpResponse
- the responsepQuantityChangedItems
- a map of items who's quantities have
been changed. The map key is the commerce item, and the value is
the old quantity.pRemovedItems
- a map of items that have been removed from
the order because their quantity was set to something less than
zero. 1. The key is the commerce item and the value is the old
quantity. This parameter may be null.
java.io.IOException
CommerceException
javax.servlet.ServletException
RunProcessException
protected void modifyOrderByCommerceId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException, RunProcessException
order
property) based on the changes in
the request. This method iterates over each of the current CommerceItems in the order and
finds the current quantity submitted. Note, this replaces the use of modifyOrder method
because that method made use of the catalogRefId to identify the commerce item to be
modified instead of using the commerce item id itself. In addition we check to make sure
that the item should even be included in the order any longer. If the quantity is greater
than zero we adjust the quantity in the CommerceItem and the
ShippingGroupCommerceItemRelationship. Otherwise we remove the CommerceItem and the
relationships.
pRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
value
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurs
CommerceException
- if an error occurs
RunProcessException
- if an error occursprotected java.util.List getShippingGroupCommerceItemRelationships(Order pOrder) throws CommerceException
pOrder
- the order whose relationships will be obtained
CommerceException
- if an error occursprotected void deleteItemsByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurs
CommerceException
- if an error occursprotected void deleteItems(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- servlet request objectpResponse
- servlet response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void preAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void postAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
boolean
value
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet ioprotected void addItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
commerceItemType
as the default commerce item type.
The list of catalog items to be added comes from the catalogRefIds array
and productId or from the items array.
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 iomergeItemInputForAdd(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse, java.lang.String, boolean)
,
doAddItemsToOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)
protected void addItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, boolean pIsGift) throws javax.servlet.ServletException, java.io.IOException
commerceItemType
as the default commerce item type.
The list of catalog items to be added comes from the catalogRefIds array
and productId or from the items array.
pRequest
- the servlet's requestpResponse
- the servlet's responsepIsGift
- ignored, covered by the giftlistId
and
giftlistItemId
properties
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet ioprotected boolean mergeItemInputForAdd(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pCommerceItemType, boolean pUseProductIds) throws javax.servlet.ServletException, java.io.IOException
items
array containing
input values for the methods involved in adding items to orders.
Most input validation occurs here, for example:
validateShippingGroup
is called.invalidQuantityCancelsAdd
is true
.
pRequest
- the servlet's requestpResponse
- the servlet's responsepCommerceItemType
- the type to use for creating new commerce itemspUseProductIds
- true
if input comes from
productIds
rather than productId
true
if inputs are valid, false
if not
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iovalidateShippingGroupForAdd(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)
protected boolean mergeValueDictionaries(java.util.Dictionary pCommonValues, java.util.Dictionary pItemValues, int pItemIndex, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pPropertyPathPrefix) throws javax.servlet.ServletException, java.io.IOException
pCommonValues
- the common dictionarypItemValues
- the item-specific dictionarypItemIndex
- the index of the items
array element that
owns the item-specific dictionarypRequest
- the servlet's requestpResponse
- the servlet's responsepPropertyPathPrefix
- the name prefix for entries in child dictionaries
(null
for the top level dictionaries)
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet ioprotected boolean validateShippingGroupForAdd(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
true
if inputs are valid, false
if not
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet ioprotected void doAddItemsToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
items
array. Items with a quantity
of 0 or less are not added.
Each commerce item is created by calling a series of small methods:
Input property validation is the caller's responsibility.
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 ioprotected CommerceItem createCommerceItem(int pItemIndex, java.lang.String pCatalogKey) throws CommerceException
pItemIndex
- the index of the items
array element that
supplies input for the new itempCatalogKey
- the catalog key reference (locale) for the new item
CommerceException
- if there was an error while executing the codeprotected void setCommerceItemProperties(CommerceItem pItem, int pItemIndex) throws CommerceException
pItem
- the CommerceItempItemIndex
- the index of the items
array element that
supplies input for the commerce item
CommerceException
- if there was an error while executing the codeprotected void applyValueDictionary(java.lang.Object pBean, java.util.Dictionary pValues, java.lang.String pPropertyPathPrefix) throws CommerceException
pBean
- the object to which to copy dictionary valuespValues
- the dictionary from which to copy valuespPropertyPathPrefix
- the name prefix for dictionary entries
(null
for the top level dictionary)
CommerceException
- if there was an error while executing the codeprotected void addItemToShippingGroup(CommerceItem pItem, int pItemIndex) throws CommerceException
shippingGroup
property.
pItem
- the CommerceItempItemIndex
- the index of the items
array element that
supplies input for the commerce item
CommerceException
- if there was an error while executing the codeprotected void createConfigurableSubitems(CommerceItem pItem, int pItemIndex) throws CommerceException
pItem
- the base CommerceItempItemIndex
- the index of the items
array element that
supplies input for the base commerce item
CommerceException
- if there was an error while executing the codeprotected void processGiftAddition(CommerceItem pItem, int pItemIndex) throws CommerceException
pItem
- the CommerceItempItemIndex
- the index of the items
array element that
supplies input for the commerce item
CommerceException
- if there was an error while executing the codepublic void preAddMultipleItemsToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void postAddMultipleItemsToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleAddMultipleItemsToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
boolean
value
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet ioprotected void addMultipleItemsToOrder(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 iomergeItemInputForAdd(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse, java.lang.String, boolean)
,
doAddItemsToOrder(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)
protected void addMultipleItemsToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, boolean pIsGift) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's responsepIsGift
- ignored, covered by the giftlistId
and
giftlistItemId
properties
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic void preRemoveItemFromOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void postRemoveItemFromOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleRemoveItemFromOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
pRequest
- the request objectpResponse
- the resonse object
java.io.IOException
- if an error occurs
javax.servlet.ServletException
- if an error occurspublic void preRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void postRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- a value of type 'DynamoHttpServletResponse'pResponse
- a value of type 'DynamoHttpServletResponse'
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleRemoveItemFromOrderByRelationshipId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
This method will just make a call to the deleteItemsByRelationshipId.
pRequest
- the request objectpResponse
- the response object
java.io.IOException
- if an error occurs
javax.servlet.ServletException
- if an error occurspublic void preRemoveAndAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic void postRemoveAndAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleRemoveAndAddItemToOrder(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
This method checks to see if any objects have been added to the RemovalCommerceIds property. If they have, then remove them. After removing them call the handleAddItemToOrder method to handle the adding of an item to the order.
pRequest
- servlet's requestpResponse
- servlet's response
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occursprotected void updateOrder(Order pOrder, java.lang.String pMsgId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pOrder
- the order to updatepMsgId
- the message ID to use in case of an exceptionpRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
value
javax.servlet.ServletException
java.io.IOException
protected void runProcessAddItemToOrder(Order pOrder, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws RunProcessException
handleAddItemToOrder
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
- if an error occursprotected void runProcessAddItemToOrder(Order pOrder, CommerceItem pCommerceItem, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws RunProcessException
handleAddItemToOrder
method is invoked
This method will add pCommerceItem to pExtraParameters unless the key
PipelineConstants.COMMERCEITEM is already in the map
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
protected void runProcessSendScenarioEvent(Order pOrder, CommerceItem pItem, long pQuantity, java.lang.String pType) throws RunProcessException
runProcessSendScenarioEvent
method sends a scenario event.
pOrder
- an Order
valuepItem
- a CommerceItem
valuepQuantity
- the quantity affectedpType
- a String
value
RunProcessException
- if an error occursprotected void runProcessSendScenarioEvent(Order pOrder, CommerceItem pItem, long pQuantity, java.lang.String pType, java.lang.String pSiteId) throws RunProcessException
runProcessSendScenarioEvent
method sends a scenario event.
pOrder
- an Order
valuepItem
- a CommerceItem
valuepQuantity
- the quantity affectedpType
- a String
valuepSiteId
- The site ID associated with a scenario event
RunProcessException
- if an error occursprotected void runProcessSendScenarioEvent(Order pOrder, CommerceItem pItem, java.lang.String pType, java.util.Map pParams) throws RunProcessException
runProcessSendScenarioEvent
method sends a
scenario event .
pOrder
- an Order
valuepItem
- a CommerceItem
valuepType
- a String
valuepParams
- a map with event specific parameters
RunProcessException
- if an error occursprotected void runProcessSendScenarioEvent(Order pOrder, CommerceItem pItem, java.lang.String pType, java.lang.String pSiteId, java.util.Map pParams) throws RunProcessException
runProcessSendScenarioEvent
method sends a
scenario event .
pOrder
- an Order
valuepItem
- a CommerceItem
valuepType
- a String
valuepSiteId
- The site ID associated with a scenario eventpParams
- a map with event specific parameters
RunProcessException
- if an error occursprotected void runProcessSetOrder(Order pOrder, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws RunProcessException
handleSetOrder
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
- if an error occursprotected void runProcessMoveToPurchaseInfo(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
- if an error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |