atg.b2bcommerce.order
Class B2BShoppingCartFormHandler
java.lang.Object
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.droplet.EmptyFormHandler
atg.droplet.GenericFormHandler
atg.commerce.order.OrderModifierFormHandler
atg.commerce.order.ShoppingCartFormHandler
atg.commerce.order.FullShoppingCartFormHandler
atg.commerce.order.SoftGoodFormHandler
atg.b2bcommerce.order.B2BShoppingCartFormHandler
- All Implemented Interfaces:
- atg.commerce.util.PipelineErrorHandler, DropletFormHandler, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener
public class B2BShoppingCartFormHandler
- extends SoftGoodFormHandler
Extends generic ShoppingCartFormHanlder to add B2B-specific data and methods
Adds CostCenterManagement functionality
- See Also:
B2BShoppingCartFormHandler
Fields inherited from class atg.commerce.order.FullShoppingCartFormHandler |
BILLING_ADDR_PROP_NAME, CONTACT_INFO_ITEM_NAME, CREDIT_CARD_PROPERTIES, DEFAULT_CREDIT_CARD, ERROR_MISSING_BILLING_ADDRESS, ERROR_MISSING_CREDIT_CARD, GIFT_CERTIFICATE_PROPERTIES, MSG_ADDRESS_ALREADY_EXISTS, MSG_ERROR_ADDING_ADDRESS, MSG_ERROR_MOVING_ITEM_TO_NEW_ADDRESS, MSG_ERROR_UNABLE_TO_ADD_CC, MSG_NO_CREDIT_CARD_NUMBER, MSG_NO_NEW_ADDRESS_ENTERED, MSG_NO_NICKNAME, MSG_UNABLE_TO_COPY_CREDIT_CARD, NEW, NO_CREDIT_CARD, REDUNDANT_CREDIT_CARD, SECONDARY_ADDRESS_PROPERTY_NAME, UNEQUAL_GC_SIZE, UNSUPPORTED_PAYMENTGROUP |
Fields inherited from class atg.commerce.order.ShoppingCartFormHandler |
CC_PAYMENT_GROUP_TYPE_NAME, GC_PAYMENT_GROUP_TYPE_NAME, MSG_DUPLICATE_ORDER_DESCRIPTION, MSG_ERROR_ADDING_ITEM, MSG_ERROR_EDIT_ITEM, MSG_ERROR_MOVE_TO_CONFIRMATION, MSG_ERROR_MOVE_TO_ORDER_COMMIT, MSG_ERROR_MOVE_TO_PAYMENT, MSG_ERROR_MOVE_TO_PURCHASE_INFO, MSG_ERROR_REMOVING_ITEM, MSG_ERROR_REPRICE_ORDER, MSG_ERROR_UPDATE_ORDER, MSG_INVALID_QUANTITY, MSG_ORDER_ALREADY_SUBMITTED, MSG_UNABLE_TO_COPY_ADDRESS, MSG_UNSUPPORTED_RELATIONSHIP, NO_GIFTCERTIFICATE_FOUND |
Fields inherited from class atg.commerce.order.OrderModifierFormHandler |
ERROR_MISSING_LOCK_MANAGER, ERROR_MISSING_LOCK_PROFILE, ERROR_MISSING_TRANSACTION_MANAGER, MSG_CONCURRENT_UPDATE_ATTEMPT, MSG_ERROR_ADDING_TO_ORDER, MSG_ERROR_REMOVING_FROM_ORDER, MSG_ERROR_REMOVING_RROM_ORDER, MSG_NO_ITEM_FOUND, MSG_NO_ITEMS_TO_ADD, MSG_NO_ORDER_TO_MODIFY, MSG_NO_SKU_WITH_ID, MSG_QUANTITY_LESSTHAN_OR_EQUALTO_ZERO, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUE |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
DEFAULT_LOG_TRACE_STATUS |
Method Summary |
protected void |
addItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
boolean pIsGift)
Adds the given item to the order (the shopping cart). |
RepositoryItem |
getBillingAddress()
Get the billing address used when paying by invoice. |
java.lang.String |
getBillingAddressId()
Return the repository id of the repository item that specifies which
billing address to use when paying by invoice. |
java.lang.String |
getCancelOrderErrorURL()
Return the cancelOrderErrorURL property. |
java.lang.String |
getCancelOrderSuccessURL()
Return the cancelOrderSuccessURL property. |
CostCenter |
getCostCenter()
Returns property CostCenter |
CostCenterManager |
getCostCenterManager()
Returns property CostCenterManager |
java.lang.String |
getGenerateInvoiceCCName()
Return a magic string that, when used as the selectedCreditCardName,
indicates to this shopping cart form handler that the user wants to
pay by invoice instead of by credit card. |
java.lang.String |
getOrderIdToCancel()
Return the orderIdToCancel property. |
java.lang.String |
getPONumber()
Get the purchase order number associated with payment for the current
order. |
protected java.lang.String |
getProductId(java.lang.String pSkuId,
DynamoHttpServletRequest pRequest)
we do not want to assume that the skus all come from the same product so we will maintain a sku to product mapping
a naming convention is used to look up a product id in the request given a skuid. |
boolean |
handleCancelOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
|
boolean |
isPayByInvoice()
Return true if we should pay for this order by generating an
invoice. |
void |
postCancelOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
|
void |
preCancelOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
|
void |
preMoveToConfirmation(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Override superclass preMoveToConfirmation to support purchasing by
invoice. |
void |
setBillingAddressId(java.lang.String pBillingAddressId)
Set the repository id of the repository item that specifies which
billing address to use when paying by invoice. |
void |
setCancelOrderErrorURL(java.lang.String pCancelOrderErrorURL)
Set the cancelOrderErrorURL property. |
void |
setCancelOrderSuccessURL(java.lang.String pCancelOrderSuccessURL)
Set the cancelOrderSuccessURL property. |
void |
setConfiguration(ShoppingCartModifierConfiguration pConfiguration)
Sets property Configuration, and in the process configures the following properties in addition to the base
properties:
costCenterManager
|
void |
setCostCenter(CostCenter pCostCenter)
Sets property CostCenter |
void |
setCostCenterManager(CostCenterManager pCostCenterManager)
Sets property CostCenterManager |
void |
setOrderIdToCancel(java.lang.String pOrderIdToCancel)
Set the orderIdToCancel property. |
void |
setPONumber(java.lang.String pPONumber)
Set the purchase order number associated with payment for the current
order. |
Methods inherited from class atg.commerce.order.SoftGoodFormHandler |
addSoftGoodToOrder, getAddSoftGoodToOrderErrorURL, getAddSoftGoodToOrderSuccessURL, getSoftGoodRecipientEmailAddress, getSoftGoodShippingGroupName, handleAddSoftGoodToOrder, initializeElectronicShippingGroup, initializeShippingGroup, postAddSoftGoodToOrder, preAddSoftGoodToOrder, setAddSoftGoodToOrderErrorURL, setAddSoftGoodToOrderSuccessURL, setSoftGoodRecipientEmailAddress, setSoftGoodShippingGroupName |
Methods inherited from class atg.commerce.order.FullShoppingCartFormHandler |
addNewShippingAddress, copyAddressesToProfile, copyCreditCard, copyCreditCard, copyCreditCardToPaymentGroup, copyCreditCardToProfile, copyExistingAddress, copyProfileAddressToShippingGroupAddress, copyShallowCreditCardProperties, createGiftCertificatePaymentGroups, getAddGiftItemToOrderErrorURL, getAddGiftItemToOrderSuccessURL, getAddressesToCopy, getClaimableManager, getClaimableTools, getCommerceProfileTools, getCreateAddressErrorURL, getCreateAddressSuccessURL, getCreditCardProperties, getExpressCheckoutErrorURL, getExpressCheckoutSuccessURL, getGiftCertificateProperties, getMoveToNewShippingAddressErrorURL, getMoveToNewShippingAddressSuccessURL, getNewShippingAddressName, getOriginalShippingAddressName, getProfileAddressNames, getPropertyManager, getQuantityToMove, getSelectedCreditCardName, getShipToAddressName, getShipToDoneErrorURL, getShipToDoneSuccessURL, getShipToMultipleDoneErrorURL, getShipToMultipleDoneSuccessURL, getShipToMultipleErrorURL, getShipToMultipleSuccessURL, getValidateShippingGroupsChainId, handleAddGiftItemToOrder, handleCreateAddress, handleExpressCheckout, handleMoveToNewShippingAddress, handleShipToDone, handleShipToMultiple, handleShipToMultipleDone, isCreditCardEmpty, isGiftCertificateEmpty, isNewCreditCards, isNewGiftCertificates, isOrderRelationshipExists, isPaymentGroupEmpty, isSingletonRelationship, mergePaymentGroupsToOrder, moveCommerceItemsToNewShippingGroup, postAddGiftItemToOrder, postCreateAddress, postExpressCheckout, postMoveToConfirmation, postMoveToNewShippingAddress, postShipToDone, postShipToMultiple, postShipToMultipleDone, preAddGiftItemToOrder, preCreateAddress, preExpressCheckout, preMoveToNewShippingAddress, preShipToDone, preShipToMultiple, preShipToMultipleDone, removeAddedNickNameEntries, removeCreditCardPaymentGroupsFromOrder, removePaymentGroupsFromOrder, runProcessValidateShippingGroups, setAddGiftItemToOrderErrorURL, setAddGiftItemToOrderSuccessURL, setAddressesToCopy, setClaimableManager, setClaimableTools, setCommerceProfileTools, setCreateAddressErrorURL, setCreateAddressSuccessURL, setCreditCardProperties, setExpressCheckoutErrorURL, setExpressCheckoutSuccessURL, setGiftCertificateProperties, setMoveToNewShippingAddressErrorURL, setMoveToNewShippingAddressSuccessURL, setNewShippingAddressName, setOriginalShippingAddressName, setPaymentMethodsInOrder, setPropertyManager, setQuantityToMove, setSelectedCreditCardName, setShipToAddressName, setShipToDoneErrorURL, setShipToDoneSuccessURL, setShipToMultipleDoneErrorURL, setShipToMultipleDoneSuccessURL, setShipToMultipleErrorURL, setShipToMultipleSuccessURL, setValidateShippingGroupsChainId, updateShippingAddress |
Methods inherited from class atg.commerce.order.ShoppingCartFormHandler |
addConfigurableItemToOrder, addMoreParams, checkDuplicateDescription, checkFormRedirect, copyBillingAddrToShippingAddr, deleteItems, deleteItemsByRelationshipId, doStartService, getAddItemToOrderChainId, getAddItemToOrderErrorURL, getAddItemToOrderPricingOp, getAddItemToOrderSuccessURL, getCatalogKey, getCommerceItemIdToEdit, getCommerceItemToEdit, getConfigurableItemTypeName, getConfiguration, getCopyBillingAddrToShippingAddr, getCreditCardPaymentGroups, getCreditCardPaymentTypeName, getDeletedSkus, getDeleteItemsFromOrderPricingOp, getDescription, getEditItem, getEditItemErrorURL, getEditItemSuccessURL, getGiftCertificateNumbers, getGiftCertificatePaymentGroups, getGiftCertificatePaymentTypeName, getGiftlistId, getGiftlistItemId, getGiftlistManager, getItemAddedToOrderEventType, getItemRemovedFromOrderEventType, getLastOrder, getModifyOrderPricingOp, getMoveToConfirmationChainId, getMoveToConfirmationErrorURL, getMoveToConfirmationSuccessURL, getMoveToOrderCommitErrorURL, getMoveToOrderCommitSuccessURL, getMoveToPurchaseInfoByRelIdErrorURL, getMoveToPurchaseInfoByRelIdSuccessURL, getMoveToPurchaseInfoChainId, getMoveToPurchaseInfoErrorURL, getMoveToPurchaseInfoSuccessURL, getOrder, getOrderId, getOrderSavedEventType, getPaymentGroup, getRemovalCatalogRefIds, getRemovalCommerceIds, getRemovalRelationshipIds, getRemoveAndAddItemToOrderErrorURL, getRemoveAndAddItemToOrderSuccessURL, getRemoveItemFromOrderByRelationshipIdErrorURL, getRemoveItemFromOrderByRelationshipIdSuccessURL, getRemoveItemFromOrderErrorURL, getRemoveItemFromOrderSuccessURL, getRepriceOrder, getRepriceOrderChainId, getRepriceOrderErrorURL, getRepriceOrderSuccessURL, getSaveOrderErrorURL, getSaveOrderSuccessURL, getSessionExpirationURL, getSetOrderByRelationshipIdErrorURL, getSetOrderByRelationshipIdSuccessURL, getSetOrderChainId, getSetOrderErrorURL, getSetOrderSuccessURL, getShippingGroup, getShippingGroupCommerceItemRelationships, getShoppingCart, getUserPricingModels, handleAddConfigurableItemToOrder, handleAddItemToOrder, handleCheckForExpiredSession, handleEditItem, handleMoveToConfirmation, handleMoveToOrderCommit, handleMoveToPurchaseInfo, handleMoveToPurchaseInfoByRelId, handleRemoveAndAddItemToOrder, handleRemoveItemFromOrder, handleRemoveItemFromOrderByRelationshipId, handleRepriceOrder, handleSaveOrder, handleSetOrder, handleSetOrderByRelationshipId, haveId, isCheckForChangedQuantity, isFormSubmission, isFormSubmition, modifyOrder, modifyOrderByRelationshipId, postAddItemToOrder, postEditItem, postMoveToOrderCommit, postMoveToPurchaseInfo, postRemoveAndAddItemToOrder, postRemoveItemFromOrder, postRemoveItemFromOrderByRelationshipId, postRepriceOrder, postSaveOrder, postSetOrder, postSetOrderByRelationshipId, preAddItemToOrder, preEditItem, preMoveToOrderCommit, preMoveToPurchaseInfo, preRemoveAndAddItemToOrder, preRemoveItemFromOrder, preRemoveItemFromOrderByRelationshipId, preRepriceOrder, preSaveOrder, preSetOrder, preSetOrderByRelationshipId, runProcessAddItemToOrder, runProcessAddItemToOrder, runProcessMoveToConfirmation, runProcessMoveToPurchaseInfo, runProcessRepriceOrder, runProcessRepriceOrder, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runProcessSetOrder, runRepricingProcess, saveOrder, setAddItemToOrderChainId, setAddItemToOrderErrorURL, setAddItemToOrderPricingOp, setAddItemToOrderSuccessURL, setCheckForChangedQuantity, setCommerceItemIdToEdit, setCommerceItemProperties, setConfigurableItemTypeName, setCopyBillingAddrToShippingAddr, setCreditCardPaymentGroups, setCreditCardPaymentTypeName, setDeletedSkus, setDeleteItemsFromOrderPricingOp, setDescription, setEditItem, setEditItemErrorURL, setEditItemSuccessURL, setGiftCertificateNumbers, setGiftCertificatePaymentGroups, setGiftCertificatePaymentTypeName, setGiftlistId, setGiftlistItemId, setGiftlistManager, setItemAddedToOrderEventType, setItemRemovedFromOrderEventType, setModifyOrderPricingOp, setMoveToConfirmationChainId, setMoveToConfirmationErrorURL, setMoveToConfirmationSuccessURL, setMoveToOrderCommitErrorURL, setMoveToOrderCommitSuccessURL, setMoveToPurchaseInfoByRelIdErrorURL, setMoveToPurchaseInfoByRelIdSuccessURL, setMoveToPurchaseInfoChainId, setMoveToPurchaseInfoErrorURL, setMoveToPurchaseInfoSuccessURL, setOrderId, setOrderSavedEventType, setPaymentGroup, setRemovalCatalogRefIds, setRemovalCommerceIds, setRemovalRelationshipIds, setRemoveAndAddItemToOrderErrorURL, setRemoveAndAddItemToOrderSuccessURL, setRemoveItemFromOrderByRelationshipIdErrorURL, setRemoveItemFromOrderByRelationshipIdSuccessURL, setRemoveItemFromOrderErrorURL, setRemoveItemFromOrderSuccessURL, setRepriceOrder, setRepriceOrderChainId, setRepriceOrderErrorURL, setRepriceOrderSuccessURL, setSaveOrderErrorURL, setSaveOrderSuccessURL, setSessionExpirationURL, setSetOrderByRelationshipIdErrorURL, setSetOrderByRelationshipIdSuccessURL, setSetOrderChainId, setSetOrderErrorURL, setSetOrderSuccessURL, setShippingGroup, setShoppingCart, setUserPricingModels |
Methods inherited from class atg.commerce.order.OrderModifierFormHandler |
acquireTransactionLock, addNewItemToOrder, afterSet, beforeSet, commitTransaction, createCommerceItem, defaultLocalLockManager, defaultUserProfile, ensureTransaction, findCommerceItem, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getAddress, getCatalogRefIds, getCatalogTools, getCreditCard, getCurrentTransaction, getDefaultLocale, getGeneralFailureURL, getGeneralSuccessURL, getGiftCertificate, getHardgoodShippingGroup, getLocalLockManager, getOrderManager, getPipelineManager, getProductId, getProfile, getQuantity, getQuantity, getResourceBundle, getResourceBundleName, getTransactionLockFactory, getTransactionManager, getUserLocale, handlePipelineError, isEnsureTransaction, isStringEmpty, isTransactionCreated, isTransactionMarkedAsRollBack, isUseLocksAroundTransactions, isUseRequestLocale, processException, processPipelineErrors, releaseTransactionLock, removeItemFromOrder, runProcess, runProcess, runProcess, setAddress, setCatalogRefIds, setCatalogTools, setCreditCard, setCurrentTransaction, setDefaultLocale, setEnsureTransaction, setGeneralFailureURL, setGeneralSuccessURL, setGiftCertificate, setHardgoodShippingGroup, setLocalLockManager, setOrder, setOrderManager, setPipelineManager, setProductId, setProfile, setQuantity, setTransactionCreated, setTransactionLockFactory, setTransactionManager, setTransactionToRollbackOnly, setUseLocksAroundTransactions, setUseRequestLocale, transactionLockName, unsetTransactionCreated |
Methods inherited from class atg.droplet.GenericFormHandler |
addFormException, addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards |
Methods inherited from class atg.nucleus.GenericService |
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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 |
CLASS_VERSION
public static java.lang.String CLASS_VERSION
- Class version string
sResourceBundle
protected static java.util.ResourceBundle sResourceBundle
- Resource Bundle
mGenerateInvoiceCCName
public static final java.lang.String mGenerateInvoiceCCName
- See Also:
- Constant Field Values
B2BShoppingCartFormHandler
public B2BShoppingCartFormHandler()
- Constructs an instanceof B2BShoppingCartFormHandler
setConfiguration
public void setConfiguration(ShoppingCartModifierConfiguration pConfiguration)
- Sets property Configuration, and in the process configures the following properties in addition to the base
properties:
- Overrides:
setConfiguration
in class SoftGoodFormHandler
setCostCenterManager
public void setCostCenterManager(CostCenterManager pCostCenterManager)
- Sets property CostCenterManager
getCostCenterManager
public CostCenterManager getCostCenterManager()
- Returns property CostCenterManager
setCostCenter
public void setCostCenter(CostCenter pCostCenter)
- Sets property CostCenter
getCostCenter
public CostCenter getCostCenter()
- Returns property CostCenter
getOrderIdToCancel
public java.lang.String getOrderIdToCancel()
- Return the orderIdToCancel property.
- Returns:
- the orderIdToCancel
setOrderIdToCancel
public void setOrderIdToCancel(java.lang.String pOrderIdToCancel)
- Set the orderIdToCancel property.
- Parameters:
pOrderIdToCancel
-
getCancelOrderSuccessURL
public java.lang.String getCancelOrderSuccessURL()
- Return the cancelOrderSuccessURL property.
- Returns:
- the cancelOrderSuccessURL
setCancelOrderSuccessURL
public void setCancelOrderSuccessURL(java.lang.String pCancelOrderSuccessURL)
- Set the cancelOrderSuccessURL property.
- Parameters:
pCancelOrderSuccessURL
-
getCancelOrderErrorURL
public java.lang.String getCancelOrderErrorURL()
- Return the cancelOrderErrorURL property.
- Returns:
- the cancelOrderErrorURL
setCancelOrderErrorURL
public void setCancelOrderErrorURL(java.lang.String pCancelOrderErrorURL)
- Set the cancelOrderErrorURL property.
- Parameters:
pCancelOrderErrorURL
-
addItemToOrder
protected void addItemToOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
boolean pIsGift)
throws javax.servlet.ServletException,
java.io.IOException
- Adds the given item to the order (the shopping cart). This is done by obtaining
the list of catalog items to be added from the catalogRefIds array. For each
of these items, get the quantity that is to be added. This is done by calling
the getQuantity method. After this information has been obtained, for each
item that is to be added create a commerce item using this information plus the
properties set in the productId and catalogKey. This commerce item is created
by using the OrderManager. After the item has been created, the OrderManager
is used to
- addItemToOrder - handing it the created commerce item with the users order
- addItemQuantityToShippingGroup - a relationship is created between the commerce
item added to the order and the shipping group that is associated with the
property shippingGroup. If the shipping group property is not set on the form,
then it will default to the first shipping group found in the order.
After the item has been added to the order, the order will be repriced and a scenario
event will be fired of type ItemAddedToOrder.
If pIsGift is true, this item is a gift and requires special handling. The giftlistManagers
addGiftToOrder will get called.
- Overrides:
addItemToOrder
in class ShoppingCartFormHandler
- Parameters:
pRequest
- the servlet's requestpResponse
- the servlet's responsepIsGift
- If this is true, the added items are gifts. see
the giftlist property.
- Throws:
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet io
getProductId
protected java.lang.String getProductId(java.lang.String pSkuId,
DynamoHttpServletRequest pRequest)
- we do not want to assume that the skus all come from the same product so we will maintain a sku to product mapping
a naming convention is used to look up a product id in the request given a skuid. We could have created a map property
for this, but I am worried if this componenet ever becomes session scoped that it will not be cleared properly
getGenerateInvoiceCCName
public java.lang.String getGenerateInvoiceCCName()
- Return a magic string that, when used as the selectedCreditCardName,
indicates to this shopping cart form handler that the user wants to
pay by invoice instead of by credit card.
This is a big hack, but it appears to be necessary to support the
user interface where each registered credit card is associated with
one radio button and the "generate invoice" option is associated with
a separate radio button, and all the radio buttons are mutually
exclusive.
setPONumber
public void setPONumber(java.lang.String pPONumber)
- Set the purchase order number associated with payment for the current
order. This property is required when paying by invoice, and optional
when paying by credit card
getPONumber
public java.lang.String getPONumber()
- Get the purchase order number associated with payment for the current
order.
setBillingAddressId
public void setBillingAddressId(java.lang.String pBillingAddressId)
- Set the repository id of the repository item that specifies which
billing address to use when paying by invoice. The repository item
named by this id should be of type contactInfo or one of its subtypes,
with fields compatible with an object of type atg.core.util.ContactInfo
getBillingAddressId
public java.lang.String getBillingAddressId()
- Return the repository id of the repository item that specifies which
billing address to use when paying by invoice. The repository item
named by this id should be of type contactInfo or one of its subtypes,
with fields compatible with an object of type atg.core.util.ContactInfo
getBillingAddress
public RepositoryItem getBillingAddress()
- Get the billing address used when paying by invoice.
- Returns:
- The repository item residing in billingAddressRepository
whose item descriptor type is billingAddressType and whose
repository id is billingAddressId. The item returned will
normally be of type contactInfo or one of its subtypes, with fields
compatible with an object of type atg.core.util.Cont
isPayByInvoice
public boolean isPayByInvoice()
- Return true if we should pay for this order by generating an
invoice. This method shields most of the code from the awful
hack involving getGenerateInvoiceCCName()
preMoveToConfirmation
public void preMoveToConfirmation(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
- Override superclass preMoveToConfirmation to support purchasing by
invoice.
This method consults the payByInvoice property to determine
whether we are purchasing by invoice or by some other method. If the
property is false, meaning payment is being made by credit card or some
other method, the call is delegated to the superclass version of
preMoveToConfirmation. (NB: jhtml authors will set the
selectedCreditCardName to a magic value to indicate that
the customer wants to pay by invoice. The payByInvoice
property is computed by examining this property and looking for
the magic value, which is itself specified by the
genericInvoiceCCName property.
If payByInvoice is true, this method examines the current
order and arranges for it to have a single payment group of type
InvoiceRequest, whose properties are initialized from the
PONumber and billingAddress properties of the
form handler. (NB: jhtml authors will set the billingAddressId
property in their jhtml forms. The id specified will be converted to
a billing address object by the getBillingAddress method.)
This method will try to reuse an existing InvoiceRequest payment
group if one is present in the order, and is the only payment group
associated with the order. Otherwise it will delete any existing
payment groups and payment relationships and replace them with a
new InvoiceRequest.
- Overrides:
preMoveToConfirmation
in class FullShoppingCartFormHandler
- 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
preCancelOrder
public void preCancelOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
- Throws:
javax.servlet.ServletException
java.io.IOException
postCancelOrder
public void postCancelOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
- Throws:
javax.servlet.ServletException
java.io.IOException
handleCancelOrder
public boolean handleCancelOrder(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
- Throws:
javax.servlet.ServletException
java.io.IOException