atg.projects.store.order.purchase
Class StoreCommitOrderProcessHelper

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.order.purchase.PurchaseProcessHelper
              extended by atg.projects.store.order.purchase.StorePurchaseProcessHelper
                  extended by atg.projects.store.order.purchase.StoreCommitOrderProcessHelper
All Implemented Interfaces:
atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

public class StoreCommitOrderProcessHelper
extends StorePurchaseProcessHelper

This class performs logic necessary for the commit-order process.

Version:
$Id: //hosting-blueprint/B2CBlueprint/version/10.2.1/EStore/src/atg/projects/store/order/purchase/StoreCommitOrderProcessHelper.java#2 $$Change: 788983 $
Author:
ATG

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.projects.store.order.purchase.StorePurchaseProcessHelper
ADDRESS_PROP_NAME, CITY_PROP_NAME, COUNTRY_PROP_NAME, FIRST_NAME_PROP_NAME, LAST_NAME_PROP_NAME, MSG_MISSING_REQUIRED_ADDRESS_PROPERTY, MSG_MULTIPLE_COUPONS_PER_ORDER, MSG_UNCLAIMABLE_COUPON, POSTAL_CODE_PROP_NAME, PRICING_ERROR, PRICING_ERROR_ADDRESS, STATE_PROP_NAME
 
Fields inherited from class atg.commerce.order.purchase.PurchaseProcessHelper
ERROR_FETCHING_PROFILE, MSG_ERROR_ADDING_CREDIT_CARD, MSG_ERROR_ADDING_SHIPPINGGROUP, MSG_ERROR_ADDING_TO_ORDER, MSG_ERROR_CHANGING_ITEM_QUANTITY, MSG_ERROR_CREATING_ORDER, MSG_ERROR_MOVING_ITEM_BETWEEN_SHIPPING_GROUPS, MSG_ERROR_PROCESS_ADD_ITEM_CHAIN, MSG_ERROR_REMOVING_ITEM, MSG_ERROR_REMOVING_ITEM_FROM_SHIPPING_GROUP, MSG_ERROR_REPRICING_ORDER_AFTER_ADD_ITEM, MSG_ERROR_SETTING_ORDER_AMOUNT, MSG_INVALID_PROFILE_ID
 
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
StoreCommitOrderProcessHelper()
           
 
Method Summary
 void addEmailToAnonymousUser(java.lang.String pEmailAddress, atg.repository.RepositoryItem pProfile)
          Add the e-mail provided by an anonymous shopper to the profile.
 void addEmailToCreditCard(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile)
          Adds the profile's e-mail address to the credit cart.
 void doPostCommitOrderProcessing(StoreOrderImpl pStoreOrder, atg.repository.RepositoryItem pProfile)
          Makes post commit order processing: setting profile's last purchase date, number of orders and bought items, order's OMS order id, inventory managing.
 void updateProfileIdOnOrder(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile)
          Makes sure that the profile id is set correctly on the order.
 boolean validateCreditCardVerificationNumber(atg.commerce.order.Order pOrder, java.lang.String pCcv)
          Validates the credit card verification number on the order, if required.
 boolean validateShippingMethods(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pProfile, java.util.Locale pLocale, atg.commerce.pricing.PricingModelHolder pPricingModels)
          Validates the shipping methods on an order against the list of available shipping methods.
 
Methods inherited from class atg.projects.store.order.purchase.StorePurchaseProcessHelper
checkForRequiredAddressProperties, claimCoupon, claimCoupon, getAddressPropertyNameMap, getClaimableManager, getMandatoryStateCountryList, getPlaceUtils, getPricingTools, getRequiredAddressPropertyNames, getStoreConfiguration, getStoreOrderTools, removeCoupon, removeCoupon, repriceOrder, setAddressPropertyNameMap, setClaimableManager, setPlaceUtils, setPricingTools, setRequiredAddressPropertyNames, setStoreConfiguration, setStoreOrderTools, tenderCoupon
 
Methods inherited from class atg.commerce.order.purchase.PurchaseProcessHelper
addCreditCardToOrder, addItemsToOrder, addItemsToOrder, addItemToOrder, addItemToShippingGroup, addShippingAddressToOrder, adjustItemRelationshipsForQuantityChange, adjustNonGiftHandlingInstructionsForQuantityDecrease, adjustNonGiftHandlingInstructionsForQuantityIncrease, applyValueDictionary, changeItemQuantity, copyCreditCardInfo, createCommerceItem, createConfigurableSubitems, createOrder, decreaseRelationshipQuantity, deleteItem, deleteItems, deleteItems, getAddItemToOrderChainId, getAddItemToOrderPricingOp, getCommerceItemManager, getDefaultHardgoodShippingGroupType, getDeleteItemsFromOrderPricingOp, getFirstShippingGroup, getGiftlistManager, getOrderManager, getPipelineManager, getRepriceOrderChainId, getShippingGroupForItem, getShippingGroupManager, getTransactionManager, increaseRelationshipQuantity, isAddItemToDefaultShippingGroup, isTransactionMarkedAsRollBack, moveItemBetweenShippingGroups, postAddItemsToOrder, postDeleteItem, postDeleteItem, processGiftAddition, processPipelineErrors, removeEntireRelationshipQuantity, removeItemQuantityFromShippingGroup, runProcess, runProcess, runProcess, runProcessAddItemToOrder, runProcessRepriceOrder, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runRepricingProcess, setAddItemToDefaultShippingGroup, setAddItemToOrderChainId, setAddItemToOrderPricingOp, setCommerceItemManager, setCommerceItemProperties, setDefaultHardgoodShippingGroupType, setDeleteItemsFromOrderPricingOp, setGiftlistManager, setOrderAmountToPaymentGroup, setOrderManager, setPipelineManager, setRepriceOrderChainId, setShippingGroupManager, setTransactionManager
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, 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
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

StoreCommitOrderProcessHelper

public StoreCommitOrderProcessHelper()
Method Detail

validateShippingMethods

public boolean validateShippingMethods(atg.commerce.order.Order pOrder,
                                       atg.repository.RepositoryItem pProfile,
                                       java.util.Locale pLocale,
                                       atg.commerce.pricing.PricingModelHolder pPricingModels)
Validates the shipping methods on an order against the list of available shipping methods.

Parameters:
pOrder - - The order on which to check the shipping methods.
pProfile - - The user's profile.
pLocale - - The locale to use for determining available shipping methods.
pPricingModels - - A Collection of RepositoryItems representing PricingModels.
Returns:
true if the order contains valid shipping methods; otherwise false.

validateCreditCardVerificationNumber

public boolean validateCreditCardVerificationNumber(atg.commerce.order.Order pOrder,
                                                    java.lang.String pCcv)
Validates the credit card verification number on the order, if required.

Parameters:
pOrder - - An Order that the credit card is linked to.
pCcv - - The credit card verification number
Returns:
True if the credit card verification number is valid

addEmailToCreditCard

public void addEmailToCreditCard(atg.commerce.order.Order pOrder,
                                 atg.repository.RepositoryItem pProfile)
Adds the profile's e-mail address to the credit cart.

Parameters:
pOrder - - the Order that the profile is linked to.
pProfile - - the profile to retrieve the email address from.

updateProfileIdOnOrder

public void updateProfileIdOnOrder(atg.commerce.order.Order pOrder,
                                   atg.repository.RepositoryItem pProfile)
Makes sure that the profile id is set correctly on the order.

Parameters:
pOrder - - the Order that the profile is linked to.
pProfile - - the profile to retrieve the profileId from.

addEmailToAnonymousUser

public void addEmailToAnonymousUser(java.lang.String pEmailAddress,
                                    atg.repository.RepositoryItem pProfile)
Add the e-mail provided by an anonymous shopper to the profile.

Parameters:
pEmailAddress - - E-mail address as a String value.
pProfile - - Profile to add the e-mail address too, a RepositoryItem value.

doPostCommitOrderProcessing

public void doPostCommitOrderProcessing(StoreOrderImpl pStoreOrder,
                                        atg.repository.RepositoryItem pProfile)
                                 throws atg.repository.RepositoryException
Makes post commit order processing: setting profile's last purchase date, number of orders and bought items, order's OMS order id, inventory managing.

Parameters:
pStoreOrder - - The last order, a StoreOrderImpl value.
pProfile - - A RepositoryItem value.
Throws:
atg.repository.RepositoryException - indicates that a severe error occurred while performing a Repository task.