|
|||||||||
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.ShippingGroupContainerService
public class ShippingGroupContainerService
The ShippingGroupContainerService is a convenient session scoped component which implements both the ShippingGroupMapContainer and the CommerceItemShippingInfoContainer interfaces. This component is responsible for keeping track of both the user's authorized ShippingGroups, as well as the CommerceItemShippingInfo objects for a user's Order. Restoreable is implemented to clear up shipping group references after an session fail over or session migration. In certain situations, shipping groups could be loaded from the order and order and this container may have a reference to the same shipping group instance. On session fail over, if we do not clear the references, the out-dated references will obstruct the check out process.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected java.lang.String |
mShoppingCartPath
|
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 | |
---|---|
ShippingGroupContainerService()
Creates a new ShippingGroupContainerService instance. |
Method Summary | |
---|---|
void |
addCommerceItemShippingInfo(java.lang.String pCommerceItemId,
CommerceItemShippingInfo pCommerceItemShippingInfo)
Add a CommerceItemInfo to the CommerceItemShippingInfoMap. |
void |
addShippingGroup(java.lang.String pShippingGroupName,
ShippingGroup pShippingGroup)
Add a ShippingGroup to the ShippingGroupMap, the key will be its ShippingGroupName |
java.lang.String |
addShippingGroupToMap(ShippingGroup pShippingGroup,
java.util.Collection pShippingGroupMatchers)
Adds a shipping group to the map container. |
java.util.List |
getAllCommerceItemShippingInfos()
Get the List of all the CommerceItemShippingInfos from the CommerceItemShippingInfoMap |
java.util.Map |
getCommerceItemShippingInfoMap()
Return the CommerceItemShippingInfoMap property. |
java.util.List |
getCommerceItemShippingInfos(java.lang.String pCommerceItemId)
Get the List of CommerceItemShippingInfos based on the CommerceItemId as the key to the CommerceItemShippingInfoMap |
java.lang.String |
getDefaultShippingGroupName()
Get the default ShippingGroupName for the user's default ShippingGroup |
java.lang.String |
getNewShippingGroupName(ShippingGroup pShippingGroup,
java.util.Collection pShippingGroupMatchers)
Returns a new name for a shipping group |
ShippingGroup |
getShippingGroup(java.lang.String pShippingGroupName)
Get a ShippingGroup based on its ShippingGroupName |
java.util.Map |
getShippingGroupMap()
Return the ShippingGroupMap property. |
java.lang.String |
getShippingGroupName(ShippingGroup pShippingGroup,
java.util.Collection pShippingGroupMatchers)
Returns the name that the shipping group is mapped to in the map. |
java.util.Set |
getShippingGroupNames()
Get all the user's ShippingGroupNames |
java.lang.String |
getShoppingCartPath()
This property is used on session restore and to look up the ShoppingCart on session fail over. |
void |
removeAllCommerceItemShippingInfos()
Remove all the CommerceItemInfos from the CommerceItemShippingInfoMap. |
void |
removeAllShippingGroups()
Remove all the user's ShippingGroups from the ShippingGroupMap |
void |
removeCommerceItemShippingInfos(java.lang.String pCommerceItemId)
Remove all the CommerceItemInfos whose key is the input CommerceItemId from the CommerceItemShippingInfoMap. |
void |
removeShippingGroup(java.lang.String pShippingGroupName)
Remove a ShippingGroup from the ShippingGroupMap based on its ShippingGroupName |
void |
sessionRestored()
This method is called after an object has been recovered from a session's backup server, either as a result of session fail over or session migration. |
void |
setCommerceItemShippingInfoMap(java.util.Map pCommerceItemShippingInfoMap)
Set the CommerceItemShippingInfoMap property. |
void |
setDefaultShippingGroupName(java.lang.String pDefaultShippingGroupName)
Set a default ShippingGroupName for the user's default ShippingGroup |
void |
setShippingGroupMap(java.util.Map pShippingGroupMap)
Set the ShippingGroupMap property. |
void |
setShoppingCartPath(java.lang.String pShoppingCartPath)
This property is used on session restore and to look up the ShoppingCart on session fail over. |
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 java.lang.String CLASS_VERSION
protected java.lang.String mShoppingCartPath
Constructor Detail |
---|
public ShippingGroupContainerService()
ShippingGroupContainerService
instance.
Method Detail |
---|
public java.lang.String getShoppingCartPath()
public void setShoppingCartPath(java.lang.String pShoppingCartPath)
pShoppingCartPath
- public void setCommerceItemShippingInfoMap(java.util.Map pCommerceItemShippingInfoMap)
pCommerceItemShippingInfoMap
- a Map
valuepublic java.util.Map getCommerceItemShippingInfoMap()
getCommerceItemShippingInfoMap
in interface CommerceItemShippingInfoContainer
Map
valuepublic void setShippingGroupMap(java.util.Map pShippingGroupMap)
pShippingGroupMap
- a Map
valuepublic java.util.Map getShippingGroupMap()
getShippingGroupMap
in interface ShippingGroupMapContainer
Map
valuepublic java.util.List getCommerceItemShippingInfos(java.lang.String pCommerceItemId)
getCommerceItemShippingInfos
in interface CommerceItemShippingInfoContainer
pCommerceItemId
- a String
value
List
valuepublic java.util.List getAllCommerceItemShippingInfos()
getAllCommerceItemShippingInfos
in interface CommerceItemShippingInfoContainer
List
valuepublic void addCommerceItemShippingInfo(java.lang.String pCommerceItemId, CommerceItemShippingInfo pCommerceItemShippingInfo)
addCommerceItemShippingInfo
in interface CommerceItemShippingInfoContainer
pCommerceItemId
- a String
valuepCommerceItemShippingInfo
- a CommerceItemShippingInfo
valuepublic void removeAllCommerceItemShippingInfos()
removeAllCommerceItemShippingInfos
in interface CommerceItemShippingInfoContainer
public void removeCommerceItemShippingInfos(java.lang.String pCommerceItemId)
removeCommerceItemShippingInfos
in interface CommerceItemShippingInfoContainer
pCommerceItemId
- a String
valuepublic ShippingGroup getShippingGroup(java.lang.String pShippingGroupName)
getShippingGroup
in interface ShippingGroupMapContainer
pShippingGroupName
- a String
value
ShippingGroup
valuepublic void addShippingGroup(java.lang.String pShippingGroupName, ShippingGroup pShippingGroup)
addShippingGroup
in interface ShippingGroupMapContainer
pShippingGroupName
- a String
valuepShippingGroup
- a ShippingGroup
valuepublic void removeAllShippingGroups()
removeAllShippingGroups
in interface ShippingGroupMapContainer
public void removeShippingGroup(java.lang.String pShippingGroupName)
removeShippingGroup
in interface ShippingGroupMapContainer
pShippingGroupName
- a String
valuepublic void setDefaultShippingGroupName(java.lang.String pDefaultShippingGroupName)
setDefaultShippingGroupName
in interface ShippingGroupMapContainer
pDefaultShippingGroupName
- a String
valuepublic java.lang.String getDefaultShippingGroupName()
getDefaultShippingGroupName
in interface ShippingGroupMapContainer
String
valuepublic java.util.Set getShippingGroupNames()
getShippingGroupNames
in interface ShippingGroupMapContainer
Set
valuepublic java.lang.String getShippingGroupName(ShippingGroup pShippingGroup, java.util.Collection pShippingGroupMatchers)
getShippingGroupName
in interface ShippingGroupMapContainer
public java.lang.String getNewShippingGroupName(ShippingGroup pShippingGroup, java.util.Collection pShippingGroupMatchers)
getNewShippingGroupName
in interface ShippingGroupMapContainer
pShippingGroup
- pShippingGroupMatchers
-
public java.lang.String addShippingGroupToMap(ShippingGroup pShippingGroup, java.util.Collection pShippingGroupMatchers)
addShippingGroupToMap
in interface ShippingGroupMapContainer
pShippingGroup
-
public void sessionRestored()
sessionRestored
in interface atg.servlet.sessionsaver.Restoreable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |