public class StoreShippingProcessHelper extends StorePurchaseProcessHelper
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string.
|
static java.lang.String |
COUNTRY_DELIM
Country delimiter.
|
static java.lang.String |
DISPLAY_NAME_PROPERTY_NAME |
protected StoreCatalogProperties |
mCatalogProperties
property: catalogProperties.
|
protected boolean |
mConsolidateShippingInfosBeforeApply
property: consolidateShippingInfos
|
static java.lang.String |
MSG_DUPLICATE_NICKNAME
Duplicate nickname message key.
|
static java.lang.String |
MSG_ERROR_CHANGING_SECONDARY_ADDRESS_NAME |
static java.lang.String |
MSG_ERROR_COPING_ADDRESS |
static java.lang.String |
MSG_ERROR_CREATING_SHIPPINGGROUP_FOR_DEFAULT_ADDRESS
Error messages for logging
|
protected static java.lang.String |
MSG_ERROR_INCORRECT_STATE
Error message for incorrect state
|
static java.lang.String |
MSG_ERROR_REMOVING_PROFILE_REPOSITORY_ADDRESS |
static java.lang.String |
MSG_ERROR_UPDATE_SHIPPINGGROUP
Error updating shipping groups message key.
|
static java.lang.String |
MSG_INVALID_CITY_ADDRESS
Invalid city address message key.
|
static java.lang.String |
MSG_INVALID_STATE_FOR_METHOD
Invalid state for method message key.
|
static java.lang.String |
MSG_INVALID_STREET_ADDRESS
Invalid Street Address message key
|
static java.lang.String |
MSG_RESTRICTED_SHIPPING
Restricted shipping message key.
|
protected boolean |
mValidateShippingGroups
property: validateShippGroups
|
static java.lang.String |
NEW_ADDRESS
New address constant.
|
protected static java.lang.String |
NICKNAME_SEPARATOR |
static java.lang.String |
NON_SHIPPABLE_COUNTRIES_PROPERTY_NAME |
static java.lang.String |
SHIPPABLE_COUNTRIES_PROPERTY_NAME |
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
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 |
---|
StoreShippingProcessHelper() |
Modifier and Type | Method and Description |
---|---|
void |
addShippingAddress(atg.repository.RepositoryItem pProfile,
java.lang.String pNewShipToAddressName,
atg.core.util.Address pAddress,
atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer,
boolean pSaveShippingAddress)
Creates a new shipping group and adds it to the shipping group map container.
|
void |
applyShippingGroups(atg.commerce.order.purchase.CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer,
atg.commerce.order.Order pOrder)
applyShippingGroups removes all non-gift ShippingGroups from
the Order and then iterates over the supplied CommerceItemShippingInfos
for each of the CommerceItems. |
void |
changeShippingGroupForCommerceItemShippingInfos(java.util.Collection pCommerceItemShippingInfos,
java.lang.String pShippingGroupName,
java.lang.String pShippingMethod)
Changes the shipping group name and shipping method for a collection
of items in the CommerceItemShippingInfoContainer.
|
java.util.List |
checkForInvalidStreetAddress(atg.core.util.ContactInfo pContactInfo)
Validates against invalid street addresses.
|
java.util.List |
checkShippingRestrictions(atg.commerce.order.purchase.CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
Check shipping restrictions.
|
atg.commerce.order.HardgoodShippingGroup |
createShippingGroupFromDefaultAddress(atg.repository.RepositoryItem pProfile)
Creates a HardgoodShippingGroup from the profile's default shipping address item.
|
void |
findOrAddShippingGroupByNickname(atg.repository.RepositoryItem pProfile,
java.lang.String pNewShipToAddressName,
atg.core.util.Address pAddress,
atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer,
boolean pSaveShippingAddress)
Tries to find an appropriate hardgood shipping group within the shipping group map container specified.
|
java.util.List |
getAllHardgoodCommerceItemShippingInfos(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer,
atg.commerce.order.purchase.CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer)
Get the List of all the CommerceItemShippingInfos for hardgoods
from the CommerceItemShippingInfoMap.
|
StoreCatalogProperties |
getCatalogProperties() |
atg.commerce.order.purchase.CommerceItemShippingInfoTools |
getCommerceItemShippingInfoTools()
Returns the tools component containing the API for modifying CommerceItemShippingInfos.
|
protected java.util.regex.Pattern[] |
getInvalidCityPatterns() |
java.util.Properties |
getInvalidStatesForShipMethod()
Expects a pipe-delimited string containing 2-digit state abbreviations
that are invalid for a particular shipping method.
|
java.lang.String[] |
getInvalidStreetStrings() |
java.util.Collection |
getUniqueHardgoodShippingGroups(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer,
atg.commerce.order.purchase.CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer)
Retrieve the collection of all hardgood shipping groups referenced by commerce item infos.
|
java.lang.String |
getUniqueShippingAddressNickname(atg.core.util.Address pAddress,
atg.repository.RepositoryItem pProfile,
atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer,
java.lang.String pNewShipToAddressName)
This method returns a unique address nickname.
|
java.lang.String |
getValidateShippingGroupsChainId()
Return the ValidateShippingGroupsChainId property.
|
java.lang.String |
initializeShippingMethod(atg.repository.RepositoryItem pProfile,
atg.commerce.order.ShippingGroup pShippingGroup,
java.lang.String pDefaultShippingMethod)
Determines the shipping method in the following order of precedence: shipping group's
shipping method, the profile's default shipping method, and the default configured shipping method.
|
boolean |
isApplyDefaultShippingGroup()
Return the ApplyDefaultShippingGroup property.
|
boolean |
isConsolidateShippingInfosBeforeApply()
This property is used to control is the CommerceItemShippingInfo objects are
consolidated prior to being applied to the order.
|
boolean |
isEmptyNewAddress(atg.core.util.ContactInfo pAddress)
Checks whether new address is empty.
|
boolean |
isValidateShippingGroups() |
boolean |
isValidateShippingRestriction() |
boolean |
isValidShippingState(atg.core.util.ContactInfo pShippingAddress)
Determine if the given shipping address contains valid state for the shipping.
|
void |
modifyAddressBookNickname(atg.repository.RepositoryItem pProfile,
java.lang.String pEditShippingAddressNickName,
java.lang.String pShippingAddressNewNickName)
Modifies the address nick name is in the profile's map.
|
void |
modifyShippingAddress(java.lang.String pEditShippingAddressNickName,
atg.core.util.Address pEditAddress,
atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
Edits a shipping group address in the container.
|
void |
modifyShippingAddressNickname(atg.repository.RepositoryItem pProfile,
java.lang.String pEditShippingAddressNickName,
java.lang.String pShippingAddressNewNickName,
atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
Modifies shipping address nickname.
|
void |
removeShippingAddress(atg.repository.RepositoryItem pProfile,
java.lang.String pRemoveShippingAddressNickName,
atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
Removes a shipping group from the container.
|
void |
removeShippingAddressFromProfile(atg.repository.RepositoryItem pProfile,
java.lang.String pRemoveShippingAddressNickName)
If the shipping address nickname is in the profile's addresses map, remove it from the profile.
|
protected atg.service.pipeline.PipelineResult |
runProcessValidateShippingGroups(atg.commerce.order.Order pOrder,
atg.commerce.pricing.PricingModelHolder pPricingModels,
java.util.Locale pLocale,
atg.repository.RepositoryItem pProfile,
java.util.Map pExtraParameters)
runProcessValidateShippingGroups runs a configurable Pipeline chain
to validate ShippingGroups or prepare for the next checkout phase. |
void |
saveAddressToAddressBook(atg.core.util.Address pAddress,
java.lang.String pNickName,
atg.repository.RepositoryItem pProfile)
Saves address to address book.
|
void |
saveDefaultShippingMethod(atg.repository.RepositoryItem pProfile,
java.lang.String pShippingMethod)
Set the profile's default shipping method if it's not already set.
|
void |
saveModifiedShippingAddressToProfile(atg.repository.RepositoryItem pProfile,
java.lang.String pEditShippingAddressNickName,
atg.core.util.Address pEditAddress)
saveModifiedShippingAddress shipping address processing.
|
void |
setApplyDefaultShippingGroup(boolean pApplyDefaultShippingGroup)
Set the ApplyDefaultShippingGroup property.
|
void |
setCatalogProperties(StoreCatalogProperties pCatalogProperties) |
void |
setCommerceItemShippingInfoTools(atg.commerce.order.purchase.CommerceItemShippingInfoTools pCommerceItemShippingInfoTools) |
void |
setConsolidateShippingInfosBeforeApply(boolean pConsolidateShippingInfosBeforeApply)
Sets the consolidateShippingInfosBeforeApply property.
|
void |
setGiftWrapItemShippingGroupInfos(java.util.List pCommerceItemShippingInfos)
This method is called when using multiple shipping groups.
|
protected void |
setInvalidCityPatterns(java.util.regex.Pattern[] pInvalidCityPatterns) |
void |
setInvalidCityStrings(java.lang.String[] pInvalidCityStrings) |
void |
setInvalidStatesForShipMethod(java.util.Properties pInvalidStatesForShipMethod)
Expects a pipe-delimited string containing 2-digit state abbreviations
that are invalid for a particular shipping method.
|
void |
setInvalidStreetStrings(java.lang.String[] pInvalidStreetStrings) |
void |
setValidateShippingGroups(boolean pValidateShippingGroups) |
void |
setValidateShippingGroupsChainId(java.lang.String pValidateShippingGroupsChainId)
Set the ValidateShippingGroupsChainId property.
|
void |
setValidateShippingRestriction(boolean pValidateShippingRestriction) |
java.util.List<java.lang.String> |
splitShippingGroupsByMethod(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer,
java.util.List pAllHardgoodCommerceItemShippingInfos)
Loops through all CommerceItemShippingInfos and finds items that have
the same shipping address but different shipping methods then creates separate
shipping groups for them.
|
java.lang.String |
trimmedString(java.lang.String pInStr)
Trim string.
|
atg.core.util.Address |
trimSpacesFromAddressValues(atg.core.util.Address pAddress)
Trims spaces from address values.
|
void |
validateShippingCity(atg.core.util.Address pShippingAddress)
Validates the shipping city against a collection of regular expressions.
|
void |
validateShippingMethod(atg.core.util.Address pAddress,
java.lang.String pShippingMethod)
This method will ensure the user isn't trying to use a shipping method that isn't valid for the
state.
|
checkForRequiredAddressProperties, claimCoupon, claimCoupon, getAddressPropertyNameMap, getClaimableManager, getMandatoryStateCountryList, getPlaceUtils, getPricingTools, getRequiredAddressPropertyNames, getStoreConfiguration, getStoreOrderTools, removeCoupon, removeCoupon, repriceOrder, setAddressPropertyNameMap, setClaimableManager, setPlaceUtils, setPricingTools, setRequiredAddressPropertyNames, setStoreConfiguration, setStoreOrderTools, tenderCoupon
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 NON_SHIPPABLE_COUNTRIES_PROPERTY_NAME
public static final java.lang.String SHIPPABLE_COUNTRIES_PROPERTY_NAME
public static final java.lang.String DISPLAY_NAME_PROPERTY_NAME
protected static final java.lang.String NICKNAME_SEPARATOR
public static final java.lang.String NEW_ADDRESS
public static final java.lang.String COUNTRY_DELIM
public static final java.lang.String MSG_INVALID_STATE_FOR_METHOD
protected static final java.lang.String MSG_ERROR_INCORRECT_STATE
public static final java.lang.String MSG_RESTRICTED_SHIPPING
public static final java.lang.String MSG_DUPLICATE_NICKNAME
public static final java.lang.String MSG_INVALID_CITY_ADDRESS
public static final java.lang.String MSG_INVALID_STREET_ADDRESS
public static final java.lang.String MSG_ERROR_UPDATE_SHIPPINGGROUP
public static final java.lang.String MSG_ERROR_CREATING_SHIPPINGGROUP_FOR_DEFAULT_ADDRESS
public static final java.lang.String MSG_ERROR_CHANGING_SECONDARY_ADDRESS_NAME
public static final java.lang.String MSG_ERROR_REMOVING_PROFILE_REPOSITORY_ADDRESS
public static final java.lang.String MSG_ERROR_COPING_ADDRESS
protected boolean mValidateShippingGroups
protected boolean mConsolidateShippingInfosBeforeApply
protected StoreCatalogProperties mCatalogProperties
public atg.commerce.order.purchase.CommerceItemShippingInfoTools getCommerceItemShippingInfoTools()
public void setCommerceItemShippingInfoTools(atg.commerce.order.purchase.CommerceItemShippingInfoTools pCommerceItemShippingInfoTools)
pCommerceItemShippingInfoTools
- the Commerce Item Shipping Info Tools to set.protected void setInvalidCityPatterns(java.util.regex.Pattern[] pInvalidCityPatterns)
pInvalidCityPatterns
- - Invalid city patterns.protected java.util.regex.Pattern[] getInvalidCityPatterns()
public void setInvalidCityStrings(java.lang.String[] pInvalidCityStrings)
pInvalidCityStrings
- - invalid city strings.public java.lang.String[] getInvalidStreetStrings()
public void setInvalidStreetStrings(java.lang.String[] pInvalidStreetStrings)
pInvalidStreetStrings
- - invalid streets strings.public void setInvalidStatesForShipMethod(java.util.Properties pInvalidStatesForShipMethod)
pInvalidStatesForShipMethod
- - invalid states for shipping methods.public java.util.Properties getInvalidStatesForShipMethod()
public boolean isValidateShippingRestriction()
public void setValidateShippingRestriction(boolean pValidateShippingRestriction)
pValidateShippingRestriction
- - true if shipping restrictions should be validated.public void setValidateShippingGroups(boolean pValidateShippingGroups)
pValidateShippingGroups
- - flag indicating if the shipping groups should be validated
after being applied to the order. The default setting is true.public boolean isValidateShippingGroups()
public void setValidateShippingGroupsChainId(java.lang.String pValidateShippingGroupsChainId)
pValidateShippingGroupsChainId
- a String
value.public java.lang.String getValidateShippingGroupsChainId()
String
value.public boolean isConsolidateShippingInfosBeforeApply()
This property is used to control is the CommerceItemShippingInfo objects are consolidated prior to being applied to the order.
public void setConsolidateShippingInfosBeforeApply(boolean pConsolidateShippingInfosBeforeApply)
Sets the consolidateShippingInfosBeforeApply property.
This property is used to control is the CommerceItemShippingInfo objects are consolidated prior to being applied to the order.
pConsolidateShippingInfosBeforeApply
- The consolidateShippingInfosBeforeApply to set.#consolidateShippingInfos(atg.servlet.DynamoHttpServletRequest, atg.servlet.DynamoHttpServletResponse)
public void setApplyDefaultShippingGroup(boolean pApplyDefaultShippingGroup)
pApplyDefaultShippingGroup
- a boolean
value.public boolean isApplyDefaultShippingGroup()
boolean
value.public void setCatalogProperties(StoreCatalogProperties pCatalogProperties)
pCatalogProperties
- - the catalog properties.public StoreCatalogProperties getCatalogProperties()
public void saveDefaultShippingMethod(atg.repository.RepositoryItem pProfile, java.lang.String pShippingMethod)
pProfile
- - profile to update.pShippingMethod
- - shipping method.public void saveAddressToAddressBook(atg.core.util.Address pAddress, java.lang.String pNickName, atg.repository.RepositoryItem pProfile) throws atg.commerce.CommerceException
pAddress
- - address Address to save.pNickName
- - nickname - Nickname for the address being saved.pProfile
- - the profile.atg.commerce.CommerceException
- indicates that a severe error occurred while performing a commerce operation.protected atg.service.pipeline.PipelineResult runProcessValidateShippingGroups(atg.commerce.order.Order pOrder, atg.commerce.pricing.PricingModelHolder pPricingModels, java.util.Locale pLocale, atg.repository.RepositoryItem pProfile, java.util.Map pExtraParameters) throws atg.service.pipeline.RunProcessException
runProcessValidateShippingGroups
runs a configurable Pipeline chain
to validate ShippingGroups or prepare for the next checkout phase.pOrder
- - an Order
value.pPricingModels
- - a PricingModelHolder
value.pLocale
- - a Locale
value.pProfile
- - a RepositoryItem
value.pExtraParameters
- - a Map
value.atg.service.pipeline.RunProcessException
- if an error occurs.public java.lang.String initializeShippingMethod(atg.repository.RepositoryItem pProfile, atg.commerce.order.ShippingGroup pShippingGroup, java.lang.String pDefaultShippingMethod)
pProfile
- - Shopper profile.pShippingGroup
- - shipping group for the order.pDefaultShippingMethod
- - the default configured shipping method.public java.util.Collection getUniqueHardgoodShippingGroups(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer, atg.commerce.order.purchase.CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer)
pShippingGroupMapContainer
- - map of all shipping groups for the profile.pCommerceItemShippingInfoContainer
- - map of all commerce item infos for the order.public java.util.List getAllHardgoodCommerceItemShippingInfos(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer, atg.commerce.order.purchase.CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer)
pShippingGroupMapContainer
- - map of all shipping groups for the profile.pCommerceItemShippingInfoContainer
- - map of all commerce item infos for the order.List
value.public void setGiftWrapItemShippingGroupInfos(java.util.List pCommerceItemShippingInfos)
pCommerceItemShippingInfos
- - all the commerce item infos that will be applied to the order.public atg.commerce.order.HardgoodShippingGroup createShippingGroupFromDefaultAddress(atg.repository.RepositoryItem pProfile)
pProfile
- - shopper profile.public void changeShippingGroupForCommerceItemShippingInfos(java.util.Collection pCommerceItemShippingInfos, java.lang.String pShippingGroupName, java.lang.String pShippingMethod)
pCommerceItemShippingInfos
- - the collection of items to change.pShippingGroupName
- - if this is not null, each info item's shipping group name is set to this value.pShippingMethod
- - if this is not null, each info item's shipping method is set to this value.public void findOrAddShippingGroupByNickname(atg.repository.RepositoryItem pProfile, java.lang.String pNewShipToAddressName, atg.core.util.Address pAddress, atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer, boolean pSaveShippingAddress) throws atg.commerce.CommerceException, java.beans.IntrospectionException
pProfile
- - current user's profile.pNewShipToAddressName
- - nickname for the new shipping group.pAddress
- - address to be used.pShippingGroupMapContainer
- - an instance of ShippingGroupContainerService.pSaveShippingAddress
- - true if this address should be saved into profile specified.atg.commerce.CommerceException
- if something goes wrong.java.beans.IntrospectionException
- if something goes wrong.public void addShippingAddress(atg.repository.RepositoryItem pProfile, java.lang.String pNewShipToAddressName, atg.core.util.Address pAddress, atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer, boolean pSaveShippingAddress) throws atg.commerce.CommerceException
Creates a new shipping group and adds it to the shipping group map container.
Optionally saves the shipping group address to the profile based on the saveShippingAddress option.
pAddress
- - Address to add.pNewShipToAddressName
- - Address nickname to use for the address being added.pProfile
- - shopper profile.pShippingGroupMapContainer
- - map of all shipping groups for the profile.pSaveShippingAddress
- - true if this address should be saved into profile specified.atg.commerce.CommerceException
- indicates that a severe error occurred while performing a commerce operation.public java.lang.String getUniqueShippingAddressNickname(atg.core.util.Address pAddress, atg.repository.RepositoryItem pProfile, atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer, java.lang.String pNewShipToAddressName)
pAddress
- - shipping address.pProfile
- - shopper profile.pShippingGroupMapContainer
- - map of all shipping groups for the profile.pNewShipToAddressName
- - Address nickname to use for the address being added.public void modifyShippingAddress(java.lang.String pEditShippingAddressNickName, atg.core.util.Address pEditAddress, atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
pEditShippingAddressNickName
- - Nickname for the address to be modified.pShippingGroupMapContainer
- - map of all shipping groups for the profile.pEditAddress
- - Address to be modified.public void modifyShippingAddressNickname(atg.repository.RepositoryItem pProfile, java.lang.String pEditShippingAddressNickName, java.lang.String pShippingAddressNewNickName, atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
pProfile
- - shopper profilepEditShippingAddressNickName
- - Address Nickname to be modifiedpShippingAddressNewNickName
- - New Address NicknamepShippingGroupMapContainer
- - map of all shipping groups for the profilepublic void modifyAddressBookNickname(atg.repository.RepositoryItem pProfile, java.lang.String pEditShippingAddressNickName, java.lang.String pShippingAddressNewNickName)
pProfile
- - shopper profile.pEditShippingAddressNickName
- - Address Nickname to be modified.pShippingAddressNewNickName
- - Address New Nickname.public void saveModifiedShippingAddressToProfile(atg.repository.RepositoryItem pProfile, java.lang.String pEditShippingAddressNickName, atg.core.util.Address pEditAddress)
pEditShippingAddressNickName
- - Nickname for the address to be modified.pProfile
- - shopper profile.pEditAddress
- - Address to be modified.public void removeShippingAddress(atg.repository.RepositoryItem pProfile, java.lang.String pRemoveShippingAddressNickName, atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
pRemoveShippingAddressNickName
- - Nickname for the address to be removed.pShippingGroupMapContainer
- - map of all shipping groups for the profile.pProfile
- - the profile.public void removeShippingAddressFromProfile(atg.repository.RepositoryItem pProfile, java.lang.String pRemoveShippingAddressNickName)
pProfile
- - shopper profile.pRemoveShippingAddressNickName
- - Nickname for the address to be removed.public java.util.List<java.lang.String> splitShippingGroupsByMethod(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer, java.util.List pAllHardgoodCommerceItemShippingInfos) throws atg.commerce.CommerceException
pRequest
- a DynamoHttpServletRequest
value.pResponse
- a DynamoHttpServletResponse
value.atg.commerce.CommerceException
- indicates that a severe error occurred while performing a commerce operation.public void applyShippingGroups(atg.commerce.order.purchase.CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer, atg.commerce.order.Order pOrder) throws atg.commerce.CommerceException
applyShippingGroups
removes all non-gift ShippingGroups from
the Order and then iterates over the supplied CommerceItemShippingInfos
for each of the CommerceItems. Each CommerceItemShippingInfo is used
to update the Order.
If property consolidateShippingInfosBeforeApply
is true, the commerce
item shipping info objects are first consolidated by calling the consolidateShippingInfos
method.
pShippingGroupMapContainer
- - map of all shipping groups for the profile.pCommerceItemShippingInfoContainer
- - map of all commerce item infos for the order.pOrder
- - Order whose shipping groups are to be saved.atg.commerce.CommerceException
- if an error occurs.public void validateShippingCity(atg.core.util.Address pShippingAddress) throws StorePurchaseProcessException
pShippingAddress
- shipping address to validate.StorePurchaseProcessException
- is an error occurs.public void validateShippingMethod(atg.core.util.Address pAddress, java.lang.String pShippingMethod) throws StorePurchaseProcessException
pAddress
- - address to validate against the shipping method.pShippingMethod
- - shipping method to validate address for.StorePurchaseProcessException
- if an error occurspublic java.util.List checkShippingRestrictions(atg.commerce.order.purchase.CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer) throws atg.commerce.CommerceException
pCommerceItemShippingInfoContainer
- - map of all commerce item infos for the order.pShippingGroupMapContainer
- - map of all shipping groups for the profile.atg.commerce.CommerceException
- if an error occurs.public java.util.List checkForInvalidStreetAddress(atg.core.util.ContactInfo pContactInfo)
pContactInfo
- - contact information.public java.lang.String trimmedString(java.lang.String pInStr)
pInStr
- - string to trim.public atg.core.util.Address trimSpacesFromAddressValues(atg.core.util.Address pAddress) throws javax.servlet.ServletException, java.io.IOException
pAddress
- - Address whose values are to trimmed.javax.servlet.ServletException
- if there was an error while executing the code.java.io.IOException
- if there was an error with servlet io.public boolean isValidShippingState(atg.core.util.ContactInfo pShippingAddress)
pShippingAddress
- - shipping address contact info.public boolean isEmptyNewAddress(atg.core.util.ContactInfo pAddress)
pAddress
- address to check.