|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.commerce.order.HandlingInstructionManager
public class HandlingInstructionManager
This class is the business layer object for managing and manipulating HandlingInstructions. This class holds all the business logic for manipulating all types of HandlingInstructions.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected static java.util.ResourceBundle |
sResourceBundle
Resource Bundle |
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 | |
---|---|
HandlingInstructionManager()
Constructs a HandlingInstructionManager object. |
Method Summary | |
---|---|
void |
addHandlingInstructionToShippingGroup(Order pOrder,
HandlingInstruction pHandlingInstruction)
Adds the given HandlingInstruction to the ShippingGroup in the given Order. |
boolean |
areHandlingInstructionsEqual(HandlingInstruction pHandling1,
HandlingInstruction pHandling2)
determines if the two handling instructions are equal based on their constant properties. |
HandlingInstruction |
copyHandlingInstruction(HandlingInstruction pHandlingInstruction)
Copy a handling object. |
HandlingInstruction |
createHandlingInstruction()
Creates a new HandlingInstruction object using the type mapped to the defaultHandlingInstructionType property in OrderTools. |
HandlingInstruction |
createHandlingInstruction(java.lang.String pHandlingInstructionType)
Creates a new HandlingInstruction object using the type mapped to the type supplied in pHandlingInstructionType. |
HandlingInstruction |
createHandlingInstruction(java.lang.String pShippingGroupId,
java.lang.String pCommerceItemId,
long pQuantity)
Creates a new HandlingInstruction object of the default type and populates the HandlingInstruction with the supplied data. |
HandlingInstruction |
createHandlingInstruction(java.lang.String pHandlingInstructionType,
java.lang.String pShippingGroupId,
java.lang.String pCommerceItemId,
long pQuantity)
Creates a new HandlingInstruction object using the class mapped to the given name. |
java.util.List |
getAllHandlingInstructionsForCommerceItem(Order pOrder,
java.lang.String pCommerceItemId)
Return a list of handlingInstructions for the given commerce item, if it exists. |
java.util.List |
getHandlingInstructionsForCommerceItem(ShippingGroup pShippingGroup,
java.lang.String pCommerceItemId)
Return a list of handlingInstructions for the given commerce item, if it exists. |
OrderTools |
getOrderTools()
Returns property orderTools |
ShippingGroupManager |
getShippingGroupManager()
Returns property shippingGroupManager |
void |
removeAllHandlingInstructionsFromShippingGroup(Order pOrder,
java.lang.String pShippingGroupId)
Removes all the HandlingInstructions and from a ShippingGroup. |
void |
removeHandlingInstructionFromShippingGroup(Order pOrder,
java.lang.String pShippingGroupId,
java.lang.String pHandlingInstructionId)
Removes the HandlingInstruction with the given id from the ShippingGroup with the given id in the Order. |
void |
removeHandlingInstructionsFromShippingGroup(Order pOrder,
java.lang.String pShippingGroupId,
java.lang.String pCommerceItemId)
Removes the HandlingInstructions from the ShippingGroup in the given Order which belong to the CommerceItem with the given id. |
void |
setOrderTools(OrderTools pOrderTools)
Sets property orderTools |
void |
setShippingGroupManager(ShippingGroupManager pShippingGroupManager)
Sets property shippingGroupManager |
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 static java.util.ResourceBundle sResourceBundle
Constructor Detail |
---|
public HandlingInstructionManager()
Method Detail |
---|
public OrderTools getOrderTools()
public void setOrderTools(OrderTools pOrderTools)
pOrderTools
- the value to set for property orderToolspublic ShippingGroupManager getShippingGroupManager()
public void setShippingGroupManager(ShippingGroupManager pShippingGroupManager)
pShippingGroupManager
- the value to set for property shippingGroupManagerpublic HandlingInstruction createHandlingInstruction() throws CommerceException
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultHandlingInstructionType()
public HandlingInstruction createHandlingInstruction(java.lang.String pHandlingInstructionType) throws CommerceException
pHandlingInstructionType
- the name that is mapped in the OrderTools.properties file to the class of
the desired type to create
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
public HandlingInstruction createHandlingInstruction(java.lang.String pShippingGroupId, java.lang.String pCommerceItemId, long pQuantity) throws CommerceException
pShippingGroupId
- the id of the ShippingGroup which contains the CommerceItem which this
HandlingInstruction applies topCommerceItemId
- the id of the CommerceItem which this HandlingInstruction applies topQuantity
- the quantity of CommerceItems which this HandlingInstruction applies to
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultHandlingInstructionType()
public HandlingInstruction createHandlingInstruction(java.lang.String pHandlingInstructionType, java.lang.String pShippingGroupId, java.lang.String pCommerceItemId, long pQuantity) throws CommerceException
pHandlingInstructionType
- the name that is mapped in the OrderTools.properties file to the class of
the desired type to createpShippingGroupId
- the id of the ShippingGroup which contains the CommerceItem which this
HandlingInstruction applies topCommerceItemId
- the id of the CommerceItem which this HandlingInstruction applies topQuantity
- the quantity of CommerceItems which this HandlingInstruction applies to
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
public void addHandlingInstructionToShippingGroup(Order pOrder, HandlingInstruction pHandlingInstruction) throws CommerceException
pOrder
- the Order which contains the ShippingGroup that this HandlingInstruction will be added topHandlingInstruction
- the HandlingInstruction to add to the ShippingGroup in the Order
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
public void removeAllHandlingInstructionsFromShippingGroup(Order pOrder, java.lang.String pShippingGroupId) throws CommerceException
pOrder
- the Order which contains the ShippingGroup which contains the HandlingInstructions
to be removedpShippingGroupId
- the id of the ShippingGroup which contains the HandlingInstructions
InvalidParameterException
- thrown if any of the parameters are null
ObjectRemovalException
- thrown if a HandlingInstruction cannot be removed
CommerceException
public void removeHandlingInstructionFromShippingGroup(Order pOrder, java.lang.String pShippingGroupId, java.lang.String pHandlingInstructionId) throws CommerceException
pOrder
- the Order which contains the ShippingGroup to remove the HandlingInstruction frompShippingGroupId
- the id of the ShippingGroup which contains the HandlingInstructionpHandlingInstructionId
- the id of the HandlingInstruction
InvalidParameterException
- thrown if any of the parameters are null
ShippingGroupNotFoundException
- if a ShippingGroup with the given id is not found in the given order
CommerceException
public void removeHandlingInstructionsFromShippingGroup(Order pOrder, java.lang.String pShippingGroupId, java.lang.String pCommerceItemId) throws CommerceException
pOrder
- the Order which contains the ShippingGroup to remove the HandlingInstruction frompShippingGroupId
- the id of the ShippingGroup which contains the HandlingInstructionspCommerceItemId
- the id of the CommerceItem which the HandlingInstructions reference
InvalidParameterException
- thrown if any of the parameters are null
ShippingGroupNotFoundException
- if a ShippingGroup with the given id is not found in the given order
CommerceException
public HandlingInstruction copyHandlingInstruction(HandlingInstruction pHandlingInstruction)
pHandlingInstruction
- The handlingInstruction to copy
public java.util.List getHandlingInstructionsForCommerceItem(ShippingGroup pShippingGroup, java.lang.String pCommerceItemId)
pShippingGroup
- the shipping group containing the handling instructionpCommerceItemId
- The id of the item
public java.util.List getAllHandlingInstructionsForCommerceItem(Order pOrder, java.lang.String pCommerceItemId)
pOrder
- the order containing the itempCommerceItemId
- The id of the item
public boolean areHandlingInstructionsEqual(HandlingInstruction pHandling1, HandlingInstruction pHandling2)
For all handling instructions the class type, commerce item id, shipping group id and handling method must be the same.
For gift handling instructions the gift list id and gift item must also match.
pHandling1
- pHandling2
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |