|
|||||||||
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.CommerceItemShippingInfoTools
public class CommerceItemShippingInfoTools
This tools component contains API that is shared between the ShippingGroupDroplet and ShippingGroupFormHandler to modify the CommerceItemShippingInfo objects
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected CommerceItemManager |
mCommerceItemManager
|
protected GiftlistManager |
mGiftlistManager
|
protected HandlingInstructionManager |
mHandlingInstructionManager
|
protected boolean |
mIncludeGifts
|
protected ShippingGroupManager |
mShippingGroupManager
|
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 | |
---|---|
CommerceItemShippingInfoTools()
|
Method Summary | |
---|---|
protected CommerceItemShippingInfo |
addNewCommerceItemShippingInfoFromOrder(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
ShippingGroupMapContainer pShippingGroupMapContainer,
CommerceItem pItem,
java.lang.String pRelationshipType,
long pQuantity,
ShippingGroup pShippingGroup,
java.util.Collection pShippingGroupMatchers)
Create a CommerceItemShippingInfo from the information given and adds it to the container. |
protected void |
adjustHandlingInstructionsForSplit(CommerceItemShippingInfo pOriginalInfo,
CommerceItemShippingInfo pNewInfo,
long pSplitQuantity)
Moves or splits handling instructions after a splitting a CommerceItemShippingInfo |
void |
applyCommerceItemShippingInfo(CommerceItemShippingInfo pCommerceItemShippingInfo,
Order pOrder,
ShippingGroupMapContainer pShippingGroupMapContainer)
applyCommerceItemShippingInfo get the Relatonship type
from the CommerceItemShippingInfo then invoke the business logic in CommerceItemManager
to update the order. |
void |
applyCommerceItemShippingInfos(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
ShippingGroupMapContainer pShippingGroupMapContainer,
Order pOrder,
boolean pConsolidateBeforeApply,
boolean pApplyDefaultShipping)
Applies the CommerceItemShippingInfos to the order. |
void |
applyDefaultShippingGroup(Order pOrder,
ShippingGroupMapContainer pShippingGroupMapContainer)
applyDefaultShippingGroup checks to see if there is a
defaultShippingGroup. |
void |
applyHandlingInstructions(CommerceItemShippingInfo pCommerceItemShippingInfo,
ShippingGroup pShippingGroup)
Applies the handling instructions on the CommerceItemShippingInfo to the given shipping group |
void |
clearCommerceItemShippingInfos(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
ShippingGroupMapContainer pShippingGroupMapContainer)
Clears the shipping group map container. |
void |
clearShippingGroups(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
ShippingGroupMapContainer pShippingGroupMapContainer)
Clears the shipping group map container. |
protected void |
consolidateShippingInfos(CommerceItemShippingInfoContainer pCommerceItemShippingGroupContainer)
consolidateShippingInfos consolidates CommerceItemShippingInfos
by ensuring there is no redundant data. |
protected CommerceItemShippingInfo |
createCommerceItemShippingInfo(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
ShippingGroupMapContainer pShippingGroupMapContainer,
CommerceItem pItem,
java.lang.String pRelationshipType,
long pQuantity,
ShippingGroup pShippingGroup,
java.lang.String pShippingGroupName)
Creates a CommerceItemShippingInfo for the given item, relationship type, quantity and shipping group name. |
protected HandlingInstructionInfo |
createHandlingInstructionInfo(HandlingInstruction pHandlingInstruction,
long pQuantity)
Creates a new HandlingInstructionInfo object |
protected void |
createHandlingInstructionInfos(CommerceItemShippingInfo pCommerceItemShippingInfo,
java.util.Collection pHandlingInstructions)
Creates the handling instruction infos for each on the given handling instructions |
protected void |
createHandlingInstructionInfos(CommerceItemShippingInfo pCommerceItemShippingInfo,
ShippingGroup pShippingGroup)
Creates handling instruction infos for the handling instructions on the given shipping group for the given item. |
void |
debug(java.lang.String pDebugString)
|
protected long |
determineQuantityOfGifts(CommerceItemShippingInfo pCommerceItemShippingInfo)
Helper method that returns the sum of all gift handling instruction quantities |
protected void |
ensureGiftRegistryAddresses(Order pOrder,
ShippingGroupMapContainer pShippingGroupMapContainer,
java.util.Collection pShippingGroupMatchers)
Ensures that all gift registry addresses are in the shipping group map |
protected HandlingInstructionInfo |
findGiftlistHandlingInstructionWithQuantity(CommerceItemShippingInfo pCommerceItemShippingInfo,
long pQuantity)
Helper method to find the first gift list handling instruction with a specific quantity |
java.util.List |
getAllNonGiftHandlingInstructionsForCommerceItem(Order pOrder,
java.lang.String pCommerceItemId)
Return a list of all handling instructions for the given commerce item, excluding gift handling instructions |
CommerceItemManager |
getCommerceItemManager()
Return the CommerceItemManager property. |
GiftlistManager |
getGiftlistManager()
Return the GiftlistManager property. |
HandlingInstructionManager |
getHandlingInstructionManager()
Returns property handlingInstructionManager |
java.util.List |
getNonGiftHandlingInstructionsForCommerceItem(ShippingGroup pShippingGroup,
java.lang.String pCommerceItemId)
Return a list of handling instructions for the given commerce item and shipping group, excluding gift handling instructions |
protected ShippingGroup |
getShippingGroup(ShippingGroupMapContainer pShippingGroupMapContainer,
java.lang.String pShippingGroupId)
getShippingGroup gets the ShippingGroup with the given name
from the ShippingGroupMapContainer. |
ShippingGroupManager |
getShippingGroupManager()
Return the ShippingGroupManager property. |
void |
initCommerceItemShippingInfoToDefaultShippingGroup(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
ShippingGroupMapContainer pShippingGroupMapContainer,
Order pOrder,
CommerceItem pItem)
Creates a CommerceItemShippingInfo for the item that points to the default shipping group name as specified by the ShippingGroupMapContainer.defaultShippingGroupName. |
void |
initializeBasedOnOrder(Order pOrder,
CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
ShippingGroupMapContainer pShippingGroupMapContainer,
java.util.Collection pShippinGroupMatchers,
boolean pOnePerUnit)
Initializes the containers based on the contents of the item to shipping group relationships in the order. |
void |
initializeBasedOnShippingRelationships(Order pOrder,
CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
ShippingGroupMapContainer pShippingGroupMapContainer,
java.util.Collection pShippinGroupMatchers)
Initializes the CommerceItemShippingInfos and ShippingGroups based on the items and their relationships to the shipping groups. |
void |
initializeCommerceItemShippingInfosToDefaultShipping(Order pOrder,
CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
ShippingGroupMapContainer pShippingGroupMapContainer,
boolean pOnePerUnit)
Creates a CommerceItemShippingInfo for each item in the order. |
void |
initializeUserShippingMethods(ShippingGroupMapContainer pShippingGroupMapContainer,
Profile pProfile,
java.lang.String[] pShippingGroupTypes,
java.util.Map pShippingGroupInitializers)
Initializes the shipping group map container for the shipping group types provided. |
boolean |
isIncludeGifts()
determines if gift items are included when initializing the commerce item info and shipping group containers. |
protected CommerceItemShippingInfo |
mergeCommerceItemShippingInfos(CommerceItemShippingInfo pCisi1,
CommerceItemShippingInfo pCisi2)
mergeCommerceItemShippingInfos merges 2 CommerceItemShippingInfos
into one by combining their quantities. |
protected void |
mergeHandlingInstruction(CommerceItemShippingInfo pCommerceItemShippingInfo,
HandlingInstructionInfo pHandlingInstructionInfo)
Merges the handling instruction with the handling instructions on the given CommerceItemShippingInfo |
protected void |
moveHandlingInstructionInfo(CommerceItemShippingInfo pFromInfo,
CommerceItemShippingInfo pToInfo,
HandlingInstructionInfo pHandlingInstructionInfo)
Moves a handling instruction from the original to new CommerceItemShippingInfo |
protected void |
movePartialHandlingInstruction(CommerceItemShippingInfo pFromInfo,
CommerceItemShippingInfo pToInfo,
HandlingInstructionInfo pHandlingInstructionInfo,
long pQuantityToMove)
Moves a portion of a handling instruction from the original to new CommerceItemShippingInfo |
void |
removeDeletedShippingGroups(ShippingGroupMapContainer pShippingGroupMapContainer)
Removes shipping groups in the container that have a backing repository item that has been removed from the repository. |
protected void |
removeNonGiftQuantityFromRelationships(Order pOrder,
ShippingGroup pShippingGroup)
Removes all non-gift quantity from the items relationship to the shipping group. |
void |
removeShippingGroupsBeforeApply(Order pOrder)
This method prepares the order before applying the CommerceItemShippingInfos. |
void |
setCommerceItemManager(CommerceItemManager pCommerceItemManager)
Set the CommerceItemManager property. |
void |
setGiftlistManager(GiftlistManager pGiftlistManager)
Set the GiftlistManager property. |
void |
setHandlingInstructionManager(HandlingInstructionManager pHandlingInstructionManager)
Sets property handlingInstructionManager |
void |
setIncludeGifts(boolean pIncludeGifts)
|
void |
setShippingGroupManager(ShippingGroupManager pShippingGroupManager)
Set the ShippingGroupManager property. |
void |
specifyDefaultShippingGroup(ShippingGroupMapContainer ShippingGroupMapContainer,
java.lang.String pDefaultShippingGroupName)
Sets the defaultShippingGroupName in the ShippingGroupMapContainer. |
CommerceItemShippingInfo |
splitCommerceItemShippingInfoByQuantity(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
CommerceItemShippingInfo pCommerceItemShippingInfo,
long pSplitQuantity)
splitCommerceItemShippingInfoByQuantity splits a CommerceItemShippingInfo
by quantity. |
protected void |
splitCommerceItemShippingInfosByGift(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
ShippingGroupMapContainer pShippingGroupMapContainer)
Used to split the CommerceItemShippingInfos based on the gifts items contained in each one. |
protected void |
splitCommerceItemShippingInfosByUnit(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer,
ShippingGroupMapContainer pShippingGroupMapContainer)
Splits the CommerceItemShippingInfo objects, creating one for each unit. |
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
protected CommerceItemManager mCommerceItemManager
protected boolean mIncludeGifts
protected GiftlistManager mGiftlistManager
protected ShippingGroupManager mShippingGroupManager
protected HandlingInstructionManager mHandlingInstructionManager
Constructor Detail |
---|
public CommerceItemShippingInfoTools()
Method Detail |
---|
public void setCommerceItemManager(CommerceItemManager pCommerceItemManager)
pCommerceItemManager
- a CommerceItemManager
valuepublic CommerceItemManager getCommerceItemManager()
CommerceItemManager
valuepublic boolean isIncludeGifts()
default is false
public void setIncludeGifts(boolean pIncludeGifts)
public void setGiftlistManager(GiftlistManager pGiftlistManager)
pGiftlistManager
- a GiftlistManager
valuepublic GiftlistManager getGiftlistManager()
GiftlistManager
valuepublic void setShippingGroupManager(ShippingGroupManager pShippingGroupManager)
pShippingGroupManager
- a ShippingGroupManager
valuepublic ShippingGroupManager getShippingGroupManager()
ShippingGroupManager
valuepublic HandlingInstructionManager getHandlingInstructionManager()
public void setHandlingInstructionManager(HandlingInstructionManager pHandlingInstructionManager)
pHandlingInstructionManager
- the value to set for property handlingInstructionManagerpublic void debug(java.lang.String pDebugString)
protected void movePartialHandlingInstruction(CommerceItemShippingInfo pFromInfo, CommerceItemShippingInfo pToInfo, HandlingInstructionInfo pHandlingInstructionInfo, long pQuantityToMove)
pFromInfo
- the item containing the handling instructionpToInfo
- the item to receive a portion of the handling instructionpHandlingInstruction
- the handling instruciton infopQuantityToMove
- the quantity to move to the pToInfoprotected HandlingInstructionInfo createHandlingInstructionInfo(HandlingInstruction pHandlingInstruction, long pQuantity)
pHandlingInstruction
- pQuantity
-
protected void moveHandlingInstructionInfo(CommerceItemShippingInfo pFromInfo, CommerceItemShippingInfo pToInfo, HandlingInstructionInfo pHandlingInstructionInfo)
pFromInfo
- pNewInfo
- pHandlingInstructionInfo
- protected long determineQuantityOfGifts(CommerceItemShippingInfo pCommerceItemShippingInfo)
pCommerceItemShippingInfo
- protected HandlingInstructionInfo findGiftlistHandlingInstructionWithQuantity(CommerceItemShippingInfo pCommerceItemShippingInfo, long pQuantity)
pCommerceItemShippingInfo
- pQuantity
-
protected void adjustHandlingInstructionsForSplit(CommerceItemShippingInfo pOriginalInfo, CommerceItemShippingInfo pNewInfo, long pSplitQuantity) throws CommerceException
Determines if the handling instructions on the original CommerceItemShippingInfo need to be split between the new CommerceItemShippingInfo
There are two reasons for which a gift handling instruction needs to split 1. because the original hi.qty > originalInfo.qty 2. because the original hi.qty + other gift quantitys > originalInfo.qty All other handling instructions are split when their quantity exceeds the originalInfo.qty
pOriginalInfo
- the original CommerceItemShippingInfo that was splitpNewInfo
- the new CommerceItemShippingInfo that was created by the split operationpSplitQuantity
- the quantity of the split operation.
CommerceException
public CommerceItemShippingInfo splitCommerceItemShippingInfoByQuantity(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, CommerceItemShippingInfo pCommerceItemShippingInfo, long pSplitQuantity) throws CommerceException
splitCommerceItemShippingInfoByQuantity
splits a CommerceItemShippingInfo
by quantity. This creates a new CommerceItemShippingInfo, adjusts properties of both
the original and the new object, and adds the new object to the
CommerceItemShippingInfoContainer.
pCommerceItemShippingInfoContainer
- the container with the infospCommerceItemShippingInfo
- a CommerceItemShippingInfo
to be splitpSplitQuantity
- the quantity to split off into a new CommerceItemShippingInfo
CommerceException
adjustHandlingInstructionsForSplit(CommerceItemShippingInfo, CommerceItemShippingInfo, long)
protected void splitCommerceItemShippingInfosByUnit(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, ShippingGroupMapContainer pShippingGroupMapContainer) throws CommerceException
pCommerceItemShippingInfoContainer
- pShippingGroupMapContainer
-
CommerceException
protected void splitCommerceItemShippingInfosByGift(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, ShippingGroupMapContainer pShippingGroupMapContainer) throws CommerceException
Gifts are identified by the gift handling instructions on each CommerceItemShippingInfo. A split is issued based on the quantity of a gift handling instruction if the cisi quantity is greather than the handling instruction quantity.
pCommerceItemShippingInfoContainer
- pShippingGroupMapContainer
-
CommerceException
public void initializeBasedOnOrder(Order pOrder, CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, ShippingGroupMapContainer pShippingGroupMapContainer, java.util.Collection pShippinGroupMatchers, boolean pOnePerUnit) throws CommerceException
Will optionally create one CISI per item unit or create seperate CISI's for gift items.
pOrder
- pCommerceItemShippingInfoContainer
- pShippingGroupMapContainer
- pShippinGroupMatchers
- pOnePerUnit
- determines if one CommerceItemShippingInfos ais created for
each individual item unit.
CommerceException
splitCommerceItemShippingInfosByUnit(CommerceItemShippingInfoContainer, ShippingGroupMapContainer)
,
splitCommerceItemShippingInfosByGift(CommerceItemShippingInfoContainer, ShippingGroupMapContainer)
public void initializeCommerceItemShippingInfosToDefaultShipping(Order pOrder, CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, ShippingGroupMapContainer pShippingGroupMapContainer, boolean pOnePerUnit)
Each one is initialized to the default shipping group name as defined in the ShippingGroupMapContainer.
pOrder
- pCommerceItemShippingInfoContainer
- pShippingGroupMapContainer
- pOnePerUnit
- public void initializeBasedOnShippingRelationships(Order pOrder, CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, ShippingGroupMapContainer pShippingGroupMapContainer, java.util.Collection pShippinGroupMatchers) throws CommerceException
pOrder
- pCommerceItemShippingInfoContainer
- pShippingGroupMapContainer
- pShippinGroupMatchers
-
CommerceException
public void initCommerceItemShippingInfoToDefaultShippingGroup(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, ShippingGroupMapContainer pShippingGroupMapContainer, Order pOrder, CommerceItem pItem)
pCommerceItemShippingInfoContainer
- pShippingGroupMapContainer
- pOrder
- pItem
- protected CommerceItemShippingInfo createCommerceItemShippingInfo(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, ShippingGroupMapContainer pShippingGroupMapContainer, CommerceItem pItem, java.lang.String pRelationshipType, long pQuantity, ShippingGroup pShippingGroup, java.lang.String pShippingGroupName)
If pShippingGroup
is provided, the shipping info's shippingMethod and handling instructions
are set to match the shipping group.
pItem
- the commerce itempRelationshipType
- the relationship type for the infopQuantity
- the quantity for the infopShippingGroup
- the shipping group associated with the shipping info (optional)pShippingGroupName
- the name of the shipping group in the map to which the info should be associated.
protected void createHandlingInstructionInfos(CommerceItemShippingInfo pCommerceItemShippingInfo, ShippingGroup pShippingGroup)
pCommerceItemShippingInfo
- pShippingGroup
- protected void createHandlingInstructionInfos(CommerceItemShippingInfo pCommerceItemShippingInfo, java.util.Collection pHandlingInstructions)
pCommerceItemShippingInfo
- pHandlingInstructions
- public java.util.List getNonGiftHandlingInstructionsForCommerceItem(ShippingGroup pShippingGroup, java.lang.String pCommerceItemId)
pShippingGroup
- the shipping group containing the handling instructionspCommerceItemId
- The id of the item
public java.util.List getAllNonGiftHandlingInstructionsForCommerceItem(Order pOrder, java.lang.String pCommerceItemId)
pOrder
- the order containing the itempCommerceItemId
- The id of the item
protected CommerceItemShippingInfo addNewCommerceItemShippingInfoFromOrder(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, ShippingGroupMapContainer pShippingGroupMapContainer, CommerceItem pItem, java.lang.String pRelationshipType, long pQuantity, ShippingGroup pShippingGroup, java.util.Collection pShippingGroupMatchers) throws CommerceException
If IncludeGifts
is false then only the quantity of the item that is not a gift is accounted
for in the new CISI. If the entire quantity is a gift then no item is created and null is returned.
pCommerceItemShippingInfoContainer
- pShippingGroupMapContainer
- pItem
- pRelationshipType
- pQuantity
- pShippingGroup
- pShippingGroupMatchers
-
CommerceException
protected void ensureGiftRegistryAddresses(Order pOrder, ShippingGroupMapContainer pShippingGroupMapContainer, java.util.Collection pShippingGroupMatchers)
pOrder
- pShippingGroupMapContainer
- pShippingGroupMatchers
- public void applyCommerceItemShippingInfos(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, ShippingGroupMapContainer pShippingGroupMapContainer, Order pOrder, boolean pConsolidateBeforeApply, boolean pApplyDefaultShipping) throws CommerceException
pCommerceItemShippingInfoContainer
- pShippingGroupMapContainer
- pOrder
- pConsolidateBeforeApply
- pApplyDefaultShipping
-
CommerceException
public void applyDefaultShippingGroup(Order pOrder, ShippingGroupMapContainer pShippingGroupMapContainer) throws CommerceException
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.
pOrder
- an Order
value
CommerceException
public void applyCommerceItemShippingInfo(CommerceItemShippingInfo pCommerceItemShippingInfo, Order pOrder, ShippingGroupMapContainer pShippingGroupMapContainer) throws CommerceException
applyCommerceItemShippingInfo
get the Relatonship type
from the CommerceItemShippingInfo then invoke the business logic in CommerceItemManager
to update the order.
pCommerceItemShippingInfo
- a CommerceItemShippingInfo
valuepOrder
- an Order
valuepShippingGroupMapContainer
- the map container that contains the shipping groups associated with the
given shipping info
CommerceException
public void applyHandlingInstructions(CommerceItemShippingInfo pCommerceItemShippingInfo, ShippingGroup pShippingGroup) throws CommerceException
pCommerceItemShippingInfo
- pShippingGroup
-
CommerceException
protected ShippingGroup getShippingGroup(ShippingGroupMapContainer pShippingGroupMapContainer, java.lang.String pShippingGroupId)
getShippingGroup
gets the ShippingGroup with the given name
from the ShippingGroupMapContainer.
pShippingGroupMapContainer
- the container that contains the shipping grouppShippingGroupId
- a String
value
ShippingGroup
valueprotected void consolidateShippingInfos(CommerceItemShippingInfoContainer pCommerceItemShippingGroupContainer) throws CommerceException
consolidateShippingInfos
consolidates CommerceItemShippingInfos
by ensuring there is no redundant data.
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurs
CommerceException
protected CommerceItemShippingInfo mergeCommerceItemShippingInfos(CommerceItemShippingInfo pCisi1, CommerceItemShippingInfo pCisi2) throws CommerceException
mergeCommerceItemShippingInfos
merges 2 CommerceItemShippingInfos
into one by combining their quantities.
pCisi1
- a CommerceItemShippingInfo
valuepCisi2
- a CommerceItemShippingInfo
value
CommerceItemShippingInfo
value
CommerceException
protected void mergeHandlingInstruction(CommerceItemShippingInfo pCommerceItemShippingInfo, HandlingInstructionInfo pHandlingInstructionInfo)
Merge is done by either incrementing the quantity on a matching handling instruction or by adding the handling instruction to the CommerceItemShippingInfo
Gift handling instructions are merged if the gift list, gift item and handling methods are equal.
All other handling instructions are merged if the handling methods are equal.
pCommerceItemShippingInfo
- pHandlingInstructionInfo
- public void removeDeletedShippingGroups(ShippingGroupMapContainer pShippingGroupMapContainer)
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.
public void initializeUserShippingMethods(ShippingGroupMapContainer pShippingGroupMapContainer, Profile pProfile, java.lang.String[] pShippingGroupTypes, java.util.Map pShippingGroupInitializers)
For each type, the shipping group initializers createe shipping groups based on the profile.
pShippingGroupMapContainer
- pProfile
- pShippingGroupTypes
- pShippingGroupInitializers
- public void specifyDefaultShippingGroup(ShippingGroupMapContainer ShippingGroupMapContainer, java.lang.String pDefaultShippingGroupName) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public void clearShippingGroups(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, ShippingGroupMapContainer pShippingGroupMapContainer)
pCommerceItemShippingInfoContainer
- pShippingGroupMapContainer
- public void clearCommerceItemShippingInfos(CommerceItemShippingInfoContainer pCommerceItemShippingInfoContainer, ShippingGroupMapContainer pShippingGroupMapContainer)
pCommerceItemShippingInfoContainer
- pShippingGroupMapContainer
- public void removeShippingGroupsBeforeApply(Order pOrder) throws CommerceException
If gifts are being included all shipping groups, with the exception of the non-modifiable shipping groups identified by the ShippingGroupManager, are removed from the order.
If gifts are not included, shipping groups that contain gifts exclusively are left in the order. All other shipping groups that contain a mix of gift and non-gift items are adjusted to remove the non-gift quantities and handling instructions.
pOrder
-
CommerceException
protected void removeNonGiftQuantityFromRelationships(Order pOrder, ShippingGroup pShippingGroup) throws CommerceException
Either the quantity is adjusted to a new value or the relationship is removed entirely when the new quantity is zero or it's a quantity remaining type relationship.
All non-gift handling instructions are also removed
pOrder
- pShippingGroup
-
CommerceException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |