atg.commerce.order.purchase
Class ShippingGroupFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by atg.commerce.order.purchase.PurchaseProcessFormHandler
                      extended by atg.commerce.order.purchase.ShippingGroupFormHandler
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 ShippingGroupFormHandler
extends PurchaseProcessFormHandler

The ShippingGroupFormHandler is used to associate ShippingGroups with the various Order pieces. This component is used during the Order checkout process, and any Order successfully processed by the ShippingGroupFormHandler is ready for the next checkout phase, which may be Payment.

The ShippingGroupFormHandler is composed of the following containers:
ShippingGroupMapContainer - container for the user's potential ShippingGroups
CommerceItemShippingInfoContainer - container for the user's CommerceItemShippingInfo associations for a particular Order's CommerceItems

There are 3 main handler methods in the ShippingGroupFormHandler, handleSplitShippingInfos, handleApplyShippingGroups and handleSpecifyDefaultShippingGroup:

  1. handleSplitShippingInfos splits extra CommerceItemShippingInfo objects by quantity. In a form the user might request to split 5 of an original CommerceItem quantity of 10 onto a separate ShippingGroup. This will create a separate CommerceItemShippingInfo object, and adjust the quantity of both the original and the new CommerceItemShippingInfo objects to add up to the original CommerceItem quantity.
  2. handleApplyShippingGroups is used when the CommerceItemShippingInfo associations created by the user are ready to be applied to the current Order. The associations are scrutinized and the appropriate business methods are called in the OrderManager family. ShippingGroup validation takes place, via a configurable Pipeline chain.
  3. handleSpecifyDefaultShippingGroup is used to specify a particular default ShippingGroup to be used for CommerceItems that aren't explicitly assigned separate ShippingGroups.

In order to conveniently manipulate ShippingGroups and CommerceItemShippingInfo Lists, you can set the ListId and ShippingGroupId properties. This will automatically expose the corresponding ShippingGroup and List in the CurrentList and CurrentShippingGroup properties.

The CommerceItemShippingInfo associations created by the user are scrutinized and the appropriate business methods are called in the OrderManager family. ShippingGroup validation takes place, via a configurable Pipeline chain.

See Also:
GenericFormHandler, PurchaseProcessFormHandler

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  java.util.List mAllHardgoodCommerceItemShippingInfos
           
protected  CommerceItemShippingInfoTools mCommerceItemShippingInfoTools
           
protected  boolean mConsolidateShippingInfosBeforeApply
           
protected  java.util.List mElectronicShippingGroups
           
static java.lang.String MSG_ERROR_UPDATE_SHIPPINGGROUP
           
static java.lang.String MSG_INVALID_SHIPPING_SPLIT_NUMBER
           
static java.lang.String MSG_NO_DEFAULT_SHIPPING_GROUP
           
protected  boolean mValidateShippingGroups
           
 
Fields inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUE
 
Fields inherited from class atg.droplet.GenericFormHandler
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
 
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
ShippingGroupFormHandler()
          Creates a new ShippingGroupFormHandler instance.
 
Method Summary
protected  void addShippingGroupToMap(ShippingGroup pShippingGroup, java.lang.String pKey)
          Adds a shipping groups to the shipping group map container
protected  void applyCommerceItemShippingInfo(CommerceItemShippingInfo pCommerceItemShippingInfo, Order order)
          Deprecated.  
protected  void applyDefaultShippingGroup(Order pOrder)
          Deprecated.  
 void applyShippingGroups(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          applyShippingGroups removes all non-gift ShippingGroups from the Order and then iterates over the supplied CommerceItemShippingInfos for each of the CommerceItems.
protected  void consolidateShippingInfos(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Deprecated.  
 java.util.List getAllHardgoodCommerceItemShippingInfos()
          Get the List of all the CommerceItemShippingInfos for hardgoods from the CommerceItemShippingInfoMap.
 java.lang.String getApplyShippingGroupsErrorURL()
          Return the ApplyShippingGroupsErrorURL property.
 java.lang.String getApplyShippingGroupsSuccessURL()
          Return the ApplyShippingGroupsSuccessURL property.
 CommerceItemShippingInfoTools getCommerceItemShippingInfoTools()
          Returns the tools component containing the API for modifying CommerceItemShippingInfos
 java.util.List getCurrentList()
          Return the CurrentList property.
 ShippingGroup getCurrentShippingGroup()
          Return the CurrentShippingGroup property.
 java.lang.String getDefaultShippingGroupName()
          Return the DefaultShippingGroupName property.
 java.util.List getElectronicShippingGroups()
          Returns a list of all electronic groups that contain commerce items.
 HardgoodShippingGroup getFirstNonGiftHardgoodShippingGroupWithRels()
          Returns the first non-gift hardgood shipping group with relationships from the order
 java.util.List getGiftShippingGroups()
          Returns a list of all shipping groups that contain gifts.
 java.lang.String getListId()
          Return the ListId property.
 java.util.Locale getLocale()
          Return the Locale property.
 int getNonGiftHardgoodShippingGroupCount()
          Returns the number of non-gift hardgood shipping groups with commerce item relationships
 java.util.List getNonGiftHardgoodShippingGroups()
          Returns the non-gift hardgood shipping groups with commerce item relationships
protected  ShippingGroup getShippingGroup(java.lang.String pShippingGroupId)
          Deprecated.  
 java.lang.String getShippingGroupId()
          Return the ShippingGroupId property.
 ServiceMap getShippingGroupInitializers()
          Return the ShippingGroupInitializers property.
 java.lang.String getSpecifyDefaultShippingGroupErrorURL()
          Return the SpecifyDefaultShippingGroupErrorURL property.
 java.lang.String getSpecifyDefaultShippingGroupSuccessURL()
          Return the SpecifyDefaultShippingGroupSuccessURL property.
 java.lang.String getSplitShippingInfosErrorURL()
          Return the SplitShippingInfosErrorURL property.
 java.lang.String getSplitShippingInfosSuccessURL()
          Return the SplitShippingInfosSuccessURL property.
 java.lang.String getValidateShippingGroupsChainId()
          Return the ValidateShippingGroupsChainId property.
 boolean handleApplyShippingGroups(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          handleApplyShippingGroups is used when the user has supplied the Shipping information for this order, and is ready to proceed with the next checkout phase.
 boolean handleSpecifyDefaultShippingGroup(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          handleSpecifyDefaultShippingGroup is used to let the user specify a default ShippingGroup to use.
 boolean handleSplitShippingInfos(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          handleSplitShippingInfos is used when the user is ready to split a particular CommerceItemShippingInfo by quantity.
 boolean isAnyElectronicShippingGroups()
          Returns true if the order has at least one electronic shipping group with commerce item relationships.
 boolean isAnyHardgoodShippingGroups()
          Returns true if the order has at least one hargood shipping group with commerce item relationships.
 boolean isAnyNonGiftHardgoodShippingGroups()
          Determines if there are any non-gift hardgood shipping groups with relationships
 boolean isApplyDefaultShippingGroup()
          Return the ApplyDefaultShippingGroup property.
 boolean isConsolidateShippingInfosBeforeApply()
           
 boolean isMultipleHardgoodShippingGroupsWithRelationships()
          Returns true if the order has more than one hardgood shipping group with commerce item relationships
 boolean isMultipleNonGiftHardgoodShippingGroups()
          Returns true if the order has more than one non-gift hardgood shipping group with commerce item relationships
protected  boolean isShippingGroupInOrder(Order pOrder, java.lang.String pShippingGroupId)
          Deprecated. This method is moved to ShippingGroupManager.
 boolean isValidateShippingGroups()
          Returns property ValidateShippingGroups.
protected  CommerceItemShippingInfo mergeCommerceItemShippingInfos(CommerceItemShippingInfo cisi1, CommerceItemShippingInfo cisi2)
          Deprecated.  
 void postApplyShippingGroups(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          postApplyShippingGroups is for work that must happen after the ShippingGroups are applied.
 void postSpecifyDefaultShippingGroup(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          postSpecifyDefaultShippingGroup is for work that must happen after the default ShippingGroup is set.
 void postSplitShippingInfos(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          postSplitShippingInfos is for work that must happen after the ShippingGroups are split.
 void preApplyShippingGroups(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          preApplyShippingGroups is for work that must happen before the ShippingGroups are applied.
 void preSpecifyDefaultShippingGroup(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          preSpecifyDefaultShippingGroup is for work that must happen before the default ShippingGroup is set.
 void preSplitShippingInfos(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          preSplitShippingInfos is for work that must happen before the ShippingGroups are split.
protected  void removeShippingGroupFromMap(java.lang.String pKey)
          Removes a shipping group from the shipping group map container
protected  void runProcessValidateShippingGroups(Order pOrder, PricingModelHolder pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
          runProcessValidateShippingGroups runs a configurable Pipeline chain to validate ShippingGroups or prepare for the next checkout phase.
 void setApplyDefaultShippingGroup(boolean pApplyDefaultShippingGroup)
          Set the ApplyDefaultShippingGroup property.
 void setApplyShippingGroupsErrorURL(java.lang.String pApplyShippingGroupsErrorURL)
          Set the ApplyShippingGroupsErrorURL property.
 void setApplyShippingGroupsSuccessURL(java.lang.String pApplyShippingGroupsSuccessURL)
          Set the ApplyShippingGroupsSuccessURL property.
 void setCommerceItemShippingInfoTools(CommerceItemShippingInfoTools pCommerceItemShippingInfoTools)
           
 void setConsolidateShippingInfosBeforeApply(boolean pConsolidateShippingInfosBeforeApply)
          Sets the consolidateShippingInfosBeforeApply property.
 void setCurrentList(java.util.List pCurrentList)
          Set the CurrentList property.
 void setCurrentShippingGroup(ShippingGroup pCurrentShippingGroup)
          Set the CurrentShippingGroup property.
 void setDefaultShippingGroupName(java.lang.String pDefaultShippingGroupName)
          Set the DefaultShippingGroupName property.
 void setListId(java.lang.String pListId)
          Set the ListId property.
 void setLocale(java.util.Locale pLocale)
          Set the Locale property.
 void setShippingGroupId(java.lang.String pShippingGroupId)
          Set the ShippingGroupId property.
 void setShippingGroupInitializers(ServiceMap pShippingGroupInitializers)
          Set the ShippingGroupInitializers property.
 void setSpecifyDefaultShippingGroupErrorURL(java.lang.String pSpecifyDefaultShippingGroupErrorURL)
          Set the SpecifyDefaultShippingGroupErrorURL property.
 void setSpecifyDefaultShippingGroupSuccessURL(java.lang.String pSpecifyDefaultShippingGroupSuccessURL)
          Set the SpecifyDefaultShippingGroupSuccessURL property.
 void setSplitShippingInfosErrorURL(java.lang.String pSplitShippingInfosErrorURL)
          Set the SplitShippingInfosErrorURL property.
 void setSplitShippingInfosSuccessURL(java.lang.String pSplitShippingInfosSuccessURL)
          Set the SplitShippingInfosSuccessURL property.
 void setValidateShippingGroups(boolean pValidateShippingGroups)
          Sets property ValidateShippingGroups
 void setValidateShippingGroupsChainId(java.lang.String pValidateShippingGroupsChainId)
          Set the ValidateShippingGroupsChainId property.
protected  void specifyDefaultShippingGroup(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          specifyDefaultShippingGroup sets the defaultShippingGroupName in the ShippingGroupMapContainer.
protected  void splitCommerceItemShippingInfoByQuantity(CommerceItemShippingInfo pCommerceItemShippingInfo, long pSplitQuantity)
          Deprecated.  
 void splitShippingInfos(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          splitShippingInfos is used to split the quantities for the CommerceItems into different CommerceItemShippingInfos
 
Methods inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler
acquireTransactionLock, acquireTransactionLock, afterSet, beforeSet, checkFormRedirect, commitTransaction, copyConfiguration, createRepriceParameterMap, defaultLocalLockManager, defaultUserProfile, doStartService, ensureTransaction, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getClaimableManager, getCommerceIdentifierPaymentInfoContainer, getCommerceItemManager, getCommerceItemShippingInfoContainer, getCommerceProfileTools, getCommercePropertyManager, getConfiguration, getCurrentTransaction, getDefaultLocale, getGiftlistManager, getHandlingInstructionManager, getLocalLockManager, getOrder, getOrderManager, getPaymentGroupManager, getPaymentGroupMapContainer, getPipelineManager, getPriceList, getPriceListId, getPriceListManager, getProfile, getProfileRepository, getPurchaseProcessHelper, getRepeatingRequestMonitor, getRepriceOrderChainId, getResourceBundle, getResourceBundle, getResourceBundleName, getSessionExpirationURL, getShippingGroupManager, getShippingGroupMapContainer, getShoppingCart, getTransactionManager, getUserLocale, getUserLocale, getUserPricingModels, handlePipelineError, isEnsureTransaction, isFormSubmission, isTransactionCreated, isTransactionMarkedAsRollBack, isUseLocksAroundTransactions, isUseRequestLocale, processException, processPipelineErrors, releaseTransactionLock, releaseTransactionLock, runProcess, runProcess, runProcess, runProcessRepriceOrder, runProcessRepriceOrder, runRepricingProcess, setClaimableManager, setCommerceIdentifierPaymentInfoContainer, setCommerceItemManager, setCommerceItemShippingInfoContainer, setCommerceProfileTools, setCommercePropertyManager, setConfiguration, setCurrentTransaction, setDefaultLocale, setEnsureTransaction, setGiftlistManager, setHandlingInstructionManager, setLocalLockManager, setOrder, setOrderManager, setPaymentGroupManager, setPaymentGroupMapContainer, setPipelineManager, setPriceListId, setPriceListManager, setProfile, setProfileRepository, setPurchaseProcessHelper, setRepeatingRequestMonitor, setRepriceOrderChainId, setSessionExpirationURL, setShippingGroupManager, setShippingGroupMapContainer, setShoppingCart, setTransactionCreated, setTransactionManager, setTransactionToRollbackOnly, setUseLocksAroundTransactions, setUseRequestLocale, setUserLocale, setUserPricingModels, 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.droplet.EmptyFormHandler
afterGet, beforeGet
 
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
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


MSG_INVALID_SHIPPING_SPLIT_NUMBER

public static final java.lang.String MSG_INVALID_SHIPPING_SPLIT_NUMBER
See Also:
Constant Field Values

MSG_ERROR_UPDATE_SHIPPINGGROUP

public static final java.lang.String MSG_ERROR_UPDATE_SHIPPINGGROUP
See Also:
Constant Field Values

MSG_NO_DEFAULT_SHIPPING_GROUP

public static final java.lang.String MSG_NO_DEFAULT_SHIPPING_GROUP
See Also:
Constant Field Values

mCommerceItemShippingInfoTools

protected CommerceItemShippingInfoTools mCommerceItemShippingInfoTools

mConsolidateShippingInfosBeforeApply

protected boolean mConsolidateShippingInfosBeforeApply

mValidateShippingGroups

protected boolean mValidateShippingGroups

mElectronicShippingGroups

protected java.util.List mElectronicShippingGroups

mAllHardgoodCommerceItemShippingInfos

protected java.util.List mAllHardgoodCommerceItemShippingInfos
Constructor Detail

ShippingGroupFormHandler

public ShippingGroupFormHandler()
Creates a new ShippingGroupFormHandler instance.

Method Detail

getCommerceItemShippingInfoTools

public CommerceItemShippingInfoTools getCommerceItemShippingInfoTools()
Returns the tools component containing the API for modifying CommerceItemShippingInfos

Returns:

setCommerceItemShippingInfoTools

public void setCommerceItemShippingInfoTools(CommerceItemShippingInfoTools pCommerceItemShippingInfoTools)

setShippingGroupInitializers

public void setShippingGroupInitializers(ServiceMap pShippingGroupInitializers)
Set the ShippingGroupInitializers property.

Parameters:
pShippingGroupInitializers - a ServiceMap value

getShippingGroupInitializers

public ServiceMap getShippingGroupInitializers()
Return the ShippingGroupInitializers property.

Returns:
a ServiceMap value

isConsolidateShippingInfosBeforeApply

public boolean isConsolidateShippingInfosBeforeApply()
Returns:
Returns the consolidateShippingInfosBeforeApply.

setConsolidateShippingInfosBeforeApply

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.

Parameters:
pConsolidateShippingInfosBeforeApply - The consolidateShippingInfosBeforeApply to set.
See Also:
consolidateShippingInfos(DynamoHttpServletRequest, DynamoHttpServletResponse)

setValidateShippingGroups

public void setValidateShippingGroups(boolean pValidateShippingGroups)
Sets property ValidateShippingGroups


isValidateShippingGroups

public boolean isValidateShippingGroups()
Returns property ValidateShippingGroups.


setListId

public void setListId(java.lang.String pListId)
Set the ListId property.

Sets the currentList property to the list of commerce item infos mapped by the listId.

Parameters:
pListId - a String value. The commerce item id used to look up the list of commerce item infos in the commerceItemShippingInfoContainer. If pListId is null or empty the current list is set to all commerce item infos in the container.
See Also:
CommerceItemShippingInfoContainer.getAllCommerceItemShippingInfos()

getListId

public java.lang.String getListId()
Return the ListId property.

Returns:
a String value

setCurrentList

public void setCurrentList(java.util.List pCurrentList)
Set the CurrentList property.

Parameters:
pCurrentList - a List value

getCurrentList

public java.util.List getCurrentList()
Return the CurrentList property.

Returns:
a List value

setShippingGroupId

public void setShippingGroupId(java.lang.String pShippingGroupId)
Set the ShippingGroupId property.

Parameters:
pShippingGroupId - a String value

getShippingGroupId

public java.lang.String getShippingGroupId()
Return the ShippingGroupId property.

Returns:
a String value

setCurrentShippingGroup

public void setCurrentShippingGroup(ShippingGroup pCurrentShippingGroup)
Set the CurrentShippingGroup property.

Parameters:
pCurrentShippingGroup - a ShippingGroup value

getCurrentShippingGroup

public ShippingGroup getCurrentShippingGroup()
Return the CurrentShippingGroup property.

Returns:
a ShippingGroup value

setApplyShippingGroupsSuccessURL

public void setApplyShippingGroupsSuccessURL(java.lang.String pApplyShippingGroupsSuccessURL)
Set the ApplyShippingGroupsSuccessURL property.

Parameters:
pApplyShippingGroupsSuccessURL - a String value

getApplyShippingGroupsSuccessURL

public java.lang.String getApplyShippingGroupsSuccessURL()
Return the ApplyShippingGroupsSuccessURL property.

Returns:
a String value

setApplyShippingGroupsErrorURL

public void setApplyShippingGroupsErrorURL(java.lang.String pApplyShippingGroupsErrorURL)
Set the ApplyShippingGroupsErrorURL property.

Parameters:
pApplyShippingGroupsErrorURL - a String value

getApplyShippingGroupsErrorURL

public java.lang.String getApplyShippingGroupsErrorURL()
Return the ApplyShippingGroupsErrorURL property.

Returns:
a String value

setSplitShippingInfosSuccessURL

public void setSplitShippingInfosSuccessURL(java.lang.String pSplitShippingInfosSuccessURL)
Set the SplitShippingInfosSuccessURL property.

Parameters:
pSplitShippingInfosSuccessURL - a String value

getSplitShippingInfosSuccessURL

public java.lang.String getSplitShippingInfosSuccessURL()
Return the SplitShippingInfosSuccessURL property.

Returns:
a String value

setSplitShippingInfosErrorURL

public void setSplitShippingInfosErrorURL(java.lang.String pSplitShippingInfosErrorURL)
Set the SplitShippingInfosErrorURL property.

Parameters:
pSplitShippingInfosErrorURL - a String value

getSplitShippingInfosErrorURL

public java.lang.String getSplitShippingInfosErrorURL()
Return the SplitShippingInfosErrorURL property.

Returns:
a String value

setSpecifyDefaultShippingGroupErrorURL

public void setSpecifyDefaultShippingGroupErrorURL(java.lang.String pSpecifyDefaultShippingGroupErrorURL)
Set the SpecifyDefaultShippingGroupErrorURL property.

Parameters:
pSpecifyDefaultShippingGroupErrorURL - a String value

getSpecifyDefaultShippingGroupErrorURL

public java.lang.String getSpecifyDefaultShippingGroupErrorURL()
Return the SpecifyDefaultShippingGroupErrorURL property.

Returns:
a String value

setSpecifyDefaultShippingGroupSuccessURL

public void setSpecifyDefaultShippingGroupSuccessURL(java.lang.String pSpecifyDefaultShippingGroupSuccessURL)
Set the SpecifyDefaultShippingGroupSuccessURL property.

Parameters:
pSpecifyDefaultShippingGroupSuccessURL - a String value

getSpecifyDefaultShippingGroupSuccessURL

public java.lang.String getSpecifyDefaultShippingGroupSuccessURL()
Return the SpecifyDefaultShippingGroupSuccessURL property.

Returns:
a String value

setDefaultShippingGroupName

public void setDefaultShippingGroupName(java.lang.String pDefaultShippingGroupName)
Set the DefaultShippingGroupName property.

Parameters:
pDefaultShippingGroupName - a String value

getDefaultShippingGroupName

public java.lang.String getDefaultShippingGroupName()
Return the DefaultShippingGroupName property.

Returns:
a String value

setApplyDefaultShippingGroup

public void setApplyDefaultShippingGroup(boolean pApplyDefaultShippingGroup)
Set the ApplyDefaultShippingGroup property.

Parameters:
pApplyDefaultShippingGroup - a boolean value

isApplyDefaultShippingGroup

public boolean isApplyDefaultShippingGroup()
Return the ApplyDefaultShippingGroup property.

Returns:
a boolean value

setLocale

public void setLocale(java.util.Locale pLocale)
Set the Locale property.

Parameters:
pLocale - a Locale value

getLocale

public java.util.Locale getLocale()
Return the Locale property.

Returns:
a Locale value

setValidateShippingGroupsChainId

public void setValidateShippingGroupsChainId(java.lang.String pValidateShippingGroupsChainId)
Set the ValidateShippingGroupsChainId property.

Parameters:
pValidateShippingGroupsChainId - a String value

getValidateShippingGroupsChainId

public java.lang.String getValidateShippingGroupsChainId()
Return the ValidateShippingGroupsChainId property.

Returns:
a String value

handleApplyShippingGroups

public boolean handleApplyShippingGroups(DynamoHttpServletRequest pRequest,
                                         DynamoHttpServletResponse pResponse)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException
handleApplyShippingGroups is used when the user has supplied the Shipping information for this order, and is ready to proceed with the next checkout phase.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
a boolean value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

preApplyShippingGroups

public void preApplyShippingGroups(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
preApplyShippingGroups is for work that must happen before the ShippingGroups are applied.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postApplyShippingGroups

public void postApplyShippingGroups(DynamoHttpServletRequest pRequest,
                                    DynamoHttpServletResponse pResponse)
                             throws javax.servlet.ServletException,
                                    java.io.IOException
postApplyShippingGroups is for work that must happen after the ShippingGroups are applied.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

applyShippingGroups

public void applyShippingGroups(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse)
                         throws javax.servlet.ServletException,
                                java.io.IOException
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.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

applyCommerceItemShippingInfo

protected void applyCommerceItemShippingInfo(CommerceItemShippingInfo pCommerceItemShippingInfo,
                                             Order order)
Deprecated. 

applyCommerceItemShippingInfo get the Relatonship type from the CommerceItemShippingInfo then invoke the business logic in CommerceItemManager to update the order.

Parameters:
pCommerceItemShippingInfo - a CommerceItemShippingInfo value
order - an Order value
See Also:
CommerceItemShippingInfoTools.applyCommerceItemShippingInfo(CommerceItemShippingInfo, Order, ShippingGroupMapContainer)

applyDefaultShippingGroup

protected void applyDefaultShippingGroup(Order pOrder)
Deprecated. 

applyDefaultShippingGroup checks to see if there is a defaultShippingGroup. If so, this ShippingGroup is added to the remaining quantity of each CommerceItem whose quantity is not already fully assigned to ShippingGroups.

Parameters:
pOrder - an Order value
See Also:
CommerceItemShippingInfoTools.applyDefaultShippingGroup(Order, ShippingGroupMapContainer)

isShippingGroupInOrder

protected boolean isShippingGroupInOrder(Order pOrder,
                                         java.lang.String pShippingGroupId)
Deprecated. This method is moved to ShippingGroupManager.

isShippingGroupInOrder is used to determine if the ShippingGroup is already in the Order.

Parameters:
pOrder - an Order value
pShippingGroupId - a String value
Returns:
a boolean value

getShippingGroup

protected ShippingGroup getShippingGroup(java.lang.String pShippingGroupId)
Deprecated. 

getShippingGroup gets the ShippingGroup with the given name from the ShippingGroupMapContainer.

Parameters:
pShippingGroupId - a String value
Returns:
a ShippingGroup value
See Also:
CommerceItemShippingInfoTools.getShippingGroup(ShippingGroupMapContainer, String)

handleSplitShippingInfos

public boolean handleSplitShippingInfos(DynamoHttpServletRequest pRequest,
                                        DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
handleSplitShippingInfos is used when the user is ready to split a particular CommerceItemShippingInfo by quantity.

Parameters:
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
a boolean value
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io

preSplitShippingInfos

public void preSplitShippingInfos(DynamoHttpServletRequest pRequest,
                                  DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
preSplitShippingInfos is for work that must happen before the ShippingGroups are split.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postSplitShippingInfos

public void postSplitShippingInfos(DynamoHttpServletRequest pRequest,
                                   DynamoHttpServletResponse pResponse)
                            throws javax.servlet.ServletException,
                                   java.io.IOException
postSplitShippingInfos is for work that must happen after the ShippingGroups are split.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

splitShippingInfos

public void splitShippingInfos(DynamoHttpServletRequest pRequest,
                               DynamoHttpServletResponse pResponse)
                        throws javax.servlet.ServletException,
                               java.io.IOException
splitShippingInfos is used to split the quantities for the CommerceItems into different CommerceItemShippingInfos

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

consolidateShippingInfos

protected void consolidateShippingInfos(DynamoHttpServletRequest pRequest,
                                        DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Deprecated. 

consolidateShippingInfos consolidates CommerceItemShippingInfos by ensuring there is no redundant data.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
See Also:
CommerceItemShippingInfoTools.consolidateShippingInfos(CommerceItemShippingInfoContainer)

mergeCommerceItemShippingInfos

protected CommerceItemShippingInfo mergeCommerceItemShippingInfos(CommerceItemShippingInfo cisi1,
                                                                  CommerceItemShippingInfo cisi2)
Deprecated. 

mergeCommerceItemShippingInfos merges 2 CommerceItemShippingInfos into one by combining their quantities.

Parameters:
cisi1 - a CommerceItemShippingInfo value
cisi2 - a CommerceItemShippingInfo value
Returns:
a CommerceItemShippingInfo value

splitCommerceItemShippingInfoByQuantity

protected void splitCommerceItemShippingInfoByQuantity(CommerceItemShippingInfo pCommerceItemShippingInfo,
                                                       long pSplitQuantity)
Deprecated. 

splitCommerceItemShippingInfoByQuantity splits a CommerceItemShippingInfo by quantity.

Parameters:
pCommerceItemShippingInfo - a CommerceItemShippingInfo value
pSplitQuantity - a long value
See Also:
CommerceItemShippingInfoTools.splitCommerceItemShippingInfoByQuantity(CommerceItemShippingInfoContainer, CommerceItemShippingInfo, long), CommerceItemShippingInfoTools.splitCommerceItemShippingInfoByQuantity(CommerceItemShippingInfoContainer, CommerceItemShippingInfo, long)

runProcessValidateShippingGroups

protected void runProcessValidateShippingGroups(Order pOrder,
                                                PricingModelHolder pPricingModels,
                                                java.util.Locale pLocale,
                                                RepositoryItem pProfile,
                                                java.util.Map pExtraParameters)
                                         throws RunProcessException
runProcessValidateShippingGroups runs a configurable Pipeline chain to validate ShippingGroups or prepare for the next checkout phase.

Parameters:
pOrder - an Order value
pPricingModels - a PricingModelHolder value
pLocale - a Locale value
pProfile - a RepositoryItem value
pExtraParameters - a Map value
Throws:
RunProcessException - if an error occurs

handleSpecifyDefaultShippingGroup

public boolean handleSpecifyDefaultShippingGroup(DynamoHttpServletRequest pRequest,
                                                 DynamoHttpServletResponse pResponse)
                                          throws javax.servlet.ServletException,
                                                 java.io.IOException
handleSpecifyDefaultShippingGroup is used to let the user specify a default ShippingGroup to use.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Returns:
a boolean value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

preSpecifyDefaultShippingGroup

public void preSpecifyDefaultShippingGroup(DynamoHttpServletRequest pRequest,
                                           DynamoHttpServletResponse pResponse)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException
preSpecifyDefaultShippingGroup is for work that must happen before the default ShippingGroup is set.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

postSpecifyDefaultShippingGroup

public void postSpecifyDefaultShippingGroup(DynamoHttpServletRequest pRequest,
                                            DynamoHttpServletResponse pResponse)
                                     throws javax.servlet.ServletException,
                                            java.io.IOException
postSpecifyDefaultShippingGroup is for work that must happen after the default ShippingGroup is set.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs

specifyDefaultShippingGroup

protected void specifyDefaultShippingGroup(DynamoHttpServletRequest pRequest,
                                           DynamoHttpServletResponse pResponse)
                                    throws javax.servlet.ServletException,
                                           java.io.IOException
specifyDefaultShippingGroup sets the defaultShippingGroupName in the ShippingGroupMapContainer.

Parameters:
pRequest - a DynamoHttpServletRequest value
pResponse - a DynamoHttpServletResponse value
Throws:
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
See Also:
CommerceItemShippingInfoTools.specifyDefaultShippingGroup(ShippingGroupMapContainer, String)

removeShippingGroupFromMap

protected void removeShippingGroupFromMap(java.lang.String pKey)
Removes a shipping group from the shipping group map container

Parameters:
pShippingGroup -
pKey -

addShippingGroupToMap

protected void addShippingGroupToMap(ShippingGroup pShippingGroup,
                                     java.lang.String pKey)
Adds a shipping groups to the shipping group map container

Parameters:
pShippingGroup -
pKey -

getGiftShippingGroups

public java.util.List getGiftShippingGroups()
Returns a list of all shipping groups that contain gifts.

Returns:

getElectronicShippingGroups

public java.util.List getElectronicShippingGroups()
Returns a list of all electronic groups that contain commerce items.

Returns:

getNonGiftHardgoodShippingGroupCount

public int getNonGiftHardgoodShippingGroupCount()
Returns the number of non-gift hardgood shipping groups with commerce item relationships

Returns:
the number of non-empty non-gift hardgood shipping groups

isAnyHardgoodShippingGroups

public boolean isAnyHardgoodShippingGroups()
Returns true if the order has at least one hargood shipping group with commerce item relationships. Both non-gift and gift shipping groups are considered.

Returns:
boolean true if the order has at least one non-empty hardgood shipping group.

isAnyElectronicShippingGroups

public boolean isAnyElectronicShippingGroups()
Returns true if the order has at least one electronic shipping group with commerce item relationships.

Returns:
boolean true if the order has at least one non-empty hardgood shipping group.

isMultipleNonGiftHardgoodShippingGroups

public boolean isMultipleNonGiftHardgoodShippingGroups()
Returns true if the order has more than one non-gift hardgood shipping group with commerce item relationships

Returns:
boolean true if the order has more than one non-gift hardgood shipping group.

isMultipleHardgoodShippingGroupsWithRelationships

public boolean isMultipleHardgoodShippingGroupsWithRelationships()
Returns true if the order has more than one hardgood shipping group with commerce item relationships

Returns:
boolean true if the order has more than one hardgood shipping group.

isAnyNonGiftHardgoodShippingGroups

public boolean isAnyNonGiftHardgoodShippingGroups()
Determines if there are any non-gift hardgood shipping groups with relationships

Returns:
true if any non-gift hardgood shipping groups with relationships are found

getNonGiftHardgoodShippingGroups

public java.util.List getNonGiftHardgoodShippingGroups()
Returns the non-gift hardgood shipping groups with commerce item relationships


getFirstNonGiftHardgoodShippingGroupWithRels

public HardgoodShippingGroup getFirstNonGiftHardgoodShippingGroupWithRels()
Returns the first non-gift hardgood shipping group with relationships from the order

Returns:
the first non-gift hardgood shipping group or null if there isn't one.

getAllHardgoodCommerceItemShippingInfos

public java.util.List getAllHardgoodCommerceItemShippingInfos()
Get the List of all the CommerceItemShippingInfos for hardgoods from the CommerceItemShippingInfoMap. If a CommerceItemShippingInfo has no shipping group, assume the item represents hardgoods.

Returns:
a List value