|
|||||||||
| 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.nucleus.TimedOperationService
atg.nucleus.servlet.ServletService
atg.nucleus.servlet.HttpServletService
atg.servlet.DynamoServlet
atg.commerce.order.purchase.ShippingGroupDroplet
public class ShippingGroupDroplet
The ShippingGroupDroplet is a DynamoServlet that is used to initialize
ShippingGroups and CommerceItemShippingInfo objects for use by the ShippingGroupFormHandler.
The ShippingGroupDroplet is composed of the following containers:
ShippingGroupMapContainer - container for the user's authorized ShippingGroups
CommerceItemShippingInfoContainer - container for the user's CommerceItemShippingInfo objects for a particular Order's CommerceItems
The service method ensures the following:
ShippingGroup initialization - the user's ShippingGroups are added to the ShippingGroupMapContainer. Once this is done the user can begin to select from these during the shipping checkout process.
CommerceItemShippingInfo initialization - the Order CommerceItems of interest are used to instantiate CommerceItemShippingInfo objects, and these are added to the CommerceItemShippingInfoContainer.
A complete description of the parameters to the ShippingGroupDroplet are:
| Field Summary | |
|---|---|
static java.lang.String |
CISI_MAP
|
static java.lang.String |
CLASS_VERSION
|
static ParameterName |
CLEAR_ALL
|
static ParameterName |
CLEAR_SHIPPING_GROUPS
|
static ParameterName |
CLEAR_SHIPPING_INFOS
|
static ParameterName |
CREATE_ONE_INFO_PER_UNIT
|
static ParameterName |
INIT_BASED_ON_ORDER
|
static ParameterName |
INIT_SHIPPING_GROUPS
|
static ParameterName |
INIT_SHIPPING_INFOS
|
protected CommerceItemShippingInfoTools |
mCommerceItemShippingInfoTools
|
static java.lang.String |
ORDER
|
static java.lang.String |
OUTPUT
|
static ParameterName |
SHIPPING_GROUP_TYPES
|
static java.lang.String |
SHIPPING_GROUPS
|
| 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 |
| Constructor Summary | |
|---|---|
ShippingGroupDroplet()
Creates a new ShippingGroupDroplet instance. |
|
| Method Summary | |
|---|---|
protected java.lang.String |
addShippingGroupToMap(ShippingGroup pShippingGroup)
Deprecated. |
protected void |
consolidateShippingInfos(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
consolidateShippingInfos consolidates CommerceItemShippingInfos
by ensuring there is no redundant data. |
protected void |
copyConfiguration()
Copy property settings from the optional PurchaseProcessConfiguration component. |
protected CommerceItemShippingInfo |
createCommerceItemShippingInfo(CommerceItem pItem,
java.lang.String pRelationshipType,
java.lang.Long pQuantity,
java.lang.String pShippingGroupName)
Creates a CommerceItemShippingInfo for the given item, relationship type, quantity and shipping group name. |
void |
doStartService()
Perform one-time startup operations, including copying property settings from the optional PurchaseProcessConfiguration
component. |
CommerceItemShippingInfoContainer |
getCommerceItemShippingInfoContainer()
Return the CommerceItemShippingInfoContainer property. |
CommerceItemShippingInfoTools |
getCommerceItemShippingInfoTools()
Returns the tools component containing the API for modifying CommerceItemShippingInfos |
PurchaseProcessConfiguration |
getConfiguration()
Returns property Configuration |
ShippingGroup |
getDefaultShippingGroup()
The getDefaultShippingGroupName method returns the default
ShippingGroup based on the ShippingGroupMapContainer's default ShippingGroup
name. |
GiftlistManager |
getGiftlistManager()
Return the GiftlistManager property. |
Order |
getOrder()
Return the Order property. |
Profile |
getProfile()
Return the Profile property. |
ServiceMap |
getShippingGroupInitializers()
Return the ShippingGroupInitializers property. |
ShippingGroupManager |
getShippingGroupManager()
Return the ShippingGroupManager property. |
ShippingGroupMapContainer |
getShippingGroupMapContainer()
Return the ShippingGroupMapContainer property. |
java.lang.String |
getShippingGroupTypes()
Return the ShippingGroupTypes property. |
protected void |
initializeBasedOnOrder(Profile pProfile,
Order pOrder)
Initializes the contains based on the contents of the order |
protected void |
initializeCommerceItemShippingInfos(Profile pProfile,
Order pOrder)
initializeCommerceItemShippingInfos creates a CommerceItemShippingInfo
for each of the Order's non-gift CommerceItems, and then adds these to the
CommerceItemShippingInfoContainer. |
protected void |
initializeRequestParameters(DynamoHttpServletRequest pRequest)
The initializeRequestParameters method gathers the necessary
input parameters and uses them to adjust initialization requirements. |
protected void |
initializeUserShippingMethods(DynamoHttpServletRequest pRequest,
Profile pProfile)
initializeUserShippingMethods is used to add the user's
shipping methods to the ShippingGroupMapContainer. |
boolean |
isAnyShippingInfoExistsInContainter()
This method checks to see if there is any shipping infos in the container. |
boolean |
isClearAll()
Return the ClearAll property. |
boolean |
isClearShippingGroups()
Return the ClearShippingGroups property. |
boolean |
isClearShippingInfos()
Return the ClearShippingInfos property. |
boolean |
isCreateOneInfoPerUnit()
|
boolean |
isInitBasedOnOrder()
Return the InitBasedOnOrder property. |
boolean |
isInitShippingGroups()
Return the InitShippingGroups property. |
boolean |
isInitShippingInfos()
Return the InitShippingInfos property. |
protected CommerceItemShippingInfo |
mergeCommerceItemShippingInfos(CommerceItemShippingInfo cisi1,
CommerceItemShippingInfo cisi2)
mergeCommerceItemShippingInfos merges 2 CommerceItemShippingInfos
into one by combining their quantities. |
protected void |
removeDeletedShippingGroups()
Looks through the shipping groups in the container and removes any that have a backing repository item that has been removed from the repository. |
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This service method is used to initialize ShippingGroups and
CommerceItemShippingInfo objects. |
void |
setClearAll(boolean pClearAll)
Set the ClearAll property. |
void |
setClearShippingGroups(boolean pClearShippingGroups)
Set the ClearShippingGroups property. |
void |
setClearShippingInfos(boolean pClearShippingInfos)
Set the ClearShippingInfos property. |
void |
setCommerceItemShippingInfoContainer(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer)
Set the CommerceItemShippingInfoContainer property. |
void |
setCommerceItemShippingInfoTools(CommerceItemShippingInfoTools pCommerceItemShippingInfoTools)
|
void |
setConfiguration(PurchaseProcessConfiguration pConfiguration)
Sets property Configuration |
void |
setCreateOneInfoPerUnit(boolean pCreateOneInfoPerUnit)
This property controls if one CommerceItemShippingInfo is created for each item unit. |
void |
setGiftlistManager(GiftlistManager pGiftlistManager)
Set the GiftlistManager property. |
void |
setInitBasedOnOrder(boolean pInitBasedOnOrder)
Set the InitBasedOnOrder property. |
void |
setInitShippingGroups(boolean pInitShippingGroups)
Set the InitShippingGroups property. |
void |
setInitShippingInfos(boolean pInitShippingInfos)
Set the InitShippingInfos property. |
void |
setOrder(Order pOrder)
Set the Order property. |
void |
setProfile(Profile pProfile)
Set the Profile property. |
void |
setShippingGroupInitializers(ServiceMap pShippingGroupInitializers)
Set the ShippingGroupInitializers property. |
void |
setShippingGroupManager(ShippingGroupManager pShippingGroupManager)
Set the ShippingGroupManager property. |
void |
setShippingGroupMapContainer(ShippingGroupMapContainer pShippingGroupMapContainer)
Set the ShippingGroupMapContainer property. |
void |
setShippingGroupTypes(java.lang.String pShippingGroupTypes)
Set the ShippingGroupTypes property. |
| 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.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 |
| Field Detail |
|---|
public static final java.lang.String CLASS_VERSION
public static final java.lang.String SHIPPING_GROUPS
public static final java.lang.String CISI_MAP
public static final java.lang.String OUTPUT
public static final java.lang.String ORDER
public static final ParameterName INIT_SHIPPING_GROUPS
public static final ParameterName SHIPPING_GROUP_TYPES
public static final ParameterName INIT_SHIPPING_INFOS
public static final ParameterName INIT_BASED_ON_ORDER
public static final ParameterName CLEAR_ALL
public static final ParameterName CLEAR_SHIPPING_GROUPS
public static final ParameterName CLEAR_SHIPPING_INFOS
public static final ParameterName CREATE_ONE_INFO_PER_UNIT
protected CommerceItemShippingInfoTools mCommerceItemShippingInfoTools
| Constructor Detail |
|---|
public ShippingGroupDroplet()
ShippingGroupDroplet instance.
| Method Detail |
|---|
public CommerceItemShippingInfoTools getCommerceItemShippingInfoTools()
public void setCommerceItemShippingInfoTools(CommerceItemShippingInfoTools pCommerceItemShippingInfoTools)
public void setConfiguration(PurchaseProcessConfiguration pConfiguration)
pConfiguration - a PurchaseProcessConfiguration valuepublic PurchaseProcessConfiguration getConfiguration()
PurchaseProcessConfiguration valuepublic boolean isCreateOneInfoPerUnit()
public void setCreateOneInfoPerUnit(boolean pCreateOneInfoPerUnit)
pCreateOneInfoPerUnit - The createOneInfoPerUnit to set.public void setShippingGroupTypes(java.lang.String pShippingGroupTypes)
pShippingGroupTypes - a String valuepublic java.lang.String getShippingGroupTypes()
String valuepublic void setShippingGroupManager(ShippingGroupManager pShippingGroupManager)
pShippingGroupManager - a ShippingGroupManager valuepublic ShippingGroupManager getShippingGroupManager()
ShippingGroupManager valuepublic void setShippingGroupInitializers(ServiceMap pShippingGroupInitializers)
pShippingGroupInitializers - a ServiceMap valuepublic ServiceMap getShippingGroupInitializers()
ServiceMap valuepublic void setInitShippingGroups(boolean pInitShippingGroups)
pInitShippingGroups - a boolean valuepublic boolean isInitShippingGroups()
boolean valuepublic void setInitBasedOnOrder(boolean pInitBasedOnOrder)
pInitBasedOnOrder - a boolean valuepublic boolean isInitBasedOnOrder()
boolean valuepublic void setCommerceItemShippingInfoContainer(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer)
pCommerceItemShippingInfoContainer - a CommerceItemShippingInfoContainer valuepublic CommerceItemShippingInfoContainer getCommerceItemShippingInfoContainer()
CommerceItemShippingInfoContainer valuepublic void setShippingGroupMapContainer(ShippingGroupMapContainer pShippingGroupMapContainer)
pShippingGroupMapContainer - a ShippingGroupMapContainer valuepublic ShippingGroupMapContainer getShippingGroupMapContainer()
ShippingGroupMapContainer valuepublic void setGiftlistManager(GiftlistManager pGiftlistManager)
pGiftlistManager - a GiftlistManager valuepublic GiftlistManager getGiftlistManager()
GiftlistManager valuepublic void setOrder(Order pOrder)
pOrder - an Order valuepublic Order getOrder()
Order valuepublic void setProfile(Profile pProfile)
pProfile - a Profile valuepublic Profile getProfile()
Profile valuepublic void setClearShippingInfos(boolean pClearShippingInfos)
pClearShippingInfos - a boolean valuepublic boolean isClearShippingInfos()
boolean valuepublic void setClearShippingGroups(boolean pClearShippingGroups)
pClearShippingGroups - a boolean valuepublic boolean isClearShippingGroups()
boolean valuepublic void setClearAll(boolean pClearAll)
pClearAll - a boolean valuepublic boolean isClearAll()
boolean valuepublic void setInitShippingInfos(boolean pInitShippingInfos)
pInitShippingInfos - a boolean valuepublic boolean isInitShippingInfos()
boolean value
protected void initializeUserShippingMethods(DynamoHttpServletRequest pRequest,
Profile pProfile)
initializeUserShippingMethods is used to add the user's
shipping methods to the ShippingGroupMapContainer. For each entry in the
ShippingGroupTypes, its corresponding ShippingGroupInitializer is obtained
from the ShippingGroupInitializers ServiceMap and its initializeShippingGroups
method executed.
pRequest - a DynamoHttpServletRequest valuepProfile - a Profile value
protected void initializeCommerceItemShippingInfos(Profile pProfile,
Order pOrder)
initializeCommerceItemShippingInfos creates a CommerceItemShippingInfo
for each of the Order's non-gift CommerceItems, and then adds these to the
CommerceItemShippingInfoContainer. By default each new CommerceItemShippingInfo
references the default ShippingGroup in the ShippingGroupMapContainer.
pProfile - a Profile valuepOrder - an Order valueCommerceItemShippingInfoTools.initCommerceItemShippingInfoToDefaultShippingGroup(CommerceItemShippingInfoContainer, ShippingGroupMapContainer, Order, CommerceItem)
protected void initializeBasedOnOrder(Profile pProfile,
Order pOrder)
pProfile - pOrder - CommerceItemShippingInfoTools.initializeBasedOnOrder(Order, CommerceItemShippingInfoContainer, ShippingGroupMapContainer, Collection, boolean)
protected CommerceItemShippingInfo createCommerceItemShippingInfo(CommerceItem pItem,
java.lang.String pRelationshipType,
java.lang.Long pQuantity,
java.lang.String pShippingGroupName)
CommerceItemShippingInfoTools#createCommerceItemShippingInfo(CommerceItemShippingInfoContainer, ShippingGroupMapContainer, CommerceItem, String, Long, String)protected java.lang.String addShippingGroupToMap(ShippingGroup pShippingGroup)
pShippingGroup -
protected void initializeRequestParameters(DynamoHttpServletRequest pRequest)
initializeRequestParameters method gathers the necessary
input parameters and uses them to adjust initialization requirements.
pRequest - a DynamoHttpServletRequest valuepublic ShippingGroup getDefaultShippingGroup()
getDefaultShippingGroupName method returns the default
ShippingGroup based on the ShippingGroupMapContainer's default ShippingGroup
name.
String valueprotected void copyConfiguration()
PurchaseProcessConfiguration component. Property
values that were configured locally are preserved.
Configures the following properties (if not already set):
public void doStartService()
throws ServiceException
PurchaseProcessConfiguration
component.
doStartService in class GenericServiceServiceException - if the Service had a problem starting up
public void service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
service method is used to initialize ShippingGroups and
CommerceItemShippingInfo objects. Initialization is based on input
parameters describing which ShippingGroups and CommerceItemShippingInfo
objects, if any, should be created and added to the appropriate container.
The resulting Collections of ShippingGroups and CommerceItemShippingInfos
are exposed via output parameters.
service in class DynamoServletpRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse value
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occurs
protected void consolidateShippingInfos(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
throws javax.servlet.ServletException,
java.io.IOException
consolidateShippingInfos consolidates CommerceItemShippingInfos
by ensuring there is no redundant data.
pRequest - a DynamoHttpServletRequest valuepResponse - a DynamoHttpServletResponse value
javax.servlet.ServletException - if an error occurs
java.io.IOException - if an error occursCommerceItemShippingInfoTools.consolidateShippingInfos(CommerceItemShippingInfoContainer)
protected CommerceItemShippingInfo mergeCommerceItemShippingInfos(CommerceItemShippingInfo cisi1,
CommerceItemShippingInfo cisi2)
mergeCommerceItemShippingInfos merges 2 CommerceItemShippingInfos
into one by combining their quantities.
cisi1 - a CommerceItemShippingInfo valuecisi2 - a CommerceItemShippingInfo value
CommerceItemShippingInfo valueCommerceItemShippingInfoTools.mergeCommerceItemShippingInfos(CommerceItemShippingInfo, CommerceItemShippingInfo)protected void removeDeletedShippingGroups()
This can happen when a shipping group was applied to an order and then "unapplied", causing the cascade delete on the repository item to remove it from the repository.
CommerceItemShippingInfoTools.removeDeletedShippingGroups(ShippingGroupMapContainer)public boolean isAnyShippingInfoExistsInContainter()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||