This parameter is the default seleted shipping group nickname.
- See Also:
-- This FormHandler resets USER_SELECTED_SHIP_TO_NICKNAME based on the result of add address operation.
,
This droplet initializes ShippingGroupMapContainer
Fields inherited from class atg.servlet.DynamoServlet |
mAllowCleanupRequest, mParameters |
Fields inherited from class atg.nucleus.servlet.ServletService |
SERVLET_INFO_KEY |
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 |
Method Summary |
void |
addNewAddressShippingMethod(java.util.Map pShippingMethods,
atg.commerce.order.ShippingGroup pShippingGroup)
This method adds the shipping method to the ShippingMethods map. |
protected void |
copyConfiguration()
Copy property settings from the optional
PurchaseProcessConfiguration component. |
void |
doStartService()
Perform one-time startup operations, including copying property
settings from the optional PurchaseProcessConfiguration
component. |
java.lang.String |
firstValidAddressNickname(java.util.Map pShippingGroupMap)
This method returns first non null address's (HardgoodShippingGroup) key or nickname. |
java.util.HashMap |
generateShippingMethods(java.util.Map pShippingGroups,
atg.servlet.DynamoHttpServletRequest pRequest)
This method collects all the available shipping methods for each addresses or shipping groups. |
java.util.List |
getAvailableMethods(atg.commerce.order.ShippingGroup pShippingGroup)
This method provides the list of all available shipping methods by the shipping group. |
atg.commerce.order.purchase.PurchaseProcessConfiguration |
getConfiguration()
Returns property Configuration |
java.lang.Object |
getInputParameter(atg.servlet.DynamoHttpServletRequest pReq,
atg.nucleus.naming.ParameterName pInputParamter)
Gets the input parameter values. |
java.lang.String |
getNewAddressNickname()
|
atg.commerce.order.ShippingGroup |
getNewShippingGroup()
|
atg.commerce.order.Order |
getOrder()
Return the Order property. |
atg.userprofiling.Profile |
getProfile()
Return the Profile property. |
atg.nucleus.ServiceMap |
getShippingGroupInitializers()
|
atg.commerce.order.ShippingGroupManager |
getShippingGroupManager()
|
atg.commerce.order.purchase.ShippingGroupMapContainer |
getShippingGroupMapContainer()
Return the ShippingGroupMapContainer property. |
atg.commerce.pricing.ShippingPricingEngine |
getShippingPricingEngine()
the shipping pricing engine to consult for available shipping methods |
protected java.util.Locale |
getUserLocale(atg.servlet.DynamoHttpServletRequest pRequest)
Returns the locale associated with the request. |
atg.commerce.pricing.PricingModelHolder |
getUserPricingModels()
Returns property UserPricingModels |
java.lang.String |
getUserSelectedShipToNickname()
|
atg.commerce.order.ShippingGroup |
getValidHardGoodShippingGroup(atg.commerce.order.HardgoodShippingGroup pShippingGroup)
This methods checks the instance and if the null instance is passed in, it will return new HardgoodShippingGroup
object. |
protected void |
initializeRequestParameters(atg.servlet.DynamoHttpServletRequest pRequest)
The initializeRequestParameters method gathers the necessary
input parameters and uses them to adjust initialization requirements. |
boolean |
isNullAddress(atg.core.util.Address pAddress)
Query whether an Address object is null or empty. |
boolean |
isSelectDefaultFromOrder()
Returns the selectDefaultFromOrder. |
boolean |
isServeNewAddressParamter()
|
protected java.lang.String |
obtainApplicationSelectedShippingGroupNickname()
This method returns a user's default shipping group nickname or first available shipping group nickname from
ShippingGroupMapContainer. |
java.lang.String |
selectOrderAddress()
This method loops through shipping groups in the order and finds the nickname of a shipping group in the order. |
void |
serveNewAddressParameter(java.lang.String pSelectedShipToNickname,
atg.commerce.order.ShippingGroup pNewShippingGroup,
atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This method serves the newAddress parameter. |
java.lang.String |
serveOutputParameter(java.lang.String pSelectedShipToNickname,
atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This method serves the output paramter. |
void |
service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This method serves output/error and newAddress parameter. |
void |
setConfiguration(atg.commerce.order.purchase.PurchaseProcessConfiguration pConfiguration)
Sets property Configuration |
void |
setNewAddressNickname(java.lang.String pNewAddressNickname)
|
void |
setNewShippingGroup(atg.commerce.order.ShippingGroup pNewShippingGroup)
|
void |
setOrder(atg.commerce.order.Order pOrder)
Set the Order property. |
void |
setProfile(atg.userprofiling.Profile pProfile)
Set the Profile property. |
void |
setSelectDefaultFromOrder(boolean pSelectDefaultFromOrder)
Sets the selectDefaultFromOrder. |
void |
setServeNewAddressParamter(boolean pServeNewAddressParamter)
|
void |
setShippingGroupInitializers(atg.nucleus.ServiceMap pShippingGroupInitializers)
|
void |
setShippingGroupManager(atg.commerce.order.ShippingGroupManager pShippingGroupManager)
|
void |
setShippingGroupMapContainer(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
Set the ShippingGroupMapContainer property. |
void |
setShippingPricingEngine(atg.commerce.pricing.ShippingPricingEngine pShippingPricingEngine)
the shipping pricing engine to consult for available shipping methods |
void |
setUserPricingModels(atg.commerce.pricing.PricingModelHolder pUserPricingModels)
Sets property UserPricingModels |
void |
setUserSelectedShipToNickname(java.lang.String pUserSelectedShipToNickname)
|
java.util.Map |
supplyValidAddresses(java.util.Map pAddressMap)
This method creates a temporary map and adds only non null addresses to the temporary map. |
Methods inherited from class atg.servlet.DynamoServlet |
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter |
Methods inherited from class atg.nucleus.servlet.ServletService |
destroy, getServletConfig, getServletInfo, init, setServletInfo |
Methods inherited from class atg.nucleus.TimedOperationService |
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics |
Methods inherited from class atg.nucleus.GenericService |
addLogListener, createAdminServlet, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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 |
CLASS_VERSION
public static java.lang.String CLASS_VERSION
ZERO
public static final int ZERO
- See Also:
- Constant Field Values
ORDER
public static final java.lang.String ORDER
- See Also:
- Constant Field Values
USER_SELECTED_SHIP_TO_NICKNAME
public static final atg.nucleus.naming.ParameterName USER_SELECTED_SHIP_TO_NICKNAME
NEW_SHIPPING_GROUP
public static final atg.nucleus.naming.ParameterName NEW_SHIPPING_GROUP
LOCALE_PARAM
public static final atg.nucleus.naming.ParameterName LOCALE_PARAM
SELECT_DEFAULT_FROM_ORDER
public static final atg.nucleus.naming.ParameterName SELECT_DEFAULT_FROM_ORDER
OUTPUT
public static final atg.nucleus.naming.ParameterName OUTPUT
ERROR
public static final atg.nucleus.naming.ParameterName ERROR
NEW_ADDRESS
public static final atg.nucleus.naming.ParameterName NEW_ADDRESS
SELECTED_SHIPPING_GROUP_NICKNAME
public static final java.lang.String SELECTED_SHIPPING_GROUP_NICKNAME
- See Also:
- Constant Field Values
SELECTED_SHIPPING_GROUP
public static final java.lang.String SELECTED_SHIPPING_GROUP
- See Also:
- Constant Field Values
SHIPPING_GROUPS
public static final java.lang.String SHIPPING_GROUPS
- See Also:
- Constant Field Values
SHIPPING_METHODS
public static final java.lang.String SHIPPING_METHODS
- See Also:
- Constant Field Values
CurrentShippingGroupSelectionDroplet
public CurrentShippingGroupSelectionDroplet()
isSelectDefaultFromOrder
public boolean isSelectDefaultFromOrder()
- Returns the selectDefaultFromOrder.
- Returns:
- selectDefaultFromOrder
setSelectDefaultFromOrder
public void setSelectDefaultFromOrder(boolean pSelectDefaultFromOrder)
- Sets the selectDefaultFromOrder.
- Parameters:
pSelectDefaultFromOrder
-
getShippingGroupInitializers
public atg.nucleus.ServiceMap getShippingGroupInitializers()
- Returns:
- the shippingGroupInitializers
setShippingGroupInitializers
public void setShippingGroupInitializers(atg.nucleus.ServiceMap pShippingGroupInitializers)
- Parameters:
pShippingGroupInitializers
- The shippingGroupInitializers to set.
getShippingGroupManager
public atg.commerce.order.ShippingGroupManager getShippingGroupManager()
- Returns:
- the shippingGroupManager
setShippingGroupManager
public void setShippingGroupManager(atg.commerce.order.ShippingGroupManager pShippingGroupManager)
- Parameters:
pShippingGroupManager
- The shippingGroupManager to set.
getNewShippingGroup
public atg.commerce.order.ShippingGroup getNewShippingGroup()
- Returns:
- the newShippingGroup
setNewShippingGroup
public void setNewShippingGroup(atg.commerce.order.ShippingGroup pNewShippingGroup)
- Parameters:
pNewShippingGroup
- The newShippingGroup to set.
getUserSelectedShipToNickname
public java.lang.String getUserSelectedShipToNickname()
- Returns:
- the userSelectedShipToNickname
setUserSelectedShipToNickname
public void setUserSelectedShipToNickname(java.lang.String pUserSelectedShipToNickname)
- Parameters:
pUserSelectedShipToNickname
- The userSelectedShipToNickname to set.
setConfiguration
public void setConfiguration(atg.commerce.order.purchase.PurchaseProcessConfiguration pConfiguration)
- Sets property Configuration
- Parameters:
pConfiguration
- a PurchaseProcessConfiguration
value
getConfiguration
public atg.commerce.order.purchase.PurchaseProcessConfiguration getConfiguration()
- Returns property Configuration
- Returns:
- a
PurchaseProcessConfiguration
value
setProfile
public void setProfile(atg.userprofiling.Profile pProfile)
- Set the Profile property.
- Parameters:
pProfile
- a Profile
value
getProfile
public atg.userprofiling.Profile getProfile()
- Return the Profile property.
- Returns:
- a
Profile
value
setOrder
public void setOrder(atg.commerce.order.Order pOrder)
- Set the Order property.
- Parameters:
pOrder
- an Order
value
getOrder
public atg.commerce.order.Order getOrder()
- Return the Order property.
- Returns:
- an
Order
value
setShippingGroupMapContainer
public void setShippingGroupMapContainer(atg.commerce.order.purchase.ShippingGroupMapContainer pShippingGroupMapContainer)
- Set the ShippingGroupMapContainer property.
- Parameters:
pShippingGroupMapContainer
- a ShippingGroupMapContainer
value
getShippingGroupMapContainer
public atg.commerce.order.purchase.ShippingGroupMapContainer getShippingGroupMapContainer()
- Return the ShippingGroupMapContainer property.
- Returns:
- a
ShippingGroupMapContainer
value
setUserPricingModels
public void setUserPricingModels(atg.commerce.pricing.PricingModelHolder pUserPricingModels)
- Sets property UserPricingModels
getUserPricingModels
public atg.commerce.pricing.PricingModelHolder getUserPricingModels()
- Returns property UserPricingModels
setShippingPricingEngine
public void setShippingPricingEngine(atg.commerce.pricing.ShippingPricingEngine pShippingPricingEngine)
- the shipping pricing engine to consult for available shipping methods
- Parameters:
pShippingPricingEngine
- new value to set
getShippingPricingEngine
public atg.commerce.pricing.ShippingPricingEngine getShippingPricingEngine()
- the shipping pricing engine to consult for available shipping methods
- Returns:
- property ShippingPricingEngine
getNewAddressNickname
public java.lang.String getNewAddressNickname()
- Returns:
- Returns the newAddressNickname.
setNewAddressNickname
public void setNewAddressNickname(java.lang.String pNewAddressNickname)
- Parameters:
pNewAddressNickname
- The newAddressNickname to set.
isServeNewAddressParamter
public boolean isServeNewAddressParamter()
- Returns:
- Returns the serveNewAddressParamter.
setServeNewAddressParamter
public void setServeNewAddressParamter(boolean pServeNewAddressParamter)
- Parameters:
pServeNewAddressParamter
- The serveNewAddressParamter to set.
doStartService
public void doStartService()
throws atg.nucleus.ServiceException
- Perform one-time startup operations, including copying property
settings from the optional
PurchaseProcessConfiguration
component.
- Overrides:
doStartService
in class atg.nucleus.GenericService
- Throws:
atg.nucleus.ServiceException
service
public void service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
- This method serves output/error and newAddress parameter.
1) If the application could not find any shipping groups for an user, then this method will serve the error parameter.
2) The output parameter is served if the application finds any shipping group in the ShippingGroupMapContainer.
The ShippingGroupMapContainer is initialized by the ShippingGroupDroplet. This droplet will be used in conjunction
with ShippingGroupDroplet or some application that initializes ShippingGroupMapContainer.
3) Also this method serves newAddress parameter. Using serveNewAddressParamter flag property, customers can decide wheter to serve or not to
serve newAddress parameter. This parameter is served to add new address with other already available addresses.
- Overrides:
service
in class atg.servlet.DynamoServlet
- Parameters:
pRequest
- pResponse
-
- Throws:
javax.servlet.ServletException
java.io.IOException
getInputParameter
public java.lang.Object getInputParameter(atg.servlet.DynamoHttpServletRequest pReq,
atg.nucleus.naming.ParameterName pInputParamter)
- Gets the input parameter values.
- Parameters:
DynamoHttpServletRequest
- String
-
- Returns:
- Input paramter value
initializeRequestParameters
protected void initializeRequestParameters(atg.servlet.DynamoHttpServletRequest pRequest)
- The
initializeRequestParameters
method gathers the necessary
input parameters and uses them to adjust initialization requirements.
- Parameters:
pRequest
- a DynamoHttpServletRequest
value
serveOutputParameter
public java.lang.String serveOutputParameter(java.lang.String pSelectedShipToNickname,
atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
- This method serves the output paramter.
- Parameters:
pSelectedShipToNickname
- pShippingMethods
- pRequest
- pResponse
-
- Throws:
javax.servlet.ServletException
java.io.IOException
serveNewAddressParameter
public void serveNewAddressParameter(java.lang.String pSelectedShipToNickname,
atg.commerce.order.ShippingGroup pNewShippingGroup,
atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
- This method serves the newAddress parameter. There are three variations of newAddress parameter is served.
1) If the user did not select anything or the page is served for the very first time. This time newAddress paramter
is served and available shippingMethods for that ShippingGroup is added to the shippingMethods map
2) If the user already tried to add new address and it is unsuccessful. At this time, the user may have entered some invalid
information or selected proper shipping methods. Thus use the shipping group created by the user to fetch its available methods
3) If the user did not enter any information on the Add address section and for some reason, they came to same page and they already selected
a valid shipping group.
- Parameters:
pSelectedShipToNickname
- pNewShippingGroupInstance
- pShippingMethods
- pRequest
- pResponse
-
- Throws:
javax.servlet.ServletException
java.io.IOException
copyConfiguration
protected void copyConfiguration()
- Copy property settings from the optional
PurchaseProcessConfiguration
component. Property
values that were configured locally are preserved.
Configures the following properties (if not already set):
- profile
- shippingGroupMapContainer
- shippingGroupManager
obtainApplicationSelectedShippingGroupNickname
protected java.lang.String obtainApplicationSelectedShippingGroupNickname()
- This method returns a user's default shipping group nickname or first available shipping group nickname from
ShippingGroupMapContainer. First this method checks to see if there is any user's desired default address. If there
is any default address is available, then it will return the default shipping group nick name. If the user does not
have any default shipping address, then this method will return the first shipping group from the shipping group map.
Since this is coming from map, always it may not return the same address nickname.
- Returns:
- String User's default shipping group nickname or first shipping group nickname from ShippingGroupMap
selectOrderAddress
public java.lang.String selectOrderAddress()
This method loops through shipping groups in the order and finds the nickname of a shipping group in the order.
If there is a valid nickname found, then the shipping group is selected as default selection.
generateShippingMethods
public java.util.HashMap generateShippingMethods(java.util.Map pShippingGroups,
atg.servlet.DynamoHttpServletRequest pRequest)
- This method collects all the available shipping methods for each addresses or shipping groups.
This method returns a map which contains ShippingGroupName as the key and available method as value.
- Parameters:
HashMap
- Shipping Groups
- Returns:
- HashMap ShippingMethods
getUserLocale
protected java.util.Locale getUserLocale(atg.servlet.DynamoHttpServletRequest pRequest)
- Returns the locale associated with the request. The method first searches
for a request paramater named
locale
. This value can be
either a java.util.Locale object or a String which represents the locale.
Next if the useRequestLocale
property is true, then the locale
of the request will be returned. Finally, if the locale cannot be determined,
the the defaultLocale
property is used.
- Parameters:
pRequest
- the request to be processed
- Returns:
- the locale to be associated with this user
- Throws:
javax.servlet.ServletException
- an application specific error occurred
processing this request
java.io.IOException
- an error occurred reading data from the request
or writing data to the response.
getValidHardGoodShippingGroup
public atg.commerce.order.ShippingGroup getValidHardGoodShippingGroup(atg.commerce.order.HardgoodShippingGroup pShippingGroup)
- This methods checks the instance and if the null instance is passed in, it will return new HardgoodShippingGroup
object.
- Parameters:
pShippingGroup
- This instance may be null or not null
- Returns:
- HardgoodShippingGroup if the shipping group is null, create new and return
addNewAddressShippingMethod
public void addNewAddressShippingMethod(java.util.Map pShippingMethods,
atg.commerce.order.ShippingGroup pShippingGroup)
- This method adds the shipping method to the ShippingMethods map. This map will be transferred to a
javascript variable. If an agent naviagates from one address to other, the UI can display the available shipping
methods for that address. If the UI is trying to add new address, the available shipping addresses should be available
in the UI to switch. In order to provide the list of available methods, this method adds them to the ShippingMethods map.
- Parameters:
Map
- that contains all shipping address name as the key and its available methodsHardgoodShippingGroup
- the shipping group that needs to add its available addresses to the map
getAvailableMethods
public java.util.List getAvailableMethods(atg.commerce.order.ShippingGroup pShippingGroup)
- This method provides the list of all available shipping methods by the shipping group.
- Parameters:
ShippingGroup
- ShippingGroup that needs shipping methods
- Returns:
- List list of available shipping methods.
isNullAddress
public boolean isNullAddress(atg.core.util.Address pAddress)
- Query whether an Address object is null or empty.
- Returns:
- true if the address object is null or if every property in the
address is null, false otherwise.
firstValidAddressNickname
public java.lang.String firstValidAddressNickname(java.util.Map pShippingGroupMap)
- This method returns first non null address's (HardgoodShippingGroup) key or nickname.
- Parameters:
pShippingGroups
-
- Returns:
supplyValidAddresses
public java.util.Map supplyValidAddresses(java.util.Map pAddressMap)
- This method creates a temporary map and adds only non null addresses to the temporary map.
This method eliminates any null addresses from the map. This method does not remove the null entry from the
ShippingGroupMap.
- Parameters:
pAddressMap
-
- Returns: