public class StorePurchaseProcessHelper
extends atg.commerce.order.purchase.PurchaseProcessHelper
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADDRESS_PROP_NAME |
static java.lang.String |
CITY_PROP_NAME |
static java.lang.String |
CLASS_VERSION
Class version string.
|
static java.lang.String |
COUNTRY_PROP_NAME |
static java.lang.String |
FIRST_NAME_PROP_NAME |
static java.lang.String |
LAST_NAME_PROP_NAME |
static java.lang.String |
MSG_MISSING_REQUIRED_ADDRESS_PROPERTY
Missing required address property.
|
static java.lang.String |
MSG_MULTIPLE_COUPONS_PER_ORDER
Multiple coupons per order error message key.
|
static java.lang.String |
MSG_UNCLAIMABLE_COUPON
Unclaimable coupon error message key.
|
static java.lang.String |
POSTAL_CODE_PROP_NAME |
static java.lang.String |
PRICING_ERROR
Pricing error message key.
|
static java.lang.String |
PRICING_ERROR_ADDRESS
Pricing error invalid address message key.
|
static java.lang.String |
STATE_PROP_NAME |
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
Constructor and Description |
---|
StorePurchaseProcessHelper() |
Modifier and Type | Method and Description |
---|---|
java.util.List |
checkForRequiredAddressProperties(atg.core.util.ContactInfo pContactInfo)
Validates the required billing properties.
|
void |
claimCoupon(java.lang.String pCouponCode,
StoreOrderImpl pOrder,
atg.repository.RepositoryItem pProfile,
boolean pRepriceOrder,
atg.commerce.pricing.PricingModelHolder pUserPricingModels,
java.util.Locale pUserLocale)
This method claims a coupon specified by its code for a specific user and order.
|
void |
claimCoupon(java.lang.String pCouponCode,
StoreOrderImpl pOrder,
atg.repository.RepositoryItem pProfile,
atg.commerce.pricing.PricingModelHolder pUserPricingModels,
java.util.Locale pUserLocale)
This method claims a coupon specified by its code for a specific user and order and reprices the order.
|
java.util.Map |
getAddressPropertyNameMap() |
atg.commerce.claimable.ClaimableManager |
getClaimableManager() |
protected java.util.List |
getMandatoryStateCountryList(atg.servlet.DynamoHttpServletRequest pRequest)
Get mandatory state country list.
|
atg.commerce.util.PlaceUtils |
getPlaceUtils() |
atg.commerce.pricing.PricingTools |
getPricingTools() |
java.lang.String[] |
getRequiredAddressPropertyNames() |
StoreConfiguration |
getStoreConfiguration() |
StoreOrderTools |
getStoreOrderTools() |
void |
removeCoupon(StoreOrderImpl pOrder,
atg.repository.RepositoryItem pProfile,
boolean pRepriceOrder,
atg.commerce.pricing.PricingModelHolder pUserPricingModels,
java.util.Locale pUserLocale)
This method removes a coupon from the order specified.
|
void |
removeCoupon(StoreOrderImpl pOrder,
atg.repository.RepositoryItem pProfile,
atg.commerce.pricing.PricingModelHolder pUserPricingModels,
java.util.Locale pUserLocale)
This method removes a coupon from the order specified and re-prices the order.
|
void |
repriceOrder(atg.commerce.order.Order pOrder,
atg.commerce.pricing.PricingModelHolder pUserPricingModels,
java.util.Locale pUserLocale,
atg.repository.RepositoryItem pProfile)
Logic to re-price order, and parse any errors.
|
void |
setAddressPropertyNameMap(java.util.Map pAddressPropertyNameMap) |
void |
setClaimableManager(atg.commerce.claimable.ClaimableManager pClaimableManager) |
void |
setPlaceUtils(atg.commerce.util.PlaceUtils pPlaceUtils) |
void |
setPricingTools(atg.commerce.pricing.PricingTools pPricingTools) |
void |
setRequiredAddressPropertyNames(java.lang.String[] pRequiredAddressPropertyNames) |
void |
setStoreConfiguration(StoreConfiguration pStoreConfiguration) |
void |
setStoreOrderTools(StoreOrderTools pStoreOrderTools) |
boolean |
tenderCoupon(java.lang.String pCouponCode,
StoreOrderImpl pOrder,
atg.repository.RepositoryItem pProfile,
atg.commerce.pricing.PricingModelHolder pUserPricingModels,
java.util.Locale pUserLocale)
Attempt to claim the specified coupon code for a specific user and order.
|
addCreditCardToOrder, addItemsToOrder, addItemsToOrder, addItemToOrder, addItemToShippingGroup, addShippingAddressToOrder, addShippingAddressToOrder, adjustItemRelationshipsForQuantityChange, adjustNonGiftHandlingInstructionsForQuantityDecrease, adjustNonGiftHandlingInstructionsForQuantityIncrease, applyValueDictionary, changeItemQuantity, changeItemQuantity, copyCreditCardInfo, createCommerceItem, createConfigurableSubitems, createOrder, decreaseRelationshipQuantity, deleteItem, deleteItems, deleteItems, getAddItemToOrderChainId, getAddItemToOrderPricingOp, getCommerceItemManager, getDefaultHardgoodShippingGroupType, getDeleteItemsFromOrderPricingOp, getFirstShippingGroup, getGiftlistManager, getInStorePickupShippingGroupForItem, getOrderManager, getPipelineManager, getRepriceOrderChainId, getShippingGroupForItem, getShippingGroupManager, getTransactionManager, increaseRelationshipQuantity, isAddItemToDefaultShippingGroup, isInStorePickupShippingGroupValidForItem, isTransactionMarkedAsRollBack, moveItemBetweenShippingGroups, postAddItemsToOrder, postDeleteItem, postDeleteItem, postDeleteItem, postDeleteItem, processGiftAddition, processPipelineErrors, removeEntireRelationshipQuantity, removeItemQuantityFromShippingGroup, runProcess, runProcess, runProcess, runProcessAddItemToOrder, runProcessRepriceOrder, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runProcessSendScenarioEvent, runRepricingProcess, setAddItemToDefaultShippingGroup, setAddItemToOrderChainId, setAddItemToOrderPricingOp, setCommerceItemManager, setCommerceItemProperties, setDefaultHardgoodShippingGroupType, setDeleteItemsFromOrderPricingOp, setGiftlistManager, setOrderAmountToPaymentGroup, setOrderManager, setPipelineManager, setRepriceOrderChainId, setShippingGroupManager, setTransactionManager
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, toString
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public static final java.lang.String POSTAL_CODE_PROP_NAME
public static final java.lang.String STATE_PROP_NAME
public static final java.lang.String COUNTRY_PROP_NAME
public static final java.lang.String CITY_PROP_NAME
public static final java.lang.String ADDRESS_PROP_NAME
public static final java.lang.String LAST_NAME_PROP_NAME
public static final java.lang.String FIRST_NAME_PROP_NAME
public static final java.lang.String MSG_MISSING_REQUIRED_ADDRESS_PROPERTY
public static final java.lang.String PRICING_ERROR_ADDRESS
public static final java.lang.String PRICING_ERROR
public static final java.lang.String MSG_MULTIPLE_COUPONS_PER_ORDER
public static final java.lang.String MSG_UNCLAIMABLE_COUPON
public java.util.Map getAddressPropertyNameMap()
public void setAddressPropertyNameMap(java.util.Map pAddressPropertyNameMap)
pAddressPropertyNameMap
- - the address property name map to set.public java.lang.String[] getRequiredAddressPropertyNames()
public void setRequiredAddressPropertyNames(java.lang.String[] pRequiredAddressPropertyNames)
pRequiredAddressPropertyNames
- - the address property name map to set.public StoreOrderTools getStoreOrderTools()
public void setStoreOrderTools(StoreOrderTools pStoreOrderTools)
pStoreOrderTools
- - the Store order tools property.public StoreConfiguration getStoreConfiguration()
public void setStoreConfiguration(StoreConfiguration pStoreConfiguration)
pStoreConfiguration
- - the store configuration to set.public void setPricingTools(atg.commerce.pricing.PricingTools pPricingTools)
pPricingTools
- - pricing tools.public atg.commerce.pricing.PricingTools getPricingTools()
public atg.commerce.util.PlaceUtils getPlaceUtils()
public void setPlaceUtils(atg.commerce.util.PlaceUtils pPlaceUtils)
pPlaceUtils
- - Utility methods class for PlaceList handling.public atg.commerce.claimable.ClaimableManager getClaimableManager()
public void setClaimableManager(atg.commerce.claimable.ClaimableManager pClaimableManager)
pClaimableManager
- - the claimable manager to set.protected java.util.List getMandatoryStateCountryList(atg.servlet.DynamoHttpServletRequest pRequest)
pRequest
- - HTTP request.public java.util.List checkForRequiredAddressProperties(atg.core.util.ContactInfo pContactInfo)
pContactInfo
- - Contact information.pRequest
- - HTTP request.public void repriceOrder(atg.commerce.order.Order pOrder, atg.commerce.pricing.PricingModelHolder pUserPricingModels, java.util.Locale pUserLocale, atg.repository.RepositoryItem pProfile) throws atg.commerce.pricing.PricingException
pOrder
- - the order to price.pUserLocale
- - the locale of the user, may be null.pProfile
- - the user, may be null.pUserPricingModels
- - the PricingModelHolder is an object which contains all the
pricing models associated with a user (i.e. item, shipping,
order and tax).atg.commerce.pricing.PricingException
- if there was an error while computing the pricing information.public boolean tenderCoupon(java.lang.String pCouponCode, StoreOrderImpl pOrder, atg.repository.RepositoryItem pProfile, atg.commerce.pricing.PricingModelHolder pUserPricingModels, java.util.Locale pUserLocale) throws atg.commerce.CommerceException, java.lang.IllegalArgumentException
Attempt to claim the specified coupon code for a specific user and order.
If the tendered coupon code is empty then remove any existing coupon on the order. If the tendered coupon is not empty then check this is a valid claimable item before removing any existing coupon and claiming the tendered coupon. This avoids issues such as revoke promotion events if we simply remove the coupon and then roll-back when claiming the coupon fails.
pCouponCode
- - coupon code to be claimed.pOrder
- - order to be re-priced when the coupon has been claimed.pProfile
- - user who claims a coupon.pUserPricingModels
- - user's pricing models to be used for order re-price process.pUserLocale
- - user's locale to be used when re-pricing order.atg.commerce.CommerceException
- if an error occurred during claiming the coupon.java.lang.IllegalArgumentException
- indicate that a method has been passed an illegal or inappropriate argument.public void claimCoupon(java.lang.String pCouponCode, StoreOrderImpl pOrder, atg.repository.RepositoryItem pProfile, atg.commerce.pricing.PricingModelHolder pUserPricingModels, java.util.Locale pUserLocale) throws atg.commerce.CommerceException, java.lang.IllegalArgumentException
pCouponCode
- - coupon code to be claimed.pOrder
- - order to be re-priced when the coupon has been claimed.pProfile
- - user who claims a coupon.pUserPricingModels
- - user's pricing models to be used for order reprice process.pUserLocale
- - user's locale to be used when re-pricing order.atg.commerce.CommerceException
- - if something goes wrong.java.lang.IllegalArgumentException
- - if order has a claimed coupon already.public void claimCoupon(java.lang.String pCouponCode, StoreOrderImpl pOrder, atg.repository.RepositoryItem pProfile, boolean pRepriceOrder, atg.commerce.pricing.PricingModelHolder pUserPricingModels, java.util.Locale pUserLocale) throws atg.commerce.CommerceException, java.lang.IllegalArgumentException
pCouponCode
- - coupon code to be claimed.pOrder
- - order to be re-priced when the coupon has been claimed.pProfile
- - user who claims a coupon.pRepriceOrder
- - boolean flag to indicate if order should be re-priced.pUserPricingModels
- - user's pricing models to be used for order re-price process.pUserLocale
- - user's locale to be used when re-pricing order.atg.commerce.CommerceException
- - if something goes wrong.java.lang.IllegalArgumentException
- - if order has a claimed coupon already.public void removeCoupon(StoreOrderImpl pOrder, atg.repository.RepositoryItem pProfile, atg.commerce.pricing.PricingModelHolder pUserPricingModels, java.util.Locale pUserLocale) throws atg.commerce.CommerceException
pOrder
- - order with coupon claimed.pProfile
- - user who removes a coupon.pUserPricingModels
- - user's pricing models to be used in order re-pricing process.pUserLocale
- - user's locale to be used when re-pricing order.atg.commerce.CommerceException
- - if something goes wrong.public void removeCoupon(StoreOrderImpl pOrder, atg.repository.RepositoryItem pProfile, boolean pRepriceOrder, atg.commerce.pricing.PricingModelHolder pUserPricingModels, java.util.Locale pUserLocale) throws atg.commerce.CommerceException
pOrder
- - order with coupon claimed.pProfile
- - user who removes a coupon.pRepriceOrder
- - boolean flag to indicate if order should be re-priced.pUserPricingModels
- - user's pricing models to be used in order re-pricing process.pUserLocale
- - user's locale to be used when re-pricing order.atg.commerce.CommerceException
- - if something goes wrong.