|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.commerce.order.purchase.PurchaseProcessHelper
atg.projects.store.order.purchase.StorePurchaseProcessHelper
atg.projects.store.order.purchase.StoreShippingProcessHelper
public class StoreShippingProcessHelper
Helper methods for handling shipping information
Field Summary | |
---|---|
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 boolean |
mConsolidateShippingInfosBeforeApply
|
static java.lang.String |
MSG_DUPLICATE_NICKNAME
Duplicate nickname message key. |
protected static java.lang.String |
MSG_ERROR_INCORRECT_STATE
Error message for incorrect state |
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
|
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
|
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 | |
---|---|
StoreShippingProcessHelper()
|
Method Summary | |
---|---|
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. |
void |
copyShippingToBilling(atg.commerce.order.Order pOrder,
atg.core.util.Address pAddress)
Copies the new shipping group address to the order's credit card payment group address. |
atg.commerce.order.HardgoodShippingGroup |
createShippingGroupFromDefaultAddress(atg.repository.RepositoryItem pProfile)
Creates a HardgoodShippingGroup from the profile's default shipping address item. |
java.lang.String |
findOrAddShippingAddress(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. |
atg.commerce.order.purchase.CommerceItemShippingInfoTools |
getCommerceItemShippingInfoTools()
Returns the tools component containing the API for modifying CommerceItemShippingInfos |
atg.commerce.order.HardgoodShippingGroup |
getFirstNonGiftHardgoodShippingGroupWithRels(atg.commerce.order.Order pOrder)
Returns the first non-gift hardgood shipping group with relationships from the order. |
java.util.List |
getGiftShippingGroups(atg.commerce.order.Order pOrder)
Returns a list of all shipping groups that contain gifts. |
protected java.util.regex.Pattern[] |
getInvalidCityPatterns()
|
java.util.Properties |
getInvalidStatesForShipMethod()
Expects a pipe-dilimited string containing 2-digit state abbreviations that are invalid for a particular shipping method. |
java.lang.String[] |
getInvalidStreetStrings()
|
int |
getNonGiftHardgoodShippingGroupCount(atg.commerce.order.Order pOrder)
Returns the number of non-gift hardgood shipping groups with commerce item relationships. |
java.util.List |
getNonGiftHardgoodShippingGroups(atg.commerce.order.Order pOrder)
Returns the non-gift hardgood shipping groups with commerce item relationships. |
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 precendence: shipping group's shipping method, the profile's default shipping method, and the default configured shipping method. |
boolean |
isAnyHardgoodShippingGroups(atg.commerce.order.Order pOrder)
Returns true if the order has at least one hargood shipping group with commerce item relationships. |
boolean |
isAnyNonGiftHardgoodShippingGroups(atg.commerce.order.Order pOrder)
Determines if there are any non-gift hardgood shipping groups with relationships. |
boolean |
isApplyDefaultShippingGroup()
Return the ApplyDefaultShippingGroup property. |
boolean |
isConsolidateShippingInfosBeforeApply()
|
boolean |
isEmptyNewAddress(atg.core.util.ContactInfo pAddress)
Checks whether new address is empty. |
boolean |
isMultipleHardgoodShippingGroupsWithRelationships(atg.commerce.order.Order pOrder)
Returns true if the order has more than one hardgood shipping group with commerce item relationships. |
boolean |
isMultipleNonGiftHardgoodItems(atg.commerce.order.Order pOrder)
Determines if the total quantity of all non-gift hardgood items is more than one. |
boolean |
isMultipleNonGiftHardgoodShippingGroups(atg.commerce.order.Order pOrder)
Returns true if the order has more than one non-gift hardgood shipping group with commerce item relationships. |
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 and saves the changes to the profile if the address is in the profile's address map. |
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 removes 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. |
protected void |
saveShippingInfo(atg.repository.RepositoryItem pProfile,
atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
Saves all addresses in the shipping group container's shipping group map. |
void |
setApplyDefaultShippingGroup(boolean pApplyDefaultShippingGroup)
Set the ApplyDefaultShippingGroup property. |
void |
setCommerceItemShippingInfoTools(atg.commerce.order.purchase.CommerceItemShippingInfoTools pCommerceItemShippingInfoTools)
|
void |
setConsolidateShippingInfosBeforeApply(boolean pConsolidateShippingInfosBeforeApply)
Sets the consolidateShippingInfosBeforeApply property. |
protected void |
setGiftWrapItemShippingGroupInfos(java.util.List pCommerceItemShippinGroupInfos)
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-dilimited string containing 2-digit state abbreviations that are invalid for a particular shipping method. |
void |
setInvalidStreetStrings(java.lang.String[] pInvalidStreetStrings)
|
void |
setValidateShippingGroups(boolean pValidateShippingGroups)
Sets property ValidateShippingGroups |
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. |
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 |
---|
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
protected boolean mValidateShippingGroups
protected boolean mConsolidateShippingInfosBeforeApply
Constructor Detail |
---|
public StoreShippingProcessHelper()
Method Detail |
---|
public atg.commerce.order.purchase.CommerceItemShippingInfoTools getCommerceItemShippingInfoTools()
public void setCommerceItemShippingInfoTools(atg.commerce.order.purchase.CommerceItemShippingInfoTools pCommerceItemShippingInfoTools)
pCommerceItemShippingInfoTools
- the Commerce Item Shipping Info Tools to setprotected 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 methodspublic 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
- the value to setpublic boolean isValidateShippingGroups()
public void setValidateShippingGroupsChainId(java.lang.String pValidateShippingGroupsChainId)
pValidateShippingGroupsChainId
- a String
valuepublic java.lang.String getValidateShippingGroupsChainId()
String
valuepublic boolean isConsolidateShippingInfosBeforeApply()
public void setConsolidateShippingInfosBeforeApply(boolean pConsolidateShippingInfosBeforeApply)
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
valuepublic boolean isApplyDefaultShippingGroup()
boolean
valuepublic int getNonGiftHardgoodShippingGroupCount(atg.commerce.order.Order pOrder)
pOrder
- Order whose non-gift hardgood shipping group count is to be retrieved
public boolean isAnyHardgoodShippingGroups(atg.commerce.order.Order pOrder)
pOrder
- Order to be checked
public boolean isMultipleNonGiftHardgoodShippingGroups(atg.commerce.order.Order pOrder)
pOrder
- Order to be checked
public boolean isMultipleHardgoodShippingGroupsWithRelationships(atg.commerce.order.Order pOrder)
pOrder
- Order to be checked
public boolean isMultipleNonGiftHardgoodItems(atg.commerce.order.Order pOrder)
pOrder
- Order to be checked
public boolean isAnyNonGiftHardgoodShippingGroups(atg.commerce.order.Order pOrder)
pOrder
- Order to be checked
public java.util.List getNonGiftHardgoodShippingGroups(atg.commerce.order.Order pOrder)
pOrder
- Order whose non-gift hard good shipping groups are to be retrieved
public atg.commerce.order.HardgoodShippingGroup getFirstNonGiftHardgoodShippingGroupWithRels(atg.commerce.order.Order pOrder)
pOrder
- Order whose non-gift hard good shipping groups is to be retrieved
public void saveDefaultShippingMethod(atg.repository.RepositoryItem pProfile, java.lang.String pShippingMethod)
pProfile
- - profilepShippingMethod
- - shipping methodpublic void copyShippingToBilling(atg.commerce.order.Order pOrder, atg.core.util.Address pAddress)
pOrder
- Order to copy the billing address topAddress
- Address to copy as billing addresspublic void saveAddressToAddressBook(atg.core.util.Address pAddress, java.lang.String pNickName, atg.repository.RepositoryItem pProfile) throws atg.commerce.CommerceException
pAddress
- - address Address to savepNickName
- - nickname - Nickname for the address being savedpProfile
- the profile
atg.commerce.CommerceException
- indicates that a severe error occured while performing a commerce operationpublic java.util.List getGiftShippingGroups(atg.commerce.order.Order pOrder)
pOrder
- Order whose shipping sroups are to be retrieved
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
valuepPricingModels
- a PricingModelHolder
valuepLocale
- a Locale
valuepProfile
- a RepositoryItem
valuepExtraParameters
- a Map
value
atg.service.pipeline.RunProcessException
- if an error occurspublic java.lang.String initializeShippingMethod(atg.repository.RepositoryItem pProfile, atg.commerce.order.ShippingGroup pShippingGroup, java.lang.String pDefaultShippingMethod)
pProfile
- Shopper profilepShippingGroup
- shipping group for the orderpDefaultShippingMethod
- 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 profilepCommerceItemShippingInfoContainer
- 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 profilepCommerceItemShippingInfoContainer
- map of all commerce item infos for the order
List
valueprotected void setGiftWrapItemShippingGroupInfos(java.util.List pCommerceItemShippinGroupInfos)
pCommerceItemShippinGroupInfos
- 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 colection of items to changepShippingGroupName
- if this is not null, each info item's shipping group name is set to this valuepShippingMethod
- if this is not null, each info item's shipping method is set to this value.public java.lang.String findOrAddShippingAddress(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 profilepNewShipToAddressName
- nickname for the new shipping grouppAddress
- address to be usedpShippingGroupMapContainer
- an instance of ShippingGroupContainerServicepSaveShippingAddress
- true if this address should be saved into profile specified
atg.commerce.CommerceException
- if something goes wrong
java.beans.IntrospectionException
- if something goes wrongpublic 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
pAddress
- Address to addpNewShipToAddressName
- Address nickname to use for the address being addedpProfile
- shopper profilepShippingGroupMapContainer
- map of all shipping groups for the profilepSaveShippingAddress
- true if this address should be saved into profile specified
atg.commerce.CommerceException
- indicates that a severe error occured while performing a commerce operationpublic 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 addresspProfile
- shopper profilepShippingGroupMapContainer
- map of all shipping groups for the profilepNewShipToAddressName
- 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 modifiedpShippingGroupMapContainer
- map of all shipping groups for the profilepEditAddress
- Address to be modifiedpublic 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 profilepEditShippingAddressNickName
- Address Nickname to be modifiedpShippingAddressNewNickName
- Address New Nicknamepublic void saveModifiedShippingAddressToProfile(atg.repository.RepositoryItem pProfile, java.lang.String pEditShippingAddressNickName, atg.core.util.Address pEditAddress)
pEditShippingAddressNickName
- Nickname for the address to be modifiedpProfile
- shopper profilepEditAddress
- map of all shipping groups for the profilepublic void removeShippingAddress(atg.repository.RepositoryItem pProfile, java.lang.String pRemoveShippingAddressNickName, atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
pRemoveShippingAddressNickName
- Nickname for the address to be removedpShippingGroupMapContainer
- map of all shipping groups for the profilepProfile
- the profilepublic void removeShippingAddressFromProfile(atg.repository.RepositoryItem pProfile, java.lang.String pRemoveShippingAddressNickName)
pProfile
- shopper profilepRemoveShippingAddressNickName
- Nickname for the address to be removedpublic java.util.List<java.lang.String> splitShippingGroupsByMethod(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer, java.util.List pAllHardgoodCommerceItemShippingInfos) throws atg.commerce.CommerceException
pRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
value
atg.commerce.CommerceException
- indicates that a severe error occured while performing a commerce operationpublic 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 profilepCommerceItemShippingInfoContainer
- map of all commerce item infos for the orderpOrder
- Order whose shipping groups are to be saved
atg.commerce.CommerceException
- if an error occursprotected void saveShippingInfo(atg.repository.RepositoryItem pProfile, atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
The key is used as the nick name. The shipping group's address is used for the address.
Also sets the default shipping method on the profile
pProfile
- shopper profilepShippingGroupMapContainer
- map of all shipping groups for the profilepublic void validateShippingCity(atg.core.util.Address pShippingAddress) throws StorePurchaseProcessException
pShippingAddress
- shipping address to validate
StorePurchaseProcessException
- is an error occurspublic void validateShippingMethod(atg.core.util.Address pAddress, java.lang.String pShippingMethod) throws StorePurchaseProcessException
pAddress
- address to validate against the shipping methodpShippingMethod
- 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 orderpShippingGroupMapContainer
- map of all shipping groups for the profile
atg.commerce.CommerceException
- if an error occurspublic 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 iopublic boolean isValidShippingState(atg.core.util.ContactInfo pShippingAddress)
pShippingAddress
- shipping address contact info
public boolean isEmptyNewAddress(atg.core.util.ContactInfo pAddress)
pAddress
- address to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |