|
|||||||||
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.OrderManager
public class OrderManager
This class is the business layer object for managing and manipulating Orders. This class holds all the business logic for manipulating an Order. The various types of methods in this class are used for creating objects, adding objects to an Order, adding objects to other objects, removing objects from other objects. Below is an example of creating an Order, adding CommerceItems to it, assigning those items to a ShippingGroup and checking the Order out.
OrderManager om = getOrderManager(); CommerceItemManager cm = getCommerceItemManager(); PricingTools pt = getPricingTools(); String profileId = "10000"; String catalogRefId1 = "sku-1"; String catalogRefId2 = "sku-2"; String productId1 = "product-1"; String productId2 = "product-2"; long quantity1 = 1; long quantity2 = 2; // create the Order and CommerceItems. The Order has a ShippingGroup and PaymentGroup // in it when constructed Order order = om.createOrder(profileId); CommerceItem item1 = om.createCommerceItem(catalogRefId1, productId1, quantity1); CommerceItem item2 = om.createCommerceItem(catalogRefId2, productId2, quantity2); // add the items to the Order, set the return value back to the object because if the // item catalogRefId already existed in the Order, the quantity is incremented rather // than adding the new object item1 = cm.addItemToOrder(order, item1); item2 = cm.addItemToOrder(order, item2); // get the ShippingGroup and add the items to it ShippingGroup sg = (ShippingGroup) order.getShippingGroups().get(0); om.addItemQuantityToShippingGroup(order, item1.getId(), sg.getId(), quantity1); om.addRemainingItemQuantityToShippingGroup(order, item2.getId(),sg.getId()); // add the entire order amount to the PaymentGroup PaymentGroup pg = (PaymentGroup) order.getPaymentGroups().get(0); om.addRemainingOrderAmountToPaymentGroup(order, pg.getId()); // Compute the prices using pricing tools pt.priceOrderTotal(order); // checkout the Order and iterate through the result object displaying errors PipelineResult pr = om.processOrder(order); if (pr.hasErrors()) { Object[] keys = pr.getErrorKeys(); for (int i = 0; i < keys.length; i++) System.out.println(pr.getError(keys[i])); }
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected static OrderManager |
mOrderManager
|
protected java.util.List |
mOrderMergeListeners
|
protected ComponentName |
mUserPricingModelsPath
The path to the PricingModelHolder in Nucleus which holds the user's pricing models |
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 | |
---|---|
OrderManager()
Constructs an OrderManager object. |
Method Summary | |
---|---|
CommerceItem |
addAsSeparateItemToOrder(Order pOrder,
CommerceItem pItem)
Deprecated. this method has been moved to the CommerceItemManager |
void |
addHandlingInstructionToShippingGroup(Order pOrder,
HandlingInstruction pHandlingInstruction)
Deprecated. this method has been moved to the HandlingInstructionManager |
void |
addItemAmountToPaymentGroup(Order pOrder,
java.lang.String pCommerceItemId,
java.lang.String pPaymentGroupId,
double pAmount)
Deprecated. this method has been moved to the CommerceItemManager |
void |
addItemQuantityToShippingGroup(Order pOrder,
java.lang.String pCommerceItemId,
java.lang.String pShippingGroupId,
long pQuantity)
Deprecated. this method has been moved to the CommerceItemManager |
CommerceItem |
addItemToOrder(Order pOrder,
CommerceItem pItem)
Deprecated. this method has been moved to the CommerceItemManager |
void |
addOrder(Order pOrder)
Adds the Order to the repository. |
void |
addOrderAmountToPaymentGroup(Order pOrder,
java.lang.String pPaymentGroupId,
double pAmount)
Adds the given amount of the Order's cost to the PaymentGroup with the given id. |
void |
addOrderMergeListener(OrderMergeListener pListener)
Add a listener to the set of event listeners that are notified when orders are merged. |
void |
addPaymentGroupToOrder(Order pOrder,
PaymentGroup pPaymentGroup)
Deprecated. this method has been moved to the PaymentGroupManager |
void |
addPaymentGroupToOrder(Order pOrder,
PaymentGroup pPaymentGroup,
int pIndex)
Deprecated. this method has been moved to the PaymentGroupManager |
void |
addRemainingItemAmountToPaymentGroup(Order pOrder,
java.lang.String pCommerceItemId,
java.lang.String pPaymentGroupId)
Deprecated. this method has been moved to the CommerceItemManager |
void |
addRemainingItemQuantityToShippingGroup(Order pOrder,
java.lang.String pCommerceItemId,
java.lang.String pShippingGroupId)
Deprecated. this method has been moved to the CommerceItemManager |
void |
addRemainingOrderAmountToPaymentGroup(Order pOrder,
java.lang.String pPaymentGroupId)
Adds any unassigned amount of the Order's cost to the PaymentGroup with the given id. |
void |
addRemainingShippingCostToPaymentGroup(Order pOrder,
java.lang.String pShippingGroupId,
java.lang.String pPaymentGroupId)
Deprecated. this method has been moved to the ShippingGroupManager |
void |
addRemainingTaxAmountToPaymentGroup(Order pOrder,
java.lang.String pPaymentGroupId)
Adds any unassigned amount of the Order's tax to the PaymentGroup with the given id. |
void |
addShippingCostAmountToPaymentGroup(Order pOrder,
java.lang.String pShippingGroupId,
java.lang.String pPaymentGroupId,
double pAmount)
Deprecated. this method has been moved to the ShippingGroupManager |
void |
addShippingGroupToOrder(Order pOrder,
ShippingGroup pShippingGroup)
Deprecated. this method has been moved to the ShippingGroupManager |
void |
addTaxAmountToPaymentGroup(Order pOrder,
java.lang.String pPaymentGroupId,
double pAmount)
Adds the given amount of the Order's tax to the PaymentGroup with the given id. |
Order[] |
areOrdersMergeable(Order pSrcOrder,
Order pDestOrder)
Checks to see if we can merge two orders. |
ShippingGroup |
cloneShippingGroup(ShippingGroup pShippingGroup)
Deprecated. this method has been moved to the ShippingGroupManager |
boolean |
compareElectronicShippingGroups(ShippingGroup pSrcShippingGroup,
ShippingGroup pDestShippingGroup)
Compares two ElectronicShippingGroup objects to check if their shipping addresses match. |
boolean |
compareGiftlistHandlingInstructions(GiftlistHandlingInstruction pSrcGiftListHandlingInst,
GiftlistHandlingInstruction pDestGiftListHandlingInst)
Compares two GiftlistHandlingInstruction objects to check if they match. |
boolean |
compareHandlingInstructions(HandlingInstruction pSrcHandlingInstruction,
HandlingInstruction pDestHandlingInstruction)
Compares two HandlingInstruction objects to check if they match. |
boolean |
compareHardgoodShippingGroups(ShippingGroup pSrcShippingGroup,
ShippingGroup pDestShippingGroup)
Compares two HardgoodShippingGroup objects to check if their shipping addresses match. |
void |
copyAddress(Address pSrcAddress,
Address pDestAddress)
Deprecated. this method has been moved to the OrderTools class |
void |
copyAddress(Address pAddress,
RepositoryItem pProfileAddress)
Deprecated. this method has been moved to the OrderTools class |
void |
copyAddress(RepositoryItem pProfileAddress,
Address pAddress)
Deprecated. this method has been moved to the OrderTools class |
HandlingInstruction |
copyHandlingInstruction(HandlingInstruction pHandlingInstruction)
Deprecated. this method has been moved to the HandlingInstructionManager |
CommerceItem |
createCommerceItem(java.lang.String pCatalogRefId,
java.lang.Object pCatalogRef,
java.lang.String pProductId,
long pQuantity)
Deprecated. this method has been moved to the CommerceItemManager |
CommerceItem |
createCommerceItem(java.lang.String pCatalogRefId,
java.lang.Object pCatalogRef,
java.lang.String pProductId,
long pQuantity,
ItemPriceInfo pPriceInfo)
Deprecated. this method has been moved to the CommerceItemManager |
CommerceItem |
createCommerceItem(java.lang.String pCatalogRefId,
java.lang.Object pCatalogRef,
java.lang.String pProductId,
java.lang.Object pProductRef,
long pQuantity)
Deprecated. this method has been moved to the CommerceItemManager |
CommerceItem |
createCommerceItem(java.lang.String pCatalogRefId,
java.lang.Object pCatalogRef,
java.lang.String pProductId,
java.lang.Object pProductRef,
long pQuantity,
ItemPriceInfo pPriceInfo)
Deprecated. this method has been moved to the CommerceItemManager |
CommerceItem |
createCommerceItem(java.lang.String pCatalogRefId,
java.lang.String pProductId,
long pQuantity)
Deprecated. this method has been moved to the CommerceItemManager |
CommerceItem |
createCommerceItem(java.lang.String pCatalogRefId,
java.lang.String pProductId,
long pQuantity,
java.lang.String pCatalogKey)
Deprecated. this method has been moved to the CommerceItemManager |
CommerceItem |
createCommerceItem(java.lang.String pItemType,
java.lang.String pCatalogRefId,
java.lang.Object pCatalogRef,
java.lang.String pProductId,
java.lang.Object pProductRef,
long pQuantity,
ItemPriceInfo pPriceInfo)
Deprecated. this method has been moved to the CommerceItemManager |
CommerceItem |
createCommerceItem(java.lang.String pItemType,
java.lang.String pCatalogRefId,
java.lang.Object pCatalogRef,
java.lang.String pProductId,
java.lang.Object pProductRef,
long pQuantity,
java.lang.String pCatalogKey,
ItemPriceInfo pPriceInfo)
Deprecated. this method has been moved to the CommerceItemManager |
HandlingInstruction |
createHandlingInstruction()
Deprecated. this method has been moved to the HandlingInstructionManager |
HandlingInstruction |
createHandlingInstruction(java.lang.String pHandlingInstructionType)
Deprecated. this method has been moved to the HandlingInstructionManager |
HandlingInstruction |
createHandlingInstruction(java.lang.String pShippingGroupId,
java.lang.String pCommerceItemId,
long pQuantity)
Deprecated. this method has been moved to the HandlingInstructionManager |
HandlingInstruction |
createHandlingInstruction(java.lang.String pHandlingInstructionType,
java.lang.String pShippingGroupId,
java.lang.String pCommerceItemId,
long pQuantity)
Deprecated. this method has been moved to the HandlingInstructionManager |
Order |
createOrder(java.lang.String pProfileId)
Creates a new Order object using the default type specified in the OrderTools defaultOrderType property. |
Order |
createOrder(java.lang.String pProfileId,
OrderPriceInfo pOrderPriceInfo,
TaxPriceInfo pTaxPriceInfo,
ShippingPriceInfo pShippingPriceInfo)
Creates a new Order object using the default type specified in the OrderTools defaultOrderType property. |
Order |
createOrder(java.lang.String pProfileId,
OrderPriceInfo pOrderPriceInfo,
TaxPriceInfo pTaxPriceInfo,
ShippingPriceInfo pShippingPriceInfo,
java.lang.String pOrderType)
Creates a new Order object using the class mapped to the given name in pOrderType. |
Order |
createOrder(java.lang.String pProfileId,
java.lang.String pOrderType)
Creates a new Order object using the class mapped to the given name in pOrderType. |
Order |
createOrder(java.lang.String pProfileId,
java.lang.String pOrderId,
OrderPriceInfo pOrderPriceInfo,
TaxPriceInfo pTaxPriceInfo,
ShippingPriceInfo pShippingPriceInfo,
java.lang.String pOrderType)
Creates a new Order object using the class mapped to the given name in pOrderType and whose id will be that which is supplied in pOrderId. |
Order |
createOrder(java.lang.String pProfileId,
java.lang.String pOrderId,
java.lang.String pOrderType)
Creates a new Order object using the class mapped to the given name in pOrderType. |
PaymentGroup |
createPaymentGroup()
Deprecated. this method has been moved to the PaymentGroupManager |
PaymentGroup |
createPaymentGroup(java.lang.String pPaymentGroupType)
Deprecated. this method has been moved to the PaymentGroupManager |
protected Relationship |
createRelationship(java.lang.String pRelationshipType)
Creates a new Relationship object using the class type mapped to the type supplied in pShippingGroupType. |
ShippingGroup |
createShippingGroup()
Deprecated. this method has been moved to the ShippingGroupManager |
ShippingGroup |
createShippingGroup(java.lang.String pShippingGroupType)
Deprecated. this method has been moved to the ShippingGroupManager |
ShippingGroup |
createShippingGroup(java.lang.String pShippingGroupType,
ShippingPriceInfo pPriceInfo)
Deprecated. this method has been moved to the ShippingGroupManager |
void |
doStartService()
Prepare this OrderManager for use by calling initializeDefaultPropertyValues |
java.util.List |
getAllCommerceItemRelationships(Order pOrder)
Deprecated. this method has been moved to the CommerceItemManager |
java.util.List |
getAllOrderRelationships(Order pOrder)
Provides a List of all OrderRelationships associated with the given Order. |
java.util.List |
getAllPaymentGroupRelationships(Order pOrder)
Deprecated. this method has been moved to the PaymentGroupManager |
java.util.List |
getAllShippingGroupRelationships(Order pOrder)
Deprecated. this method has been moved to the ShippingGroupManager |
CatalogTools |
getCatalogTools()
Returns the catalogTools |
java.lang.String |
getCommerceItemItemDescriptorName()
Returns the commerceItemItemDescriptorName |
CommerceItemManager |
getCommerceItemManager()
Returns property commerceItemManager |
java.lang.String |
getCommerceItemOrderPropertyName()
Returns the commerceItemOrderPropertyName |
java.util.List |
getCommerceItemsFromPaymentGroup(PaymentGroup pPaymentGroup)
Deprecated. this method has been moved to the CommerceItemManager |
java.util.List |
getCommerceItemsFromShippingGroup(ShippingGroup pShippingGroup)
Deprecated. this method has been moved to the CommerceItemManager |
protected Query |
getDateRangeQuery(java.util.Date pFrom,
java.util.Date pTo)
Deprecated. this method has been moved to the OrderQueries class |
boolean |
getDebugOrderRepositoryItemUpdateTransaction()
Sets whether or not warning debug stack trace should be generated. |
java.util.Locale |
getDefaultLocale()
Returns property DefaultLocale. |
boolean |
getDefaultOrderByDirection()
Returns the defaultOrderByDirection, true = ascending, false = descending, default is true |
java.lang.String |
getDefaultOrderByProperty()
Returns the defaultOrderByProperty |
HandlingInstructionManager |
getHandlingInstructionManager()
Returns property handlingInstructionManager |
java.util.List |
getHandlingInstructionsForCommerceItem(ShippingGroup pShippingGroup,
java.lang.String pCommerceItemId)
Deprecated. this method has been moved to the HandlingInstructionManager |
javax.naming.InitialContext |
getJNDIContext()
Returns the JNDIContext |
java.lang.String |
getOrderCommerceItemsPropertyName()
Returns the orderCommerceItemsPropertyName |
int |
getOrderCountForProfile(java.lang.String pProfileId)
Returns the count of orders for the passed in profile id. |
int |
getOrderCountForProfileInState(java.lang.String pProfileId,
int[] pStates)
Returns the count of orders whose state matches the pStates list for the given profile id. |
Order |
getOrderForCommerceItem(CommerceItem pCommerceItem)
Returns the order that the given CommerceItem is in. |
Order |
getOrderForPaymentGroup(PaymentGroup pPaymentGroup)
Returns the order that the given PaymentGroup is in. |
Order |
getOrderForRelationship(Relationship pRelationship)
Returns the order that the given Relationship is in. |
Order |
getOrderForShippingGroup(ShippingGroup pShippingGroup)
Returns the order that the given ShippingGroup is in. |
java.util.List |
getOrderIdsForProfile(java.lang.String pProfileId)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsForProfile(java.lang.String pProfileId,
int pState)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsForProfile(java.lang.String pProfileId,
int[] pStates)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsForProfile(java.lang.String pProfileId,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int pState)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int[] pStates)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int pState,
java.lang.String pOrderByProperty,
boolean pAscending)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
java.lang.String pOrderByProperty,
boolean pAscending)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsForProfile(java.lang.String pProfileId,
int pState,
java.lang.String pOrderByProperty,
boolean pAscending)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsForProfile(java.lang.String pProfileId,
java.lang.String pOrderByProperty,
boolean pAscending)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsForProfileWithinDateRange(java.lang.String pProfileId,
java.util.Date pFrom,
java.util.Date pTo)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrderIdsWithinDateRange(java.util.Date pFrom,
java.util.Date pTo)
Deprecated. this method has been moved to the OrderQueries class |
java.lang.String |
getOrderItemDescriptorName()
Returns property OrderItemDescriptorName |
static OrderManager |
getOrderManager()
|
java.lang.String |
getOrderPaymentGroupsPropertyName()
Returns the orderPaymentGroupsPropertyName |
OrderQueries |
getOrderQueries()
Returns property orderQueries |
java.lang.String |
getOrderRelationshipsPropertyName()
Returns the orderRelationshipsPropertyName |
java.util.List |
getOrdersForProfile(java.lang.String pProfileId)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrdersForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrdersForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
java.lang.String pOrderByProperty,
boolean pAscending)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrdersForProfile(java.lang.String pProfileId,
java.lang.String pOrderByProperty,
boolean pAscending)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrdersForProfileInState(java.lang.String pProfileId,
int pState)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrdersForProfileInState(java.lang.String pProfileId,
int[] pStates)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrdersForProfileInState(java.lang.String pProfileId,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrdersForProfileInState(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int pState)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrdersForProfileInState(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int[] pStates)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrdersForProfileInState(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrdersForProfileInState(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int pState,
java.lang.String pOrderByProperty,
boolean pAscending)
Deprecated. this method has been moved to the OrderQueries class |
java.util.List |
getOrdersForProfileInState(java.lang.String pProfileId,
int pState,
java.lang.String pOrderByProperty,
boolean pAscending)
Deprecated. this method has been moved to the OrderQueries class |
java.lang.String |
getOrderShippingGroupsPropertyName()
Returns the orderShippingGroupsPropertyName |
OrderTools |
getOrderTools()
Returns the OrderTools |
java.lang.String |
getOrderVersionPropertyName()
Returns property orderVersionPropertyName |
PaymentGroupCommerceItemRelationship |
getPaymentGroupCommerceItemRelationship(Order pOrder,
java.lang.String pItemId,
java.lang.String pPaymentGroupId)
Deprecated. this method has been moved to the PaymentGroupManager |
java.lang.String |
getPaymentGroupItemDescriptorName()
Returns the paymentGroupItemDescriptorName |
PaymentGroupManager |
getPaymentGroupManager()
Returns property paymentGroupManager |
java.lang.String |
getPaymentGroupOrderPropertyName()
Returns the paymentGroupOrderPropertyName |
PaymentGroupOrderRelationship |
getPaymentGroupOrderRelationship(Order pOrder,
java.lang.String pPaymentGroupId)
Deprecated. this method has been moved to the PaymentGroupManager |
PaymentGroupShippingGroupRelationship |
getPaymentGroupShippingGroupRelationship(Order pOrder,
java.lang.String pPaymentGroupId,
java.lang.String pShippingGroupId)
Deprecated. this method has been moved to the PaymentGroupManager |
PipelineManager |
getPipelineManager()
Returns the pipelineManager |
java.util.HashMap |
getProcessOrderMap(java.util.Locale pLocale,
java.util.Map pMap)
This map is used to pass additional information in the process order pipe line. |
java.lang.String |
getRelationshipItemDescriptorName()
Returns the relationshipItemDescriptorName |
java.lang.String |
getRelationshipOrderPropertyName()
Returns the relationshipOrderPropertyName |
long |
getRemainingQuantityForShippingGroup(CommerceItem pItem)
Deprecated. this method has been moved to the ShippingGroupManager |
java.util.List |
getShipItemRelsForRange(java.util.List pRelationships,
atg.core.util.Range pRange)
Return the relationships whose range fall within the given range |
ShippingGroup |
getShippingGroupByDescription(java.util.List pShippingGroups,
java.lang.String pDescription)
Deprecated. this method has been moved to the ShippingGroupManager |
ShippingGroupCommerceItemRelationship |
getShippingGroupCommerceItemRelationship(Order pOrder,
java.lang.String pCommerceItemId,
java.lang.String pShippingGroupId)
Deprecated. this method has been moved to the ShippingGroupManager |
java.lang.String |
getShippingGroupItemDescriptorName()
Returns the shippingGroupItemDescriptorName |
ShippingGroupManager |
getShippingGroupManager()
Returns property shippingGroupManager |
java.lang.String |
getShippingGroupOrderPropertyName()
Returns the shippingGroupOrderPropertyName |
atg.multisite.SiteGroupManager |
getSiteGroupManager()
Returns the SiteGroupManager |
long |
getUnassignedQuantityForCommerceItem(CommerceItem pItem)
Deprecated. this method has been moved to the CommerceItemManager |
java.util.List |
getUniqueCatalogRefIds(Order pOrder)
For the given order, return a list of all the catalog ref ids in the order. |
java.lang.String |
getUserPricingModelsPath()
The path to the PricingModelHolder in Nucleus which holds the user's pricing models |
java.lang.String[] |
getValidOrderProcessingStates()
Returns property validOrderProcessingStates |
java.lang.String[] |
getValidProcessOrderErrorStates()
Returns property validProcessOrderErrorStates. |
void |
initializeCreditCard(CreditCard pCreditCard,
java.lang.String pCreditCardNumber,
java.lang.String pCreditCardType)
Deprecated. this method has been moved to the PaymentGroupManager |
protected void |
initializeDefaultPropertyValues()
Initialize any properites whose default values should be computed at runtime before this component is first used. |
void |
initializeGiftCertificate(GiftCertificate pGiftCertificate,
java.lang.String pProfileId,
java.lang.String pGiftCertificateNumber)
Deprecated. this method has been moved to the PaymentGroupManager |
boolean |
isCreateSGRelationshipsOnMerge()
Return the createSGRelationshipsOnMerge property. |
boolean |
isOrderStateValidForProcessing(int pState)
This method returns true if pState is a valid state for processing. |
protected boolean |
isTransactionMarkedAsRollBack()
Returns true if the transaction associated with the current thread is marked for rollback. |
Order |
loadOrder(java.lang.String pOrderId)
Loads the order from the repository. |
protected boolean |
markTransactionForRollback()
Returns true if the transaction has been marked for rollback, false if unable to access the transaction. |
void |
mergeOrders(Order pSrcOrder,
Order pDestOrder)
This method merges the CommerceItems and ShippingGroups from pSrcOrder to pDestOrder. |
void |
mergeOrders(Order pSrcOrder,
Order pDestOrder,
boolean pMergeShippingGroups,
boolean pRemoveSrcOrder)
This method merges the CommerceItems and optionally ShippingGroups from pSrcOrder to pDestOrder. |
boolean |
orderExists(java.lang.String pOrderId)
Checks to see if an order id exists in the OrderRepository. |
PipelineResult |
processOrder(Order pOrder)
Begins processing the order. |
PipelineResult |
processOrder(Order pOrder,
java.util.HashMap pMap)
Begins processing the order. |
PipelineResult |
processOrder(Order pOrder,
java.util.Locale pLocale)
Begins processing the order. |
PipelineResult |
processOrder(Order pOrder,
java.lang.String pProcessOrderChainId,
java.util.HashMap pMap)
Begins processing the order. |
PipelineResult |
processOrderWithReprice(Order pOrder,
java.lang.String pLocale)
Deprecated. |
PipelineResult |
processOrderWithReprice(Order pOrder,
java.lang.String pLocale,
java.util.HashMap pExtraParams)
Submits the given order by calling processOrder
with the chain: PipelineConstants.PROCESSORDERWITHREPRICE
The locale that is used is determined in the following order:
pLocale - If not null
OrderManager.defaultLocale - if not null
ServletUtil.getUserLocale |
PipelineResult |
recalculatePaymentGroupAmounts(Order pOrder)
Deprecated. this method has been moved to the PaymentGroupManager |
void |
removeAllCommerceItemsFromOrder(Order pOrder)
Deprecated. this method has been moved to the CommerceItemManager |
void |
removeAllHandlingInstructionsFromShippingGroup(Order pOrder,
java.lang.String pShippingGroupId)
Deprecated. this method has been moved to the HandlingInstructionManager |
void |
removeAllPaymentGroupsFromOrder(Order pOrder)
Deprecated. this method has been moved to the PaymentGroupManager |
void |
removeAllRelationshipsFromCommerceItem(Order pOrder,
java.lang.String pCommerceItemId)
Deprecated. this method has been moved to the CommerceItemManager |
void |
removeAllRelationshipsFromPaymentGroup(Order pOrder,
java.lang.String pPaymentGroupId)
Deprecated. this method has been moved to the PaymentGroupManager |
void |
removeAllRelationshipsFromShippingGroup(Order pOrder,
java.lang.String pShippingGroupId)
Deprecated. this method has been moved to the ShippingGroupManager |
void |
removeAllShippingGroupsFromOrder(Order pOrder)
Deprecated. this method has been moved to the ShippingGroupManager |
void |
removeEmptyPaymentGroups(Order pOrder)
Deprecated. this method has been moved to the PaymentGroupManager |
void |
removeEmptyShippingGroups(Order pOrder)
Deprecated. this method has been moved to the ShippingGroupManager |
void |
removeHandlingInstructionFromShippingGroup(Order pOrder,
java.lang.String pShippingGroupId,
java.lang.String pHandlingInstructionId)
Deprecated. this method has been moved to the HandlingInstructionManager |
void |
removeHandlingInstructionsFromShippingGroup(Order pOrder,
java.lang.String pShippingGroupId,
java.lang.String pCommerceItemId)
Deprecated. this method has been moved to the HandlingInstructionManager |
void |
removeItemAmountFromPaymentGroup(Order pOrder,
java.lang.String pCommerceItemId,
java.lang.String pPaymentGroupId,
double pAmount)
Deprecated. this method has been moved to the CommerceItemManager |
void |
removeItemFromOrder(Order pOrder,
java.lang.String pCommerceItemId)
Deprecated. this method has been moved to the CommerceItemManager |
protected void |
removeItemFromPaymentGroupInternal(Order pOrder,
PaymentGroupCommerceItemRelationship pRel)
Deprecated. this method has been moved to the CommerceItemManager |
void |
removeItemQuantityFromShippingGroup(Order pOrder,
java.lang.String pCommerceItemId,
java.lang.String pShippingGroupId,
long pQuantity)
Deprecated. this method has been moved to the CommerceItemManager |
void |
removeOrder(java.lang.String pOrderId)
Removes the Order with the given id from the repository. |
void |
removeOrderAmountFromPaymentGroup(Order pOrder,
java.lang.String pPaymentGroupId,
double pAmount)
Removes the given amount of the Order's cost from the PaymentGroup with the given id. |
protected void |
removeOrderFromPaymentGroupInternal(Order pOrder,
PaymentGroupOrderRelationship pRel)
Removes the PaymentGroupOrderRelationship from the Order. |
void |
removeOrderMergeListener(OrderMergeListener pListener)
Remove a listener from the set of event listeners that are notified when orders are merged. |
void |
removePaymentGroupFromOrder(Order pOrder,
java.lang.String pPaymentGroupId)
Deprecated. this method has been moved to the PaymentGroupManager |
void |
removeRemainingItemAmountFromPaymentGroup(Order pOrder,
java.lang.String pCommerceItemId,
java.lang.String pPaymentGroupId)
Deprecated. this method has been moved to the CommerceItemManager |
void |
removeRemainingItemQuantityFromShippingGroup(Order pOrder,
java.lang.String pCommerceItemId,
java.lang.String pShippingGroupId)
Deprecated. this method has been moved to the CommerceItemManager |
void |
removeRemainingOrderAmountFromPaymentGroup(Order pOrder,
java.lang.String pPaymentGroupId)
Removes the "remaining" amount of the Order's cost from the PaymentGroup with the given id. |
void |
removeRemainingShippingCostFromPaymentGroup(Order pOrder,
java.lang.String pShippingGroupId,
java.lang.String pPaymentGroupId)
Deprecated. this method has been moved to the ShippingGroupManager |
void |
removeRemainingTaxAmountFromPaymentGroup(Order pOrder,
java.lang.String pPaymentGroupId)
Removes the "remaining" amount of the Order's tax from the PaymentGroup with the given id. |
void |
removeShippingCostAmountFromPaymentGroup(Order pOrder,
java.lang.String pShippingGroupId,
java.lang.String pPaymentGroupId,
double pAmount)
Deprecated. this method has been moved to the ShippingGroupManager |
protected void |
removeShippingCostFromPaymentGroupInternal(Order pOrder,
PaymentGroupShippingGroupRelationship pRel)
Deprecated. this method has been moved to the ShippingGroupManager |
void |
removeShippingGroupFromOrder(Order pOrder,
java.lang.String pShippingGroupId)
Deprecated. this method has been moved to the ShippingGroupManager |
void |
removeTaxAmountFromPaymentGroup(Order pOrder,
java.lang.String pPaymentGroupId,
double pAmount)
Removes the given amount of the Order's tax from the PaymentGroup with the given id. |
void |
resetOrder(Order pClonedOrder)
This method takes an order and resets it to a state where it can be resubmitted for checkout. |
void |
resetOrderCommerceItemRelationships(Order pOrder)
Resets the commerce item relationships in the order. |
void |
returnCommerceItem(Order pOrder,
java.lang.String pCommerceItemId,
java.lang.String pShippingGroupId,
long pQuantity)
Deprecated. this method has been moved to the CommerceItemManager |
void |
sendOrderMergeEvent(Order pSource,
Order pDest,
boolean pRemove)
Send an order merged event to the current set of event listeners. |
void |
setCommerceItemItemDescriptorName(java.lang.String pCommerceItemItemDescriptorName)
Sets the commerceItemItemDescriptorName |
void |
setCommerceItemManager(CommerceItemManager pCommerceItemManager)
Sets property commerceItemManager |
void |
setCommerceItemOrderPropertyName(java.lang.String pCommerceItemOrderPropertyName)
Sets the commerceItemOrderPropertyName |
void |
setCreateSGRelationshipsOnMerge(boolean pCreateSGRelationshipsOnMerge)
Set the createSGRelationshipsOnMerge property. |
void |
setDebugOrderRepositoryItemUpdateTransaction(boolean pDebugOrderRepositoryItemUpdateTransaction)
This method returns whether or not an warning debug stack trace will be generated when order repoisoty item is updated but OrderManager.updateOrder is not be called in the same transaction. |
void |
setDefaultLocale(java.util.Locale pDefaultLocale)
Sets property DefaultLocale |
void |
setDefaultOrderByDirection(boolean pDefaultOrderByDirection)
Sets the defaultOrderByDirection |
void |
setDefaultOrderByProperty(java.lang.String pDefaultOrderByProperty)
Sets the defaultOrderByProperty |
void |
setHandlingInstructionManager(HandlingInstructionManager pHandlingInstructionManager)
Sets property handlingInstructionManager |
void |
setOrderCommerceItemsPropertyName(java.lang.String pOrderCommerceItemsPropertyName)
Sets the orderCommerceItemsPropertyName |
void |
setOrderItemDescriptorName(java.lang.String pOrderItemDescriptorName)
Sets property OrderItemDescriptorName |
void |
setOrderPaymentGroupsPropertyName(java.lang.String pOrderPaymentGroupsPropertyName)
Sets the orderPaymentGroupsPropertyName |
void |
setOrderQueries(OrderQueries pOrderQueries)
Sets property orderQueries |
void |
setOrderRelationshipsPropertyName(java.lang.String pOrderRelationshipsPropertyName)
Sets the orderRelationshipsPropertyName |
void |
setOrderShippingGroupsPropertyName(java.lang.String pOrderShippingGroupsPropertyName)
Sets the orderShippingGroupsPropertyName |
void |
setOrderTools(OrderTools pOrderTools)
Sets the OrderTools |
void |
setOrderVersionPropertyName(java.lang.String pOrderVersionPropertyName)
Sets property orderVersionPropertyName |
void |
setPaymentGroupItemDescriptorName(java.lang.String pPaymentGroupItemDescriptorName)
Sets the paymentGroupItemDescriptorName |
void |
setPaymentGroupManager(PaymentGroupManager pPaymentGroupManager)
Sets property paymentGroupManager |
void |
setPaymentGroupOrderPropertyName(java.lang.String pPaymentGroupOrderPropertyName)
Sets the paymentGroupOrderPropertyName |
void |
setRelationshipItemDescriptorName(java.lang.String pRelationshipItemDescriptorName)
Sets the relationshipItemDescriptorName |
void |
setRelationshipOrderPropertyName(java.lang.String pRelationshipOrderPropertyName)
Sets the relationshipOrderPropertyName |
void |
setShippingGroupItemDescriptorName(java.lang.String pShippingGroupItemDescriptorName)
Sets the shippingGroupItemDescriptorName |
void |
setShippingGroupManager(ShippingGroupManager pShippingGroupManager)
Sets property shippingGroupManager |
void |
setShippingGroupOrderPropertyName(java.lang.String pShippingGroupOrderPropertyName)
Sets the shippingGroupOrderPropertyName |
void |
setSiteGroupManager(atg.multisite.SiteGroupManager pSiteGroupManager)
Sets the SiteGroupManager |
void |
setUserPricingModelsPath(java.lang.String pUserPricingModelsPath)
the path to the PricingModelHolder in Nucleus which holds the user's pricing models |
void |
setValidOrderProcessingStates(java.lang.String[] pValidOrderProcessingStates)
Sets property validOrderProcessingStates |
void |
setValidProcessOrderErrorStates(java.lang.String[] pValidProcessOrderErrorStates)
Sets property validProcessOrderErrorStates |
java.util.List |
splitShippingGroup(Order pOrder,
java.lang.String pShippingGroupId,
java.lang.String[] pItemIds)
Deprecated. this method has been moved to the ShippingGroupManager |
java.util.List |
splitShippingGroup(Order pOrder,
java.lang.String pShippingGroupId,
java.lang.String[] pItemIds,
long[] pQuantities)
Deprecated. this method has been moved to the ShippingGroupManager |
protected java.util.List |
splitShippingGroupWithImplicitRelationships(Order pOrder,
ShippingGroup pShippingGroup,
java.lang.String[] pItemIds,
long[] pQuantities)
Deprecated. this method has been moved to the ShippingGroupManager |
void |
updateOrder(Order pOrder)
Updates (saves) the data in the order to the repository. |
PipelineResult |
validateOrder(Order pOrder)
Validates an order. |
PipelineResult |
validateOrder(Order pOrder,
java.util.HashMap pMap)
Validates an order. |
PipelineResult |
validateOrder(Order pOrder,
java.util.Locale pLocale)
Validates an order. |
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 static java.util.ResourceBundle sResourceBundle
protected static OrderManager mOrderManager
protected ComponentName mUserPricingModelsPath
protected java.util.List mOrderMergeListeners
Constructor Detail |
---|
public OrderManager()
Method Detail |
---|
public static OrderManager getOrderManager()
public void setUserPricingModelsPath(java.lang.String pUserPricingModelsPath)
pUserPricingModelsPath
- new value to setpublic java.lang.String getUserPricingModelsPath()
public java.lang.String getOrderItemDescriptorName()
public void setOrderItemDescriptorName(java.lang.String pOrderItemDescriptorName)
pOrderItemDescriptorName
- the value to set for property OrderItemDescriptorNamepublic java.lang.String getShippingGroupItemDescriptorName()
public void setShippingGroupItemDescriptorName(java.lang.String pShippingGroupItemDescriptorName)
public java.lang.String getPaymentGroupItemDescriptorName()
public void setPaymentGroupItemDescriptorName(java.lang.String pPaymentGroupItemDescriptorName)
public java.lang.String getCommerceItemItemDescriptorName()
public void setCommerceItemItemDescriptorName(java.lang.String pCommerceItemItemDescriptorName)
public java.lang.String getRelationshipItemDescriptorName()
public void setRelationshipItemDescriptorName(java.lang.String pRelationshipItemDescriptorName)
public java.lang.String getOrderRelationshipsPropertyName()
public void setOrderRelationshipsPropertyName(java.lang.String pOrderRelationshipsPropertyName)
public java.lang.String getOrderPaymentGroupsPropertyName()
public void setOrderPaymentGroupsPropertyName(java.lang.String pOrderPaymentGroupsPropertyName)
public java.lang.String getOrderShippingGroupsPropertyName()
public void setOrderShippingGroupsPropertyName(java.lang.String pOrderShippingGroupsPropertyName)
public java.lang.String getOrderCommerceItemsPropertyName()
public void setOrderCommerceItemsPropertyName(java.lang.String pOrderCommerceItemsPropertyName)
public java.lang.String getCommerceItemOrderPropertyName()
public void setCommerceItemOrderPropertyName(java.lang.String pCommerceItemOrderPropertyName)
public java.lang.String getShippingGroupOrderPropertyName()
public void setShippingGroupOrderPropertyName(java.lang.String pShippingGroupOrderPropertyName)
public java.lang.String getPaymentGroupOrderPropertyName()
public void setPaymentGroupOrderPropertyName(java.lang.String pPaymentGroupOrderPropertyName)
public java.lang.String getRelationshipOrderPropertyName()
public void setRelationshipOrderPropertyName(java.lang.String pRelationshipOrderPropertyName)
public java.lang.String getOrderVersionPropertyName()
public void setOrderVersionPropertyName(java.lang.String pOrderVersionPropertyName)
pOrderVersionPropertyName
- the value to set for property orderVersionPropertyNamepublic javax.naming.InitialContext getJNDIContext() throws javax.naming.NamingException
javax.naming.NamingException
public CommerceItemManager getCommerceItemManager()
public void setCommerceItemManager(CommerceItemManager pCommerceItemManager)
pCommerceItemManager
- the value to set for property commerceItemManagerpublic ShippingGroupManager getShippingGroupManager()
public void setShippingGroupManager(ShippingGroupManager pShippingGroupManager)
pShippingGroupManager
- the value to set for property shippingGroupManagerpublic PaymentGroupManager getPaymentGroupManager()
public void setPaymentGroupManager(PaymentGroupManager pPaymentGroupManager)
pPaymentGroupManager
- the value to set for property paymentGroupManagerpublic HandlingInstructionManager getHandlingInstructionManager()
public void setHandlingInstructionManager(HandlingInstructionManager pHandlingInstructionManager)
pHandlingInstructionManager
- the value to set for property handlingInstructionManagerpublic OrderQueries getOrderQueries()
public void setOrderQueries(OrderQueries pOrderQueries)
pOrderQueries
- the value to set for property orderQueriespublic void setCreateSGRelationshipsOnMerge(boolean pCreateSGRelationshipsOnMerge)
public boolean isCreateSGRelationshipsOnMerge()
public void setDefaultLocale(java.util.Locale pDefaultLocale)
public java.util.Locale getDefaultLocale()
public PipelineManager getPipelineManager()
public CatalogTools getCatalogTools()
public OrderTools getOrderTools()
public void setOrderTools(OrderTools pOrderTools)
public atg.multisite.SiteGroupManager getSiteGroupManager()
public void setSiteGroupManager(atg.multisite.SiteGroupManager pSiteGroupManager)
pSiteGroupManager
- the value to set for property siteGroupManagerpublic java.lang.String getDefaultOrderByProperty()
public void setDefaultOrderByProperty(java.lang.String pDefaultOrderByProperty)
public boolean getDefaultOrderByDirection()
public void setDefaultOrderByDirection(boolean pDefaultOrderByDirection)
public java.lang.String[] getValidOrderProcessingStates()
public void setValidOrderProcessingStates(java.lang.String[] pValidOrderProcessingStates)
pValidOrderProcessingStates
- the value to set for property validOrderProcessingStatespublic java.lang.String[] getValidProcessOrderErrorStates()
public void setValidProcessOrderErrorStates(java.lang.String[] pValidProcessOrderErrorStates)
pValidProcessOrderErrorStates
- the value to set for property validProcessOrderErrorStatespublic void setDebugOrderRepositoryItemUpdateTransaction(boolean pDebugOrderRepositoryItemUpdateTransaction)
public boolean getDebugOrderRepositoryItemUpdateTransaction()
protected void initializeDefaultPropertyValues() throws CommerceException
CommerceException
public void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting uppublic Order createOrder(java.lang.String pProfileId) throws CommerceException
pProfileId
- the id of the Profile object which this Order belongs to
InvalidParameterException
- thrown if any of the parameters are null
ObjectCreationException
- if the instantiation of an object fails
CommerceException
OrderTools.getDefaultOrderType()
public Order createOrder(java.lang.String pProfileId, java.lang.String pOrderType) throws CommerceException
pProfileId
- the id of the Profile object which this Order belongs topOrderType
- the type that is mapped in the OrderTools.properties file to the class of
the desired type to create
InvalidParameterException
- thrown if any of the parameters are null
ObjectCreationException
- if the instantiation of an object fails
CommerceException
public Order createOrder(java.lang.String pProfileId, java.lang.String pOrderId, java.lang.String pOrderType) throws CommerceException
pProfileId
- the id of the Profile object which this Order belongs topOrderId
- the id which will be assigned to the OrderpOrderType
- the type that is mapped in the OrderTools.properties file to the class of
the desired type to create
InvalidParameterException
- thrown if any of the parameters are null
ObjectCreationException
- if the instantiation of an object fails
CommerceException
public Order createOrder(java.lang.String pProfileId, OrderPriceInfo pOrderPriceInfo, TaxPriceInfo pTaxPriceInfo, ShippingPriceInfo pShippingPriceInfo) throws CommerceException
pProfileId
- the id of the Profile object which this Order belongs topOrderPriceInfo
- the OrderPriceInfo object for this Order. Can be null.pTaxPriceInfo
- the TaxPriceInfo object for this Order Can be null.pShippingPriceInfo
- the ShippingPriceInfo object for the default ShippingGroup. Can be null.
InvalidParameterException
- thrown if any of the parameters are null
ObjectCreationException
- if the instantiation of an object fails
CommerceException
OrderTools.getDefaultOrderType()
public Order createOrder(java.lang.String pProfileId, OrderPriceInfo pOrderPriceInfo, TaxPriceInfo pTaxPriceInfo, ShippingPriceInfo pShippingPriceInfo, java.lang.String pOrderType) throws CommerceException
pProfileId
- the id of the Profile object which this Order belongs topOrderPriceInfo
- the OrderPriceInfo object for this Order. Can be null.pTaxPriceInfo
- the TaxPriceInfo object for this Order. Can be null.pShippingPriceInfo
- the ShippingPriceInfo object for the default ShippingGroup. Can be null.pOrderType
- the name that is mapped in the OrderTools.properties file to the class of
the desired type to create
InvalidParameterException
- thrown if any of the parameters are null
ObjectCreationException
- if the instantiation of an object fails
CommerceException
public Order createOrder(java.lang.String pProfileId, java.lang.String pOrderId, OrderPriceInfo pOrderPriceInfo, TaxPriceInfo pTaxPriceInfo, ShippingPriceInfo pShippingPriceInfo, java.lang.String pOrderType) throws CommerceException
pProfileId
- the id of the Profile object which this Order belongs topOrderId
- the id which will be assigned to the OrderpOrderPriceInfo
- the OrderPriceInfo object for this OrderpTaxPriceInfo
- the TaxPriceInfo object for this OrderpShippingPriceInfo
- the ShippingPriceInfo object for the default ShippingGrouppOrderType
- the name that is mapped in the OrderTools.properties file to the class of
the desired type to create
InvalidParameterException
- thrown if any of the parameters are null
ObjectCreationException
- if the instantiation of an object fails
CommerceException
public void addOrder(Order pOrder) throws CommerceException
pOrder
- the order to add to the repository
InvalidParameterException
- thrown if any of the parameters are null
or if the Order is not transient
CommerceException
- if an error occurs accessing the repositorypublic void removeOrder(java.lang.String pOrderId) throws CommerceException
pOrderId
- the id of the order to remove from the repository
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
- if an error occurs accessing the repositorypublic Order[] areOrdersMergeable(Order pSrcOrder, Order pDestOrder)
null
. If not,
we return an array containing the order or orders that did not meet
the merge requirements.
This method can be overridden to produce other merge behaviour.
pOrder1
- -- the source orderpOrder2
- -- the destination order
public void mergeOrders(Order pSrcOrder, Order pDestOrder) throws CommerceException
pSrcOrder
- the Order to copy frompDestOrder
- the Order to copy to
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
- if an error occurs accessing the repositorypublic void mergeOrders(Order pSrcOrder, Order pDestOrder, boolean pMergeShippingGroups, boolean pRemoveSrcOrder) throws CommerceException
pSrcOrder
- the Order to copy frompDestOrder
- the Order to copy topMergeShippingGroups
- a flag which indicates whether to merge ShippingGroupspRemoveSrcOrder
- if true, will call removeOrder() on pSrcOrder
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
- if an error occurs accessing the repositorypublic boolean compareHardgoodShippingGroups(ShippingGroup pSrcShippingGroup, ShippingGroup pDestShippingGroup)
pSrcShippingGroup
- source shipping group to be comparedpDestShippingGroup
- destination shipping group to be compared
public boolean compareElectronicShippingGroups(ShippingGroup pSrcShippingGroup, ShippingGroup pDestShippingGroup)
pSrcShippingGroup
- source shipping group to be comparedpDestShippingGroup
- destination shipping group to be compared
public boolean compareHandlingInstructions(HandlingInstruction pSrcHandlingInstruction, HandlingInstruction pDestHandlingInstruction)
pSrcHandlingInstruction
- source handling instruction to be comparedpDestHandlingInstruction
- destination handling instruction to be compared
public boolean compareGiftlistHandlingInstructions(GiftlistHandlingInstruction pSrcGiftListHandlingInst, GiftlistHandlingInstruction pDestGiftListHandlingInst)
pSrcGiftListHandlingInst
- source gift list handling instruction to be comparedpDestGiftListHandlingInst
- destination gift list handling instruction to be compared
protected Relationship createRelationship(java.lang.String pRelationshipType) throws CommerceException
pRelationshipType
- the type 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
InvalidTypeException
- if the given type is not valid
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
public java.util.List getAllOrderRelationships(Order pOrder) throws CommerceException
pOrder
- the Order whose relationships are sought
InvalidParameterException
- thrown if order parameter is null
CommerceException
Relationship
,
OrderRelationship
,
PaymentGroupOrderRelationship
public void addTaxAmountToPaymentGroup(Order pOrder, java.lang.String pPaymentGroupId, double pAmount) throws CommerceException
pOrder
- the Order which the PaymentGroup existspPaymentGroupId
- the id of the PaymentGroup which the Order's tax will be added topAmount
- the amount that is assigned for payment to the PaymentGroup
InvalidParameterException
- thrown if any of the parameters are null
InvalidTypeException
- thrown if more than one REMAINING relationship type is added to a PaymentGroup
or if an invalid type is set to the Relationship
ObjectCreationException
- if the instantiation of an object fails
CommerceException
PaymentGroupOrderRelationship
public void addRemainingTaxAmountToPaymentGroup(Order pOrder, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- the Order which the PaymentGroup existspPaymentGroupId
- the id of the PaymentGroup which the Order's tax will be added to
InvalidParameterException
- thrown if any of the parameters are null
InvalidTypeException
- thrown if more than one REMAINING relationship type is added to a PaymentGroup
or if an invalid type is set to the Relationship
ObjectCreationException
- if the instantiation of an object fails
CommerceException
PaymentGroupOrderRelationship
public void addOrderAmountToPaymentGroup(Order pOrder, java.lang.String pPaymentGroupId, double pAmount) throws CommerceException
pOrder
- the Order which the PaymentGroup existspPaymentGroupId
- the id of the PaymentGroup which the Order's cost will be added topAmount
- the amount that is assigned for payment to the PaymentGroup
InvalidParameterException
- thrown if any of the parameters are null
InvalidTypeException
- thrown if more than one REMAINING relationship type is added to a PaymentGroup
or if an invalid type is set to the Relationship
ObjectCreationException
- if the instantiation of an object fails
CommerceException
PaymentGroupOrderRelationship
public void addRemainingOrderAmountToPaymentGroup(Order pOrder, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- the Order which the PaymentGroup existspPaymentGroupId
- the id of the PaymentGroup which the Order's cost will be added to
InvalidParameterException
- thrown if any of the parameters are null
InvalidTypeException
- thrown if more than one REMAINING relationship type is added to a PaymentGroup
or if an invalid type is set to the Relationship
ObjectCreationException
- if the instantiation of an object fails
CommerceException
PaymentGroupOrderRelationship
public void removeTaxAmountFromPaymentGroup(Order pOrder, java.lang.String pPaymentGroupId, double pAmount) throws CommerceException
pOrder
- the Order which the PaymentGroup existspPaymentGroupId
- the id of the PaymentGroup to remove the tax amount frompAmount
- the amount to remove
InvalidParameterException
- thrown if any of the parameters are null
RelationshipNotFoundException
- if the given Relationship is not found in the
PaymentGroup or Order
ObjectRemovalException
- if the removal of the object fails
CommerceException
public void removeOrderAmountFromPaymentGroup(Order pOrder, java.lang.String pPaymentGroupId, double pAmount) throws CommerceException
pOrder
- the Order which the PaymentGroup existspPaymentGroupId
- the id of the PaymentGroup to remove the amount frompAmount
- the amount to remove
InvalidParameterException
- thrown if any of the parameters are null
RelationshipNotFoundException
- if the given Relationship is not found in the
PaymentGroup or Order
ObjectRemovalException
- if the removal of the object fails
CommerceException
public void removeRemainingOrderAmountFromPaymentGroup(Order pOrder, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- the Order which the PaymentGroup existspPaymentGroupId
- the id of the PaymentGroup
InvalidParameterException
- thrown if any of the parameters are null
RelationshipNotFoundException
- if the given relationship is not found in the
PaymentGroup or Order
ObjectRemovalException
- if the removal of the object fails
CommerceException
public void removeRemainingTaxAmountFromPaymentGroup(Order pOrder, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- the Order which the PaymentGroup existspPaymentGroupId
- the id of the PaymentGroup
InvalidParameterException
- thrown if any of the parameters are null
RelationshipNotFoundException
- if the given relationship is not found in the
PaymentGroup or Order
ObjectRemovalException
- if the removal of the object fails
CommerceException
protected void removeOrderFromPaymentGroupInternal(Order pOrder, PaymentGroupOrderRelationship pRel) throws CommerceException
pOrder
- the Order which the PaymentGroup existspRel
- the relationship which assigns the Order to the PaymentGroup
RelationshipNotFoundException
- if the given relationship is not found in the
PaymentGroup or Order
ObjectRemovalException
- if the removal of the object fails
CommerceException
PaymentGroupOrderRelationship
public java.util.List getShipItemRelsForRange(java.util.List pRelationships, atg.core.util.Range pRange) throws CommerceException
pRelationships
- A list of ShippingGroupCommerceItemRelationshipspRange
- The range we are interested in
CommerceException
public boolean orderExists(java.lang.String pOrderId) throws CommerceException
pOrderId
- the Order id to checktrue
- if an order with the given id exists, false otherwise.
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an error occurs while checking the repositorypublic Order getOrderForShippingGroup(ShippingGroup pShippingGroup) throws CommerceException, RepositoryException
pShippingGroup
- the Order which the ShippingGroup is in
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
- thrown if an error occurs while updating the Order
RepositoryException
- thrown if an error occurs while retriving data from
the repositorypublic Order getOrderForPaymentGroup(PaymentGroup pPaymentGroup) throws CommerceException, RepositoryException
pPaymentGroup
- the Order which the PaymentGroup is in
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
- thrown if an error occurs while updating the Order
RepositoryException
- thrown if an error occurs while retriving data from
the repositorypublic Order getOrderForCommerceItem(CommerceItem pCommerceItem) throws CommerceException, RepositoryException
pCommerceItem
- the Order which the CommerceItem is in
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
- thrown if an error occurs while updating the Order
RepositoryException
- thrown if an error occurs while retriving data from
the repositorypublic Order getOrderForRelationship(Relationship pRelationship) throws CommerceException, RepositoryException
pRelationship
- the Order which the Relationship is in
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
- thrown if an error occurs while updating the Order
RepositoryException
- thrown if an error occurs while retriving data from
the repositorypublic void updateOrder(Order pOrder) throws CommerceException
pOrder
- the Order to add the CommerceItem to
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
- thrown if an error occurs while updating the Orderpublic Order loadOrder(java.lang.String pOrderId) throws CommerceException
pOrderId
- the Order id to load from the repository.
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an error occurs while loading the Orderpublic boolean isOrderStateValidForProcessing(int pState)
pState
- the state to check
public PipelineResult processOrder(Order pOrder) throws CommerceException
pOrder
- the Order to be checked out
CommerceException
- thrown if an error occurs while checking out the Orderpublic java.util.HashMap getProcessOrderMap(java.util.Locale pLocale, java.util.Map pMap) throws CommerceException
pLocale
- pMap
-
CommerceException
public PipelineResult processOrder(Order pOrder, java.util.Locale pLocale) throws CommerceException
pOrder
- the Order to be checked outpLocale
- the locale of the user for which this order is being processed.
In general this can be used for generating error messages in the user's
chosen language
CommerceException
- thrown if an error occurs while checking out the Orderpublic PipelineResult processOrder(Order pOrder, java.util.HashMap pMap) throws CommerceException
pOrder
- the Order to be checked outpMap
- a map of parameters to supply to the processOrder pipeline chain
CommerceException
- thrown if an error occurs while checking out the Orderpublic PipelineResult processOrder(Order pOrder, java.lang.String pProcessOrderChainId, java.util.HashMap pMap) throws CommerceException
pOrder
- the Order to be checked outpProcessOrderChainId
- the chain id to run to process the orderpMap
- a map of parameters to supply to the processOrder pipeline chain
CommerceException
- thrown if an error occurs while checking out the Orderpublic PipelineResult validateOrder(Order pOrder) throws CommerceException
pOrder
- the Order to be validated
CommerceException
- thrown if an error occurs while validating the Orderpublic PipelineResult validateOrder(Order pOrder, java.util.Locale pLocale) throws CommerceException
pOrder
- the Order to be validatedpLocale
- the locale of the user for which this order is being validated.
In general this can be used for generating error messages in the
user's chosen language
CommerceException
- thrown if an error occurs while validating the Orderpublic PipelineResult validateOrder(Order pOrder, java.util.HashMap pMap) throws CommerceException
pOrder
- the Order to be validatedpMap
- a map of parameters to supply to the validateForCheckout pipeline chain
CommerceException
- thrown if an error occurs while validating the Orderpublic void resetOrder(Order pClonedOrder)
pClonedOrder
- The order to reset for checkoutpublic void resetOrderCommerceItemRelationships(Order pOrder)
pOrder
- an Order
itempublic java.util.List getUniqueCatalogRefIds(Order pOrder)
pOrder
- The order we are checking
protected boolean isTransactionMarkedAsRollBack()
protected boolean markTransactionForRollback()
public PipelineResult processOrderWithReprice(Order pOrder, java.lang.String pLocale) throws CommerceException
processOrder
with the chain: PipelineConstants.PROCESSORDERWITHREPRICE
The locale that is used is determined in the following order:
pLocale - If not null
OrderManager.defaultLocale - if not null
ServletUtil.getUserLocale
pOrderId
- The id of the order to be submittedpLocale
- The locale to use. This may be nullpExtraParams
- Any extra params to be passed to the pipeline
CommerceException
public PipelineResult processOrderWithReprice(Order pOrder, java.lang.String pLocale, java.util.HashMap pExtraParams) throws CommerceException
processOrder
with the chain: PipelineConstants.PROCESSORDERWITHREPRICE
The locale that is used is determined in the following order:
pLocale - If not null
OrderManager.defaultLocale - if not null
ServletUtil.getUserLocale
pOrderId
- The id of the order to be submittedpLocale
- The locale to use. This may be null
CommerceException
public void addOrderMergeListener(OrderMergeListener pListener)
public void removeOrderMergeListener(OrderMergeListener pListener)
public void sendOrderMergeEvent(Order pSource, Order pDest, boolean pRemove)
public CommerceItem createCommerceItem(java.lang.String pCatalogRefId, java.lang.String pProductId, long pQuantity) throws CommerceException
pCatalogRefId
- the id of the catalog object reference that this CommerceItem representspProductId
- the product id that this CommerceItem referencespQuantity
- the quantity that this CommerceItem should represent
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultCommerceItemType()
,
CommerceItemManager
public CommerceItem createCommerceItem(java.lang.String pCatalogRefId, java.lang.String pProductId, long pQuantity, java.lang.String pCatalogKey) throws CommerceException
pCatalogRefId
- the id of the catalog object reference that this CommerceItem representspProductId
- the product id that this CommerceItem referencespCatalogKey
- the catalog key reference (locale) for this CommerceItempQuantity
- the quantity that this CommerceItem should represent
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultCommerceItemType()
,
CommerceItemManager
public CommerceItem createCommerceItem(java.lang.String pCatalogRefId, java.lang.Object pCatalogRef, java.lang.String pProductId, long pQuantity) throws CommerceException
pCatalogRefId
- the id of the catalog object reference that this CommerceItem representspCatalogRef
- the catalog object reference that this CommerceItem representspProductId
- the product id that this CommerceItem referencespQuantity
- the quantity that this CommerceItem should represent
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultCommerceItemType()
,
CommerceItemManager
public CommerceItem createCommerceItem(java.lang.String pCatalogRefId, java.lang.Object pCatalogRef, java.lang.String pProductId, java.lang.Object pProductRef, long pQuantity) throws CommerceException
pCatalogRefId
- the id of the catalog object reference that this CommerceItem representspCatalogRef
- the catalog object reference that this CommerceItem representspProductId
- the product id that this CommerceItem referencespProductRef
- the product object reference that this CommerceItem representspQuantity
- the quantity that this CommerceItem should represent
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultCommerceItemType()
,
CommerceItemManager
public CommerceItem createCommerceItem(java.lang.String pCatalogRefId, java.lang.Object pCatalogRef, java.lang.String pProductId, long pQuantity, ItemPriceInfo pPriceInfo) throws CommerceException
pCatalogRefId
- the id of the catalog object reference that this CommerceItem representspCatalogRef
- the catalog object reference that this CommerceItem representspProductId
- the product id that this CommerceItem referencespQuantity
- the quantity that this CommerceItem should representpPriceInfo
- the ItemPriceInfo object for this CommerceItem
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultCommerceItemType()
,
CommerceItemManager
public CommerceItem createCommerceItem(java.lang.String pCatalogRefId, java.lang.Object pCatalogRef, java.lang.String pProductId, java.lang.Object pProductRef, long pQuantity, ItemPriceInfo pPriceInfo) throws CommerceException
pCatalogRefId
- the id of the catalog object reference that this CommerceItem representspCatalogRef
- the catalog object reference that this CommerceItem representspProductId
- the product id that this CommerceItem referencespProductRef
- the product object reference that this CommerceItem representspQuantity
- the quantity that this CommerceItem should representpPriceInfo
- the ItemPriceInfo object for this CommerceItem
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultCommerceItemType()
,
CommerceItemManager
public CommerceItem createCommerceItem(java.lang.String pItemType, java.lang.String pCatalogRefId, java.lang.Object pCatalogRef, java.lang.String pProductId, java.lang.Object pProductRef, long pQuantity, ItemPriceInfo pPriceInfo) throws CommerceException
pItemType
- the name that is mapped in the OrderTools.properties file to the class of
the desired type to createpCatalogRefId
- the id of the catalog object reference that this CommerceItem representspCatalogRef
- the catalog object reference that this CommerceItem representspProductId
- the product id that this CommerceItem referencespProductRef
- the product object reference that this CommerceItem representspQuantity
- the quantity that this CommerceItem should representpPriceInfo
- the ItemPriceInfo object for this CommerceItem
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultCommerceItemType()
,
CommerceItemManager
public CommerceItem createCommerceItem(java.lang.String pItemType, java.lang.String pCatalogRefId, java.lang.Object pCatalogRef, java.lang.String pProductId, java.lang.Object pProductRef, long pQuantity, java.lang.String pCatalogKey, ItemPriceInfo pPriceInfo) throws CommerceException
pItemType
- the name that is mapped in the OrderTools.properties file to the class of
the desired type to createpCatalogRefId
- the id of the catalog object reference that this CommerceItem representspCatalogRef
- the catalog object reference that this CommerceItem representspProductId
- the product id that this CommerceItem referencespProductRef
- the product object reference that this CommerceItem representspCatalogKey
- the catalog key reference (locale) for this CommerceItempQuantity
- the quantity that this CommerceItem should representpPriceInfo
- the ItemPriceInfo object for this CommerceItem
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultCommerceItemType()
,
CommerceItemManager
public CommerceItem addItemToOrder(Order pOrder, CommerceItem pItem) throws CommerceException
pOrder
- the Order to add the CommerceItem topItem
- the CommerceItem to add to the Order
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
- thrown if a CommerceItem is added and a DuplicateCommerceItemException
is caught. This is an internal error and will get thrown only if the id of the
CommerceItem being added already exists in the order. This should not happen
under normal circumstances.CommerceItemManager
public CommerceItem addAsSeparateItemToOrder(Order pOrder, CommerceItem pItem) throws CommerceException
pOrder
- the Order to add the CommerceItem topItem
- the CommerceItem to add to the Order
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
- thrown if a CommerceItem is added and a DuplicateCommerceItemException
is caught. This is an internal error and will get thrown only if the id of the
CommerceItem being added already exists in the order. This should not happen
under normal circumstances.CommerceItemManager
public void removeAllCommerceItemsFromOrder(Order pOrder) throws CommerceException
pOrder
- the Order which contains the CommerceItems to be removed
InvalidParameterException
- thrown if any of the parameters are null
ObjectRemovalException
- thrown if a CommerceItem cannot be removed
CommerceException
CommerceItemManager
public void removeItemFromOrder(Order pOrder, java.lang.String pCommerceItemId) throws CommerceException
pOrder
- the Order to remove the CommerceItem fompCommerceItemId
- the id of the CommerceItem to remove from the Order
InvalidParameterException
- thrown if any of the parameters are null
ObjectRemovalException
- thrown if the CommerceItem cannot be removed
CommerceException
CommerceItemManager
public void removeAllRelationshipsFromCommerceItem(Order pOrder, java.lang.String pCommerceItemId) throws CommerceException
pOrder
- the Order which contains the CommerceItem to remove the relationships frompCommerceItemId
- the id of the CommerceItem
InvalidParameterException
- thrown if any of the parameters are null
CommerceItemNotFoundException
- if an item with the given id is not found in the given order
ObjectRemovalException
- thrown if a relationship cannot be removed
CommerceException
CommerceItemManager
public java.util.List getAllCommerceItemRelationships(Order pOrder) throws CommerceException
pOrder
- the Order whose relationships are sought
InvalidParameterException
- thrown if order parameter is null
CommerceException
Relationship
,
CommerceItemRelationship
,
ShippingGroupCommerceItemRelationship
,
PaymentGroupCommerceItemRelationship
,
CommerceItemManager
public java.util.List getCommerceItemsFromShippingGroup(ShippingGroup pShippingGroup) throws CommerceException
pShippingGroup
- the ShippingGroup to retrieve the CommerceItems from
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
CommerceItemManager
public java.util.List getCommerceItemsFromPaymentGroup(PaymentGroup pPaymentGroup) throws CommerceException
pPaymentGroup
- the PaymentGroup to retrieve the CommerceItems from
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
CommerceItemManager
public long getUnassignedQuantityForCommerceItem(CommerceItem pItem)
pItem
- the CommerceItem we are checking
getRemainingQuantityForShippingGroup(CommerceItem)
,
CommerceItemManager
public void addItemAmountToPaymentGroup(Order pOrder, java.lang.String pCommerceItemId, java.lang.String pPaymentGroupId, double pAmount) throws CommerceException
pOrder
- the Order which the CommerceItem and ShippingGroup existpCommerceItemId
- the id of the CommerceItem to addpPaymentGroupId
- the id of the PaymentGroup which the CommerceItem will be added topAmount
- the amount of the CommerceItem which will be added
InvalidParameterException
- thrown if any of the parameters are null
InvalidTypeException
- thrown if more than one REMAINING relationship type is added to a PaymentGroup
or if an invalid type is set to the Relationship
ObjectCreationException
- if the instantiation of an object fails
CommerceException
PaymentGroupCommerceItemRelationship
,
CommerceItemManager
public void addRemainingItemAmountToPaymentGroup(Order pOrder, java.lang.String pCommerceItemId, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- the Order which the CommerceItem and ShippingGroup existpCommerceItemId
- the id of the CommerceItem to addpPaymentGroupId
- the id of the PaymentGroup which the CommerceItem will be added to
InvalidParameterException
- thrown if any of the parameters are null
InvalidTypeException
- thrown if more than one REMAINING relationship type is added to a PaymentGroup
or if an invalid type is set to the Relationship
ObjectCreationException
- if the instantiation of an object fails
CommerceException
ShippingGroupCommerceItemRelationship
,
CommerceItemManager
public void addItemQuantityToShippingGroup(Order pOrder, java.lang.String pCommerceItemId, java.lang.String pShippingGroupId, long pQuantity) throws CommerceException
pOrder
- the Order which the CommerceItem and ShippingGroup existpCommerceItemId
- the id of the CommerceItem to addpShippingGroupId
- the id of the ShippingGroup which the CommerceItem will be added topQuantity
- the quantity of the CommerceItem which will be added
InvalidParameterException
- thrown if any of the parameters are null
InvalidTypeException
- thrown if more than one REMAINING relationship type is added to a PaymentGroup
or if an invalid type is set to the Relationship
ObjectCreationException
- if the instantiation of an object fails
CommerceException
ShippingGroupCommerceItemRelationship
,
CommerceItemManager
public void addRemainingItemQuantityToShippingGroup(Order pOrder, java.lang.String pCommerceItemId, java.lang.String pShippingGroupId) throws CommerceException
pOrder
- the Order which the CommerceItem and ShippingGroup existpCommerceItemId
- the id of the CommerceItem to addpShippingGroupId
- the id of the ShippingGroup which the CommerceItem will be added to
InvalidParameterException
- thrown if any of the parameters are null
InvalidTypeException
- thrown if more than one REMAINING relationship type is added to a ShippingGroup
or if an invalid type is set to the Relationship
ObjectCreationException
- if the instantiation of an object fails
CommerceException
ShippingGroupCommerceItemRelationship
,
CommerceItemManager
public void removeItemQuantityFromShippingGroup(Order pOrder, java.lang.String pCommerceItemId, java.lang.String pShippingGroupId, long pQuantity) throws CommerceException
pOrder
- the Order which the CommerceItem and ShippingGroup existpCommerceItemId
- the id of the CommerceItem to to remove from the ShippingGrouppShippingGroupId
- the id of the ShippingGroup which the CommerceItem will be removed frompQuantity
- the quantity of the CommerceItem which will be removed
InvalidParameterException
- thrown if any of the parameters are null
ObjectRemovalException
- if the removal of the quantity fails
CommerceException
CommerceItemManager
public void removeRemainingItemQuantityFromShippingGroup(Order pOrder, java.lang.String pCommerceItemId, java.lang.String pShippingGroupId) throws CommerceException
pOrder
- the Order which the CommerceItem and ShippingGroup existpCommerceItemId
- the id of the CommerceItem to to remove from the ShippingGrouppShippingGroupId
- the id of the ShippingGroup which the CommerceItem will be removed from
InvalidParameterException
- thrown if any of the parameters are null
ShippingGroupNotFoundException
- if a ShippingGroup with the given id is not found in the given order
CommerceItemNotFoundException
- if a CommerceItem with the given id is not found in the given order
ObjectRemovalException
- if the removal of the object fails
CommerceException
CommerceItemManager
public void removeItemAmountFromPaymentGroup(Order pOrder, java.lang.String pCommerceItemId, java.lang.String pPaymentGroupId, double pAmount) throws CommerceException
pOrder
- the Order which the CommerceItem and PaymentGroup existpCommerceItemId
- the id of the CommerceItempPaymentGroupId
- the id of the PaymentGrouppAmount
- the amount to remove
InvalidParameterException
- thrown if any of the parameters are null or invalid
RelationshipNotFoundException
- if the given relationship is not found in the
PaymentGroup or CommerceItem
ObjectRemovalException
- if the removal of the quantity fails
CommerceException
CommerceItemManager
public void removeRemainingItemAmountFromPaymentGroup(Order pOrder, java.lang.String pCommerceItemId, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- the Order which the CommerceItem and PaymentGroup existpCommerceItemId
- the id of the CommerceItempPaymentGroupId
- the id of the PaymentGroup
InvalidParameterException
- thrown if any of the parameters are null
RelationshipNotFoundException
- if the given relationship is not found in the
PaymentGroup or CommerceItem
ObjectRemovalException
- if the removal of the object fails
CommerceException
CommerceItemManager
protected void removeItemFromPaymentGroupInternal(Order pOrder, PaymentGroupCommerceItemRelationship pRel) throws CommerceException
pOrder
- the Order which the CommerceItem and PaymentGroup existpRel
- the relationship which assigns the CommerceItem to the PaymentGroup
RelationshipNotFoundException
- if the given relationship is not found in the
PaymentGroup or CommerceItem
ObjectRemovalException
- if the removal of the object fails
CommerceException
PaymentGroupCommerceItemRelationship
,
CommerceItemManager
public void returnCommerceItem(Order pOrder, java.lang.String pCommerceItemId, java.lang.String pShippingGroupId, long pQuantity) throws CommerceException
pOrder
- the Order which contains the CommerceItem to returnpCommerceItemId
- the id of the CommerceItem to returnpShippingGroupId
- the id of the ShippingGroup which contains the CommerceItem to returnpQuantity
- the quantity of the CommerceItem to return. The quantity cannot be larger than
the quantity in the ShippingGroupCommerceItemRelationship
CommerceException
- if an exception occurs while returning a CommerceItemCommerceItemManager
public ShippingGroup createShippingGroup() throws CommerceException
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultShippingGroupType()
,
ShippingGroupManager
public ShippingGroup createShippingGroup(java.lang.String pShippingGroupType) throws CommerceException
pShippingGroupType
- the type mapped to the object instance to use for the ShippingGroup
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
ShippingGroupManager
public ShippingGroup createShippingGroup(java.lang.String pShippingGroupType, ShippingPriceInfo pPriceInfo) throws CommerceException
pShippingGroupType
- the type mapped to the object instance to use for the ShippingGrouppPriceInfo
- the ShippingPriceInfo object for this ShippingGroup
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
ShippingGroupManager
public void addShippingGroupToOrder(Order pOrder, ShippingGroup pShippingGroup) throws CommerceException
pOrder
- the Order to add the ShippingGroup topShippingGroup
- the ShippingGroup to add to the Order
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
ShippingGroupManager
public void removeAllShippingGroupsFromOrder(Order pOrder) throws CommerceException
pOrder
- the Order which contains the ShippingGroups to be removed
InvalidParameterException
- thrown if any of the parameters are null
ObjectRemovalException
- thrown if a ShippingGroup cannot be removed
CommerceException
ShippingGroupManager
public void removeShippingGroupFromOrder(Order pOrder, java.lang.String pShippingGroupId) throws CommerceException
pOrder
- the Order to remove the ShippingGroup frompShippingGroupId
- the id of the ShippingGroup to remove from the Order
InvalidParameterException
- thrown if any of the parameters are null
ObjectRemovalException
- thrown if the ShippingGroup contains any relationships
CommerceException
ShippingGroupManager
public void removeAllRelationshipsFromShippingGroup(Order pOrder, java.lang.String pShippingGroupId) throws CommerceException
pOrder
- the Order which contains the CommerceItem to remove the relationships frompShippingGroupId
- the id of the ShippingGroup
InvalidParameterException
- thrown if any of the parameters are null
ShippingGroupNotFoundException
- if a ShippingGroup with the given id is not found in the given order
ObjectRemovalException
- thrown if a relationship cannot be removed
CommerceException
ShippingGroupManager
public java.util.List getAllShippingGroupRelationships(Order pOrder) throws CommerceException
pOrder
- the Order whose relationships are sought
InvalidParameterException
- thrown if order parameter is null
CommerceException
Relationship
,
ShippingGroupRelationship
,
ShippingGroupCommerceItemRelationship
,
PaymentGroupShippingGroupRelationship
,
ShippingGroupManager
public void addShippingCostAmountToPaymentGroup(Order pOrder, java.lang.String pShippingGroupId, java.lang.String pPaymentGroupId, double pAmount) throws CommerceException
pOrder
- the Order which the PaymentGroup and ShippingGroup existpShippingGroupId
- the id of the ShippingGroup's cost to addpPaymentGroupId
- the id of the PaymentGroup which the ShippingGroup's cost will be added topAmount
- the amount that is assigned for payment to the PaymentGroup
InvalidParameterException
- thrown if any of the parameters are null
InvalidTypeException
- thrown if more than one REMAINING relationship type is added to a PaymentGroup
or if an invalid type is set to the Relationship
ObjectCreationException
- if the instantiation of an object fails
CommerceException
PaymentGroupShippingGroupRelationship
,
ShippingGroupManager
public void addRemainingShippingCostToPaymentGroup(Order pOrder, java.lang.String pShippingGroupId, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- the Order which the PaymentGroup and ShippingGroup existpShippingGroupId
- the id of the ShippingGroup's cost to addpPaymentGroupId
- the id of the PaymentGroup which the ShippingGroup's cost will be added to
InvalidParameterException
- thrown if any of the parameters are null
InvalidTypeException
- thrown if more than one REMAINING relationship type is added to a PaymentGroup
or if an invalid type is set to the Relationship
ObjectCreationException
- if the instantiation of an object fails
CommerceException
PaymentGroupShippingGroupRelationship
,
ShippingGroupManager
public void removeShippingCostAmountFromPaymentGroup(Order pOrder, java.lang.String pShippingGroupId, java.lang.String pPaymentGroupId, double pAmount) throws CommerceException
pOrder
- the Order which the PaymentGroup and ShippingGroup existpShippingGroupId
- the id of the ShippingGrouppPaymentGroupId
- the id of the PaymentGrouppAmount
- the amount to remove
InvalidParameterException
- thrown if any of the parameters are null
RelationshipNotFoundException
- if the given Relationship is not found in the ShippingGroup or
PaymentGroup
ObjectRemovalException
- if the removal of the object fails
CommerceException
ShippingGroupManager
public void removeRemainingShippingCostFromPaymentGroup(Order pOrder, java.lang.String pShippingGroupId, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- the Order which the PaymentGroup and ShippingGroup existpShippingGroupId
- the id of the ShippingGrouppPaymentGroupId
- the id of the PaymentGroup
InvalidParameterException
- thrown if any of the parameters are null
RelationshipNotFoundException
- if the given relationship is not found in the
PaymentGroup or ShippingGroup
ObjectRemovalException
- if the removal of the object fails
CommerceException
ShippingGroupManager
protected void removeShippingCostFromPaymentGroupInternal(Order pOrder, PaymentGroupShippingGroupRelationship pRel) throws CommerceException
pOrder
- the Order which the ShippingGroup and PaymentGroup existpRel
- the relationship which assigns the ShippingGroup to the PaymentGroup
RelationshipNotFoundException
- if the given relationship is not found in the
PaymentGroup or ShippingGroup
ObjectRemovalException
- if the removal of the object fails
CommerceException
PaymentGroupShippingGroupRelationship
,
ShippingGroupManager
public java.util.List splitShippingGroup(Order pOrder, java.lang.String pShippingGroupId, java.lang.String[] pItemIds, long[] pQuantities) throws CommerceException
pOrder
- the Order which the ShippingGroup and CommerceItems exist inpShippingGroupId
- the id of the ShippingGroup which contains the CommerceItems in
pItems which are to be moved to a new ShippingGrouppItemIds
- the ids of the CommerceItems which are to be split into a new
ShippingGroup. The length of the array must be equal to the number of ids supplied in the
array and not greater, otherwise an exception will be thrown.pQuantities
- the quantities of the CommerceItems which are to be moved into the new
ShippingGroup. This array is in parallel with pItems, so pQuantities[0] contains the
quantity of the item at pItems[0] which should be moved to the new ShippingGroup. The
length of this array must be the same as the length of pItemIds.
InvalidParameterException
- thrown if any of the parameters are null or invalid
ObjectCreationException
- if during the process of splitting some object cannot be instantiated
InvalidTypeException
- if an invalid type is found in a Relationship
CommerceException
- if some unexpected event occursShippingGroupManager
public java.util.List splitShippingGroup(Order pOrder, java.lang.String pShippingGroupId, java.lang.String[] pItemIds) throws CommerceException
pOrder
- the Order which the ShippingGroup and CommerceItems exist inpShippingGroupId
- the id of the ShippingGroup which contains the CommerceItems in
pItems which are to be moved to a new ShippingGrouppItemIds
- the ids of the CommerceItems which are to be split into a new
ShippingGroup. The length of the array must be equal to the number of ids supplied in the
array and not greater, otherwise an exception will be thrown.
CommerceException
ShippingGroupManager
protected java.util.List splitShippingGroupWithImplicitRelationships(Order pOrder, ShippingGroup pShippingGroup, java.lang.String[] pItemIds, long[] pQuantities) throws CommerceException
pOrder
- the Order which the ShippingGroup and CommerceItems exist inpShippingGroupId
- the id of the ShippingGroup which contains the CommerceItems in pItems
which are to be moved to a new ShippingGrouppItemIds
- the ids of the CommerceItems which are to be split into a new ShippingGroup. The length
of the array must be equal to the number of ids supplied in the array and not greater, otherwise
an exception will be thrown.pQuantities
- the quantities of the CommerceItems which are to be moved into
the new ShippingGroup. This array is in parallel with pItems, so pQuantities[0]
contains the quantity of the item at pItems[0] which should be moved to the new
ShippingGroup. The length of this array must be the same as the length of pItemIds.
InvalidParameterException
- thrown if any of the parameters are null or invalid
ObjectCreationException
- if during the process of splitting some object cannot be instantiated
InvalidTypeException
- if an invalid type is found in a Relationship
CommerceException
- if some unexpected event occursShippingGroupManager
public ShippingGroup cloneShippingGroup(ShippingGroup pShippingGroup) throws CommerceException
pShippingGroup
- the ShippingGroup to clone.
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
ShippingGroupManager
public long getRemainingQuantityForShippingGroup(CommerceItem pItem)
pItem
- The CommerceItem we are checking
ShippingGroupManager
public ShippingGroup getShippingGroupByDescription(java.util.List pShippingGroups, java.lang.String pDescription) throws CommerceException
pShippingGroups
- a List of ShippingGroupspDescription
- the description to search for in the List of ShippingGroups
InvalidParameterException
- if any of the parameters are null
CommerceException
ShippingGroupManager
public void removeEmptyShippingGroups(Order pOrder) throws CommerceException
pOrder
- the Order which contains the ShippingGroups
CommerceException
- if an exception occurs while removing a ShippingGroupShippingGroupManager
public ShippingGroupCommerceItemRelationship getShippingGroupCommerceItemRelationship(Order pOrder, java.lang.String pCommerceItemId, java.lang.String pShippingGroupId) throws CommerceException
pCommerceItemId
- the id of the CommerceItem which makes up a half of the relationshippShippingGroupId
- the id of the ShippingGroup which makes up a half of the relationship
InvalidParameterException
- thrown if any of the parameters are null
RelationshipNotFoundException
- if a relationship is not found
CommerceException
ShippingGroupManager
public HandlingInstruction createHandlingInstruction() throws CommerceException
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultHandlingInstructionType()
,
HandlingInstructionManager
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
HandlingInstructionManager
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()
,
HandlingInstructionManager
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
HandlingInstructionManager
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
HandlingInstructionManager
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
HandlingInstructionManager
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
HandlingInstructionManager
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
HandlingInstructionManager
public HandlingInstruction copyHandlingInstruction(HandlingInstruction pHandlingInstruction)
pHandlingInstruction
- The handlingInstruction to copy
HandlingInstructionManager
public java.util.List getHandlingInstructionsForCommerceItem(ShippingGroup pShippingGroup, java.lang.String pCommerceItemId)
pShippingGroup
- the shipping group containing the handling instructionpCommerceItemId
- The id of the item
HandlingInstructionManager
public PaymentGroup createPaymentGroup() throws CommerceException
ObjectCreationException
- if the instantiation of an object fails
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
OrderTools.getDefaultPaymentGroupType()
,
PaymentGroupManager
public PaymentGroup createPaymentGroup(java.lang.String pPaymentGroupType) throws CommerceException
pPaymentGroupType
- the type 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
PaymentGroupManager
public void initializeCreditCard(CreditCard pCreditCard, java.lang.String pCreditCardNumber, java.lang.String pCreditCardType) throws CommerceException
pCreditCard
- the CreditCard object to initializepCreditCardNumber
- the credit card numberpCreditCardType
- the credit card type. See atg.payment.creditcard.CreditCardTypes
InvalidParameterException
- thrown if any of the required parameters are null
CommerceException
CreditCard
,
PaymentGroupManager
public void initializeGiftCertificate(GiftCertificate pGiftCertificate, java.lang.String pProfileId, java.lang.String pGiftCertificateNumber) throws CommerceException
pGiftCertificate
- the GiftCertificate object to initializepProfileId
- the profile id for the user who owns this goft certificatepGiftCertificateNumber
- the credit card number
InvalidParameterException
- thrown if any of the required parameters are null
CommerceException
GiftCertificate
,
PaymentGroupManager
public void addPaymentGroupToOrder(Order pOrder, PaymentGroup pPaymentGroup) throws CommerceException
pOrder
- the Order to add the PaymentGroup topPaymentGroup
- the PaymentGroup to add to the Order
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
PaymentGroupManager
public void addPaymentGroupToOrder(Order pOrder, PaymentGroup pPaymentGroup, int pIndex) throws CommerceException
pOrder
- the Order to add the PaymentGroup topPaymentGroup
- the PaymentGroup to add to the OrderpIndex
- the location in the Order's list of PaymentGroups to add the PaymentGroup to
InvalidParameterException
- thrown if any of the parameters are null
CommerceException
PaymentGroupManager
public void removeAllPaymentGroupsFromOrder(Order pOrder) throws CommerceException
pOrder
- the Order which contains the PaymentGroups to be removed
InvalidParameterException
- thrown if any of the parameters are null
ObjectRemovalException
- thrown if a PaymentGroup cannot be removed
CommerceException
PaymentGroupManager
public void removePaymentGroupFromOrder(Order pOrder, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- the Order to remove the PaymentGroup frompPaymentGroupId
- the id of the PaymentGroup to remove from the Order
InvalidParameterException
- thrown if any of the parameters are null
PaymentGroupNotFoundException
- if a PaymentGroup with the given id is not found in the given order
ObjectRemovalException
- thrown if the PaymentGroup contains any relationships
CommerceException
PaymentGroupManager
public void removeAllRelationshipsFromPaymentGroup(Order pOrder, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- the Order which contains the PaymentGroup to remove the relationships frompPaymentGroupId
- the id of the PaymentGroup
InvalidParameterException
- thrown if any of the parameters are null
PaymentGroupNotFoundException
- if a PaymentGroup with the given id is not found in the given order
ObjectRemovalException
- thrown if a relationship cannot be removed
CommerceException
PaymentGroupManager
public java.util.List getAllPaymentGroupRelationships(Order pOrder) throws CommerceException
pOrder
- the Order whose relationships are sought
InvalidParameterException
- thrown if order parameter is null
CommerceException
Relationship
,
PaymentGroupRelationship
,
PaymentGroupCommerceItemRelationship
,
PaymentGroupShippingGroupRelationship
,
PaymentGroupOrderRelationship
,
PaymentGroupManager
public PipelineResult recalculatePaymentGroupAmounts(Order pOrder) throws CommerceException
pOrder
- the Order to recalculate the PaymentGroups in
CommerceException
- thrown if an error occurs while recalculating the amountsPaymentGroupManager
public void removeEmptyPaymentGroups(Order pOrder) throws CommerceException
pOrder
- the Order which contains the PaymentGroups
CommerceException
- if an exception occurs while removing a PaymentGroupPaymentGroupManager
public PaymentGroupCommerceItemRelationship getPaymentGroupCommerceItemRelationship(Order pOrder, java.lang.String pItemId, java.lang.String pPaymentGroupId) throws CommerceException
pItemId
- the id of the CommerceItem which makes up a half of the relationshippPaymentGroupId
- the id of the PaymentGroup which makes up a half of the relationship
InvalidParameterException
- thrown if any of the parameters are null
RelationshipNotFoundException
- if a relationship is not found
CommerceException
PaymentGroupManager
public PaymentGroupShippingGroupRelationship getPaymentGroupShippingGroupRelationship(Order pOrder, java.lang.String pPaymentGroupId, java.lang.String pShippingGroupId) throws CommerceException
pShippingGroupId
- the id of the ShippingGroup which makes up a half of the relationshippPaymentGroupId
- the id of the PaymentGroup which makes up a half of the relationship
InvalidParameterException
- thrown if any of the parameters are null
RelationshipNotFoundException
- if a relationship is not found
CommerceException
PaymentGroupManager
public PaymentGroupOrderRelationship getPaymentGroupOrderRelationship(Order pOrder, java.lang.String pPaymentGroupId) throws CommerceException
pOrder
- the Order which makes up half of the relationshippPaymentGroupId
- the id of the PaymentGroup which makes up a half of the relationship
InvalidParameterException
- thrown if any of the parameters are null
RelationshipNotFoundException
- if a relationship is not found
CommerceException
PaymentGroupManager
public void copyAddress(RepositoryItem pProfileAddress, Address pAddress) throws CommerceException
pProfile
- a profile object that contains user informationpAddress
- the Address or ContactInfo to copy the user data into
CommerceException
- if an error occurs while copyingOrderTools
public void copyAddress(Address pAddress, RepositoryItem pProfileAddress) throws CommerceException
pAddress
- the Address or ContactInfo to copy the data frompProfileAddress
- a profile object to copy the data to
CommerceException
- if an error occurs while copyingOrderTools
public void copyAddress(Address pSrcAddress, Address pDestAddress) throws CommerceException
pSrcAddress
- the object that the data will be copied frompDestAddress
- the object that the data will be copied into
CommerceException
- if an error occurs while copyingOrderTools
public java.util.List getOrdersForProfile(java.lang.String pProfileId) throws CommerceException
pProfileId
- the Profile id
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrdersForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders) throws CommerceException
pProfileId
- the Profile idpStartIndex
- the index of the first order to return. (This is an index into the result set
return by the repository query.)pNumOrders
- the number of orders to return
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrdersForProfile(java.lang.String pProfileId, java.lang.String pOrderByProperty, boolean pAscending) throws CommerceException
pProfileId
- the Profile idpOrderByProperty
- order the results by the given item descriptor property or nullpAscending
- if pOrderByProperty is not null, true for ascending order, false for descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrdersForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders, java.lang.String pOrderByProperty, boolean pAscending) throws CommerceException
pProfileId
- the Profile idpStartIndex
- the index of the first order to return. (This is an index into the result set
return by the repository query.)pNumOrders
- the number of orders to returnpOrderByProperty
- order the results by the given item descriptor property or nullpAscending
- if pOrderByProperty is not null, true for ascending order, false for descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int pState) throws CommerceException
pProfileId
- the Profile idpState
- specifies what state the orders should be in, if -1 then no constraint is added to the query
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int pState) throws CommerceException
pProfileId
- the Profile idpStartIndex
- the index of the first order to return. (This is an index into the result set
return by the repository query.)pNumOrders
- the number of orders to returnpState
- specifies what state the orders should be in, if -1 then no constraint is added to the query
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int pState, java.lang.String pOrderByProperty, boolean pAscending) throws CommerceException
pProfileId
- the Profile idpState
- specifies what state the orders should be in, if -1 then no constraint is added to the querypOrderByProperty
- order the results by the given item descriptor property or nullpAscending
- if pOrderByProperty is not null, true for ascending order, false for descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int pState, java.lang.String pOrderByProperty, boolean pAscending) throws CommerceException
pProfileId
- the Profile idpStartIndex
- the index of the first order to return. (This is an index into the result set
return by the repository query.)pNumOrders
- the number of orders to returnpState
- specifies what state the orders should be in, if -1 then no constraint is added to the querypOrderByProperty
- order the results by the given item descriptor property or nullpAscending
- if pOrderByProperty is not null, true for ascending order, false for descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int[] pStates) throws CommerceException
pProfileId
- the Profile idpStates
- specifies what states the orders should be in
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int[] pStates) throws CommerceException
pProfileId
- the Profile idpStartIndex
- the index of the first order to return. (This is an index into the result set
return by the repository query.)pNumOrders
- the number of orders to returnpStates
- specifies what states the orders should be in
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int[] pStates, java.lang.String pOrderByProperty, boolean pAscending) throws CommerceException
pProfileId
- the Profile idpStates
- specifies what states the orders should be inpOrderByProperty
- order the results by the given item descriptor property or nullpAscending
- if pOrderByProperty is not null, true for ascending order, false for descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int[] pStates, java.lang.String pOrderByProperty, boolean pAscending) throws CommerceException
pProfileId
- the Profile idpStartIndex
- the index of the first order to return. (This is an index into the result set
return by the repository query.)pNumOrders
- the number of orders to returnpStates
- specifies what states the orders should be inpOrderByProperty
- order the results by the given item descriptor property or nullpAscending
- if pOrderByProperty is not null, true for ascending order, false for descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfile(java.lang.String pProfileId) throws CommerceException
pProfileId
- the Profile id
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders) throws CommerceException
pProfileId
- the Profile idpStartIndex
- the index of the first order to return. (This is an index into the result set
return by the repository query.)pNumOrders
- the number of orders to return
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pState) throws CommerceException
pProfileId
- the Profile idpState
- specifies what state the orders should be in, if -1 then no constraint is added to the query
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int pState) throws CommerceException
pProfileId
- the Profile idpStartIndex
- the index of the first order to return. (This is an index into the result set
return by the repository query.)pNumOrders
- the number of orders to returnpState
- specifies what state the orders should be in, if -1 then no constraint is added to the query
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int[] pStates) throws CommerceException
pProfileId
- the Profile idpStates
- specifies what states the orders should be in
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int[] pStates) throws CommerceException
pProfileId
- the Profile idpStartIndex
- the index of the first order to return. (This is an index into the result set
return by the repository query.)pNumOrders
- the number of orders to returnpStates
- specifies what states the orders should be in
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfile(java.lang.String pProfileId, java.lang.String pOrderByProperty, boolean pAscending) throws CommerceException
pProfileId
- the Profile idpOrderByProperty
- order the results by the given item descriptor property or nullpAscending
- if pOrderByProperty is not null, true for ascending order, false for descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders, java.lang.String pOrderByProperty, boolean pAscending) throws CommerceException
pProfileId
- the Profile idpStartIndex
- the index of the first order to return. (This is an index into the result set
return by the repository query.)pNumOrders
- the number of orders to returnpOrderByProperty
- order the results by the given item descriptor property or nullpAscending
- if pOrderByProperty is not null, true for ascending order, false for descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pState, java.lang.String pOrderByProperty, boolean pAscending) throws CommerceException
pProfileId
- the Profile idpState
- specifies what state the orders should be in, if -1 then no constraint is added to the querypOrderByProperty
- order the results by the given item descriptor property or nullpAscending
- if pOrderByProperty is not null, true for ascending order, false for descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int pState, java.lang.String pOrderByProperty, boolean pAscending) throws CommerceException
pProfileId
- the Profile idpStartIndex
- the index of the first order to return. (This is an index into the result set
return by the repository query.)pNumOrders
- the number of orders to returnpState
- specifies what state the orders should be in, if -1 then no constraint is added to the querypOrderByProperty
- order the results by the given item descriptor property or nullpAscending
- if pOrderByProperty is not null, true for ascending order, false for descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int[] pStates, java.lang.String pOrderByProperty, boolean pAscending) throws CommerceException
pProfileId
- the Profile idpStates
- specifies what states the orders should be inpOrderByProperty
- order the results by the given item descriptor property or nullpAscending
- if pOrderByProperty is not null, true for ascending order, false for descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int[] pStates, java.lang.String pOrderByProperty, boolean pAscending) throws CommerceException
pProfileId
- the Profile idpStartIndex
- the index of the first order to return. (This is an index into the result set
return by the repository query.)pNumOrders
- the number of orders to returnpStates
- specifies what states the orders should be inpOrderByProperty
- order the results by the given item descriptor property or nullpAscending
- if pOrderByProperty is not null, true for ascending order, false for descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsWithinDateRange(java.util.Date pFrom, java.util.Date pTo) throws CommerceException
pFrom
- the lower date limitpTo
- the upper date limit
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public java.util.List getOrderIdsForProfileWithinDateRange(java.lang.String pProfileId, java.util.Date pFrom, java.util.Date pTo) throws CommerceException
pProfileId
- the profile to which the orders pertainpFrom
- the lower date limitpTo
- the upper date limit
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
protected Query getDateRangeQuery(java.util.Date pFrom, java.util.Date pTo) throws CommerceException
pTo
- the upper date limitpFrom
- the lower date limit
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryOrderQueries
public int getOrderCountForProfileInState(java.lang.String pProfileId, int[] pStates) throws CommerceException
pProfileId
- - the id of the profile whose orders are countedpStates
- - the list of states that are being queried for.
CommerceException
public int getOrderCountForProfile(java.lang.String pProfileId) throws CommerceException
pProfileId
- - the id of the profile whose orders are queried.
CommerceException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |