public class OrderMgr extends BaseMgr implements OrderMgrIf
Modifier and Type | Class and Description |
---|---|
protected class |
OrderMgr.StaticData
Used to store the static data of this manager
|
Modifier and Type | Field and Description |
---|---|
static int |
APPROVAL_DECLINED_STATUS
APPROVAL_DECLINED Order Status.
|
static int |
APPROVED_STATUS
APPROVED_STATUS Order Status.
|
static int |
ARCHIVED_STATUS
ARCHIVED Order Status.
|
static int |
CANCELLED_STATUS
CANCELLED_STATUS Order Status.
|
static java.lang.Boolean |
customAttrAnOracleCLOB
is Oracle CLOB used for custom_attrs column on the orders_products table?
|
static int |
DELIVERED_STATUS
DELIVERED Order Status.
|
protected static org.apache.commons.logging.Log |
log
the log
|
protected static java.lang.String |
mutex
Mutex for the Manager
|
static int |
ORD_PROD_CUSTOMER_INFORMED_OF_DELIVERY_DATE
Product wasn't in stock and but customer has been informed of the delivery date when order
was created.
|
static int |
ORD_PROD_IN_STOCK
Product in stock when order was created.
|
static int |
ORD_PROD_OUT_OF_STOCK_AVAILABLE_DATE_KNOWN
Product out of stock but with known availability date when order was created.
|
static int |
ORD_PROD_OUT_OF_STOCK_AVAILABLE_DATE_UNKNOWN
Product out of stock and availability date unknown when order was created.
|
static int |
ORD_PROD_PARTIALLY_OUT_OF_STOCK_AVAILABLE_DATE_KNOWN
Product not in stock with the required quantity but with known availability date when order
was created.
|
static int |
ORD_PROD_PARTIALLY_OUT_OF_STOCK_AVAILABLE_DATE_UNKNOWN
Product not in stock with the required quantity and availability date unknown when order was
created.
|
static int |
PAID_NOT_PROCESSED_STATUS
PAID_NOT_PROCESSED_STATUS Order Status.
|
static int |
PARTIALLY_DELIVERED_STATUS
PARTIALLY_DELIVERED_STATUS Order Status.
|
static int |
PAYMENT_DECLINED_STATUS
PAYMENT_DECLINED Order Status.
|
static int |
PAYMENT_RECEIVED_STATUS
PAYMENT_RECEIVED Order Status.
|
static int |
PENDING_STATUS
PENDING Order Status.
|
static int |
PROCESSING_STATUS
PROCESSING Order Status.
|
static int |
REFUND_APPROVED_STATUS
REFUND_APPROVED_STATUS Order Status.This state is set when a refund has been approved by a
payment gateway.
|
static int |
REFUND_DECLINED_STATUS
REFUND_DECLINED_STATUS Order Status.
|
protected static int |
secretKeyLength
Length of secret key
|
protected static java.util.Map<java.lang.String,OrderMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
static int |
WAITING_APPROVAL_STATUS
WAITING_APPROVAL_STATUS Order Status.
|
static int |
WAITING_PAYMENT_STATUS
WAITING_PAYMENT Order Status.
|
templateBaseDir
Modifier and Type | Method and Description |
---|---|
protected void |
addChildIds(CustomerIf[] children,
java.util.ArrayList<java.lang.Integer> idList,
FetchCustomerOptions options)
Recursively adds customer child ids to the list
|
void |
addManufacturerAddr(Order order,
boolean allStores)
Only for TCPOS, add manufacturer address to order
|
protected void |
addPaymentDetailsToOrder(Order order,
CreateOrderOptionsIf options,
int langId)
Get an array of payment details and add them to the order
|
protected void |
addShippingQuotesToOrder(Order order,
CreateOrderOptionsIf options,
int langId)
Get the shipping quotes and add them to the order
|
protected void |
addTaxRateObjects(Order order,
int taxClassId,
java.util.HashMap<java.lang.Integer,TaxRate> taxRateMap)
We get the tax rate objects for the order and taxClassId and add them to the hash map.
|
protected void |
changeDeliveryAddress(OrderIf order,
AddressIf deliveryAddress)
Actual code that changes the delivery address
|
Order |
changeDeliveryAddress(java.lang.String sessionId,
OrderIf order,
AddressIf deliveryAddress)
The current delivery address is substituted with the new one.
|
void |
changeOrderStatus(int orderId,
int status,
boolean customerNotified,
java.lang.String comments)
The state of the current order id changed and an orders_status_history record is added to the
order to keep track of the change.
|
void |
changeOrderStatus(java.lang.String sessionId,
int orderId,
int status,
boolean customerNotified,
java.lang.String comments)
The state of the current order id changed and an orders_status_history record is added to the
order to keep track of the change.
|
protected AddToBasketOptionsIf |
createAddToBasketOptions(CreateOrderOptionsIf options)
Creates an AddToBasketOptions object from an CreateOrderOptions
|
Order |
createAndSaveOrder(java.lang.String emailAddr,
java.lang.String password,
CustomerRegistrationIf custReg,
BasketIf[] basketItemArray,
java.lang.String shippingModule,
java.lang.String paymentModule,
int languageId) |
protected FetchProductOptionsIf |
createFetchProductOptions(CreateOrderOptionsIf options)
Creates a FetchProductOptions object from an CreateOrderOptions
|
Order |
createOrder(java.lang.String sessionId,
BasketIf[] basketItemArray,
int languageId)
An order object is returned with all addresses populated with the default address of the
customer referenced by the session Id.
|
Order |
createOrderWithOptions(java.lang.String sessionId,
BasketIf[] basketItemArray,
CreateOrderOptionsIf options,
int languageId)
An order object is returned with all addresses populated with the default address of the
customer referenced by the session Id.
|
void |
deleteOrderIdForSecretKey(java.lang.String secretKey)
The order id stored in the database and indexed by the secretKey, is deleted
|
protected boolean |
doesOrderStatusExist(int status)
Determines whether an order_status record exists for the status id parameter
|
void |
escapeOrder(OrderIf order)
Escape the Strings in the Order object using the rules defined in the properties file by the
property konakart.escape.chars .
|
protected void |
formatOrderAddresses(Order order)
It gets the address templates for all three addresses and sets the formatted addresses
|
OrderStatus[] |
getAllOrderStatuses(int languageId)
Returns an array of Order Status objects for a given language
|
protected void |
getArchivedOrders(Order[] orders,
int languageId,
boolean allStores)
Get the archived orders for the array of orders
|
protected int |
getCount(KKCriteria c)
This method is mainly used for paging.
|
protected java.lang.String |
getCustomAttrs(int orderProductId)
Get the custom_attrs for the order product with the specified orderProductId
|
protected java.lang.String |
getCustomAttrs(int orderProductId,
java.sql.Connection con)
Get the custom_attrs for the order product with the specified Id
|
IpnHistory[] |
getIpnHistory(int orderId)
Retrieve an array of IpnHistory objects for an order
|
IpnHistory[] |
getIpnHistory(java.lang.String sessionId,
int orderId)
Retrieve an array of IpnHistory objects for an order.
|
protected java.lang.String |
getModuleCodeFromQuote(ShippingQuoteIf sq)
Return a shipping module code from the Shipping Quote.
|
Order |
getOrder(java.lang.String sessionId,
int orderId,
int languageId)
Retrieve an order for the customer referenced by the sessionId.
|
protected void |
getOrderCountryAndZone(Order order)
Instantiate the Country and Zone objects for the order
|
protected void |
getOrderDetails(Order[] orders,
int languageId,
boolean allStores,
OrderSearchIf orderSearch)
Calls methods to get all of the details of the orders in the array
|
protected void |
getOrderDetails(Order order,
int languageId)
Calls methods to get all of the details of the order
|
protected void |
getOrderDetails(Order order,
int languageId,
boolean allStores,
OrderSearchIf orderSearch)
Calls methods to get all of the details of the order
|
Order |
getOrderForOrderId(int orderId,
int languageId)
Retrieve an order for an orderId.
|
int |
getOrderIdFromSecretKey(java.lang.String secretKey)
The order id stored in the database and indexed by the secretKey, is returned
|
protected void |
getOrderProducts(Order[] orders,
boolean allStores)
Get the OrderProduct and the Options of each OrderProduct for this array of orders.
|
protected void |
getOrderProducts(Order order,
boolean allStores)
Get the OrderProduct and the Options of each OrderProduct for this order.
|
Orders |
getOrdersPerCustomer(DataDescriptorIf dataDescIn,
java.lang.String sessionId,
int languageId)
Retrieve a number of orders for the customer referenced by the sessionId.
|
Orders |
getOrdersPerCustomerWithOptions(DataDescriptorIf dataDescIn,
java.lang.String sessionId,
int languageId,
FetchOrderOptionsIf options)
Retrieve a number of orders for the customer referenced by the sessionId.
|
int |
getOrderStatus(java.lang.String sessionId,
int orderId)
Get the order status for an order.
|
protected java.lang.String |
getOrderStatusText(int statusId,
int languageId)
It returns the text of the order status based on the status id and the language
|
protected void |
getOrderTotals(Order order,
boolean allStores)
Populates the Order object with an array of OrderTotal objects sorted by the sortOrder
attribute
|
Order |
getOrderWithOptions(java.lang.String sessionId,
int orderId,
int languageId,
FetchOrderOptionsIf options)
Retrieve an order for the customer referenced by the sessionId.
|
protected ReorderMgrInterface |
getReorderMgr()
Used to get an instance of the ReorderMgr
|
java.lang.String |
getSecretKeyForOrderId(int orderId)
Every time we send a notification to a payment gateway, we get a new secret key for the
order, which is sent back to us in the reply.
|
protected void |
getShipments(Order order,
boolean allStores)
Populates the Order object with an array of OrderShipmentProductIf objects
|
java.lang.String |
getStatusText(int statusId,
int languageId)
Returns the text of a status from the orders_status table
|
protected void |
getStatusTrail(Order order,
int languageId,
boolean allStores)
Populates the Order object with an array of OrderStatusHistory objects
|
protected java.math.BigDecimal |
getTaxRate(Order order,
int taxClassId)
We get the tax rate for the order and taxClassId
|
TaxRate[] |
getTaxRateObjectsPerOrder(Order order)
Returns a list of TaxRate objects used by this order.
|
static boolean |
isCustomAttrAnOracleCLOB()
Is the custom_attrs column is an Oracle CLOB? We only check once and save the result in a
static variable.
|
protected boolean |
isEnhancedVariantHandlingModeEnabled() |
protected void |
manageDataDescriptor(DataDescriptorIf dataDesc,
KKCriteria c)
Provides common code to deal with the management of the DataDescriptor.
|
protected boolean |
populateCriteriaWithOrderHierarchyConstraints(int customerId,
OrderSearchIf orderSearch,
KKCriteria c)
Populates the KKCriteria object with constraints for fetching orders of related customers (in
the customer hierarchy structure) to the customer identified by the customerId.
|
void |
refreshConfigs()
Refresh the configuration of the order manager
|
int |
saveIpnHistory(java.lang.String sessionId,
IpnHistoryIf ipnHistory)
The IpnHistory object is saved in the database.
|
int |
saveOrder(java.lang.String sessionId,
OrderIf order,
int languageId)
A new order is created in the DB.
|
int |
saveOrderWithOptions(java.lang.String sessionId,
OrderIf orderToSave,
int languageId,
SaveOrderOptionsIf options)
A new order is created in the DB.
|
Orders |
searchForOrdersPerCustomer(int customerId,
DataDescriptorIf dataDesc,
OrderSearchIf orderSearch,
int languageId)
Return orders matching the search criteria.
|
Orders |
searchForOrdersPerCustomer(java.lang.String sessionId,
DataDescriptorIf dataDesc,
OrderSearchIf orderSearch,
int languageId)
Return orders matching the search criteria.
|
void |
setCreditCardDetailsOnOrder(java.lang.String sessionId,
int orderId,
CreditCardIf card)
The credit card details in the CreditCard object passed in as a parameter, are saved in the
database for an existing order.
|
protected void |
setCriteriaWithStandardAttributes(KKCriteria c,
int languageId)
Set the criteria object with all of the attributes for an order
|
void |
setRewardPointReservationId(int customerId,
int orderId,
int reservationId)
Verifies that the order belongs to the customer identified by the
customerId
parameter and then updates the reservation id. |
void |
setRewardPointReservationId(java.lang.String sessionId,
int orderId,
int reservationId)
Verifies that the order belongs to the customer identified by the
sessionId
parameter and then updates the reservation id. |
void |
updateInventory(java.lang.String sessionId,
int orderId)
If the STOCK_LIMITED configuration variable is set to true, we subtract the products in stock
by the product orders.
|
void |
updateInventoryWithOptions(java.lang.String sessionId,
int orderId,
CreateOrderOptionsIf options)
If the STOCK_LIMITED configuration variable is set to true, we subtract the products in stock
by the product orders.
|
void |
updateOrder(int orderId,
int status,
boolean customerNotified,
java.lang.String comments,
OrderUpdateIf updateOrder)
The state of the order referenced by the orderId parameter is changed, and an
orders_status_history record is added to the order to keep track of the change.
|
protected void |
updateOrder(int orderId,
int status,
boolean customerNotified,
java.lang.String comments,
java.lang.String paymentModuleSubCode,
OrderUpdateIf updateOrder) |
void |
updateOrder(java.lang.String sessionId,
int orderId,
int status,
boolean customerNotified,
java.lang.String comments,
OrderUpdateIf updateOrder)
The state of the order referenced by the orderId parameter is changed, and an
orders_status_history record is added to the order to keep track of the change.
|
void |
updateOrder(java.lang.String sessionId,
int orderId,
int status,
boolean customerNotified,
java.lang.String comments,
java.lang.String paymentModuleSubCode,
OrderUpdateIf updateOrder)
The state of the order referenced by the orderId parameter is changed, and an
orders_status_history record is added to the order to keep track of the change.
|
acquireLock, addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkRequired, escapeHTML, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, getAdminEngMgr, getBasketMgr, getBillingMgr, getBookableProductMgr, getCacheMgr, getCatMgr, getConfigMgr, getCookieMgr, getCurrMgr, getCustMgr, getCustomerIdFromSession, getCustomerStatsMgr, getCustomerTagMgr, getEmailMgr, getEng, getEventMgr, getExportMgr, getHTMLEscaper, getKonaKartConfig, getKonaKartConfig, getKonaKartConfig, getLangMgr, getManuMgr, getMiscItemMgr, getMiscPriceMgr, getMode, getModeString, getMqMgr, getMultiStoreMgr, getNewCriteria, getNewCriteria, getOrderIntegrationMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getProductsToCategoresCriteria, getPromMgr, getPunchOutMgr, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getStoreMgr, getStoreTime, getSuggestionMgr, getTaxMgr, getTemplate, getTemplateRoot, getVelocityContextMgr, getWishListMgr, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isClassPresent, isCommunity, isDeadlockException, isEnterprise, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreSharedDb, isMultiStoreShareProducts, isMultiVendor, isUnix, manageThrowable, releaseLock, updateStaticVariablesNow
public static final int ORD_PROD_IN_STOCK
public static final int ORD_PROD_OUT_OF_STOCK_AVAILABLE_DATE_KNOWN
public static final int ORD_PROD_OUT_OF_STOCK_AVAILABLE_DATE_UNKNOWN
public static final int ORD_PROD_PARTIALLY_OUT_OF_STOCK_AVAILABLE_DATE_KNOWN
public static final int ORD_PROD_PARTIALLY_OUT_OF_STOCK_AVAILABLE_DATE_UNKNOWN
public static final int ORD_PROD_CUSTOMER_INFORMED_OF_DELIVERY_DATE
protected static org.apache.commons.logging.Log log
protected static final int secretKeyLength
public static final int PENDING_STATUS
public static final int PROCESSING_STATUS
public static final int DELIVERED_STATUS
public static final int WAITING_PAYMENT_STATUS
public static final int PAYMENT_RECEIVED_STATUS
public static final int PAYMENT_DECLINED_STATUS
public static final int PARTIALLY_DELIVERED_STATUS
public static final int CANCELLED_STATUS
public static final int REFUND_APPROVED_STATUS
public static final int REFUND_DECLINED_STATUS
public static final int WAITING_APPROVAL_STATUS
public static final int APPROVED_STATUS
public static final int APPROVAL_DECLINED_STATUS
public static final int ARCHIVED_STATUS
public static final int PAID_NOT_PROCESSED_STATUS
protected static java.util.Map<java.lang.String,OrderMgr.StaticData> staticDataHM
protected static java.lang.String mutex
public static java.lang.Boolean customAttrAnOracleCLOB
public OrderMgr(KKEngIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic int saveOrder(java.lang.String sessionId, OrderIf order, int languageId) throws java.lang.Exception
saveOrder
in interface OrderMgrIf
sessionId
- the sessionIdorder
- the orderlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic int saveOrderWithOptions(java.lang.String sessionId, OrderIf orderToSave, int languageId, SaveOrderOptionsIf options) throws java.lang.Exception
saveOrderWithOptions
in interface OrderMgrIf
sessionId
- the sessionIdorderToSave
- the orderToSavelanguageId
- the languageIdoptions
- Options object allowing you to specify the id of the order to be archivedjava.lang.Exception
- an unexpected exceptionprotected java.lang.String getModuleCodeFromQuote(ShippingQuoteIf sq)
The code and moduleCode on the ShippingQuote should be identical if there aren't multiple quotes for the shipping module but in the case of the more complex shipping modules such as UPS, UPSINT, FEDEX etc... multiple quotes are possible and in these circumstances the code has "_n" (where 'n' is an integer) append to the code to make it unique for showing on the UI for selection by the user.
The reason the ModuleCode is checked here for null and empty string is that it is possible that an older shipping module isn't populating the new moduleCode attribute - in these cases we revert to the old behaviour of just using the code attribute.
sq
- the sqprotected ReorderMgrInterface getReorderMgr()
public Order createOrder(java.lang.String sessionId, BasketIf[] basketItemArray, int languageId) throws java.lang.Exception
createOrder
in interface OrderMgrIf
sessionId
- the sessionIdbasketItemArray
- the basketItemArraylanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic Order createOrderWithOptions(java.lang.String sessionId, BasketIf[] basketItemArray, CreateOrderOptionsIf options, int languageId) throws java.lang.Exception
createOrderWithOptions
in interface OrderMgrIf
sessionId
- the sessionIdbasketItemArray
- the basketItemArrayoptions
- the optionslanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic void addManufacturerAddr(Order order, boolean allStores) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
addManufacturerAddr
in interface OrderMgrIf
order
- the OrderallStores
- the allStorescom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)java.lang.Exception
- an unexpected Exception exceptionprotected void addPaymentDetailsToOrder(Order order, CreateOrderOptionsIf options, int langId) throws java.lang.Exception
order
- the orderoptions
- the optionslangId
- the langIdjava.lang.Exception
- an unexpected exceptionprotected void addShippingQuotesToOrder(Order order, CreateOrderOptionsIf options, int langId) throws java.lang.Exception
order
- the orderoptions
- the optionslangId
- the langIdjava.lang.Exception
- an unexpected exceptionpublic Order changeDeliveryAddress(java.lang.String sessionId, OrderIf order, AddressIf deliveryAddress) throws java.lang.Exception
changeDeliveryAddress
in interface OrderMgrIf
sessionId
- the sessionIdorder
- the orderdeliveryAddress
- the deliveryAddressjava.lang.Exception
- an unexpected exceptionprotected void changeDeliveryAddress(OrderIf order, AddressIf deliveryAddress) throws java.lang.Exception
order
- the orderdeliveryAddress
- the deliveryAddressjava.lang.Exception
- an unexpected exceptionpublic TaxRate[] getTaxRateObjectsPerOrder(Order order) throws java.lang.Exception
getTaxRateObjectsPerOrder
in interface OrderMgrIf
order
- the orderjava.lang.Exception
- an unexpected exceptionprotected java.lang.String getOrderStatusText(int statusId, int languageId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, com.konakart.app.KKException
statusId
- the statusIdlanguageId
- the languageIdcom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionprotected java.math.BigDecimal getTaxRate(Order order, int taxClassId) throws java.lang.Exception
order
- the ordertaxClassId
- the taxClassIdjava.lang.Exception
- an unexpected exceptionprotected void addTaxRateObjects(Order order, int taxClassId, java.util.HashMap<java.lang.Integer,TaxRate> taxRateMap) throws java.lang.Exception
order
- the ordertaxClassId
- the taxClassIdtaxRateMap
- the taxRateMapjava.lang.Exception
- an unexpected exceptionprotected void formatOrderAddresses(Order order) throws java.lang.Exception
order
- the orderjava.lang.Exception
- an unexpected exceptionpublic Orders getOrdersPerCustomer(DataDescriptorIf dataDescIn, java.lang.String sessionId, int languageId) throws java.lang.Exception
getOrdersPerCustomer
in interface OrderMgrIf
dataDescIn
- the dataDescInsessionId
- the sessionIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic Orders getOrdersPerCustomerWithOptions(DataDescriptorIf dataDescIn, java.lang.String sessionId, int languageId, FetchOrderOptionsIf options) throws java.lang.Exception
getOrdersPerCustomerWithOptions
in interface OrderMgrIf
dataDescIn
- the dataDescInsessionId
- the sessionIdlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic Orders searchForOrdersPerCustomer(java.lang.String sessionId, DataDescriptorIf dataDesc, OrderSearchIf orderSearch, int languageId) throws java.lang.Exception
searchForOrdersPerCustomer
in interface OrderMgrIf
sessionId
- the sessionIddataDesc
- the dataDescorderSearch
- the orderSearchlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic Orders searchForOrdersPerCustomer(int customerId, DataDescriptorIf dataDesc, OrderSearchIf orderSearch, int languageId) throws java.lang.Exception
searchForOrdersPerCustomer
in interface OrderMgrIf
customerId
- the customerIddataDesc
- the dataDescorderSearch
- the orderSearchlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionprotected boolean populateCriteriaWithOrderHierarchyConstraints(int customerId, OrderSearchIf orderSearch, KKCriteria c) throws java.lang.Exception
customerId
- Id of customer making the API callorderSearch
- OrderSearch objectc
- KKCriteria objectjava.lang.Exception
- an unexpected exceptionprotected void addChildIds(CustomerIf[] children, java.util.ArrayList<java.lang.Integer> idList, FetchCustomerOptions options)
children
- the childrenidList
- the idListoptions
- the optionspublic Order getOrder(java.lang.String sessionId, int orderId, int languageId) throws java.lang.Exception
getOrder
in interface OrderMgrIf
sessionId
- the sessionIdorderId
- the orderIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic Order getOrderWithOptions(java.lang.String sessionId, int orderId, int languageId, FetchOrderOptionsIf options) throws java.lang.Exception
getOrderWithOptions
in interface OrderMgrIf
sessionId
- the sessionIdorderId
- the orderIdlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic Order getOrderForOrderId(int orderId, int languageId) throws java.lang.Exception
getOrderForOrderId
in interface OrderMgrIf
orderId
- the orderIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionprotected void getOrderProducts(Order order, boolean allStores) throws java.lang.Exception
order
- the orderallStores
- the allStoresjava.lang.Exception
- an unexpected exceptionprotected void getArchivedOrders(Order[] orders, int languageId, boolean allStores) throws java.lang.Exception
orders
- the orderslanguageId
- the languageIdallStores
- the allStoresjava.lang.Exception
- an unexpected exceptionprotected void getOrderProducts(Order[] orders, boolean allStores) throws java.lang.Exception
orders
- the ordersallStores
- the allStoresjava.lang.Exception
- an unexpected exceptionprotected java.lang.String getCustomAttrs(int orderProductId) throws java.lang.Exception
orderProductId
- the orderProductIdjava.lang.Exception
- an unexpected exceptionprotected java.lang.String getCustomAttrs(int orderProductId, java.sql.Connection con) throws java.lang.Exception
orderProductId
- the orderProductIdcon
- Connection for transactionjava.lang.Exception
- an unexpected exceptionprotected void getOrderDetails(Order order, int languageId, boolean allStores, OrderSearchIf orderSearch) throws java.lang.Exception
order
- the orderlanguageId
- the languageIdallStores
- the allStoresorderSearch
- the orderSearchjava.lang.Exception
- an unexpected exceptionprotected void getOrderDetails(Order[] orders, int languageId, boolean allStores, OrderSearchIf orderSearch) throws java.lang.Exception
orders
- the orderslanguageId
- the languageIdallStores
- the allStoresorderSearch
- the orderSearchjava.lang.Exception
- an unexpected exceptionprotected void getOrderDetails(Order order, int languageId) throws java.lang.Exception
order
- the orderlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionprotected void getOrderTotals(Order order, boolean allStores) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
order
- the orderallStores
- the allStoresorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected void getStatusTrail(Order order, int languageId, boolean allStores) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
order
- the orderlanguageId
- the languageIdallStores
- the allStoresorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected void getShipments(Order order, boolean allStores) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
order
- the orderallStores
- the allStoresorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected void getOrderCountryAndZone(Order order) throws java.lang.Exception
order
- the orderjava.lang.Exception
- an unexpected exceptionprotected void setCriteriaWithStandardAttributes(KKCriteria c, int languageId)
c
- the clanguageId
- the languageIdprotected int getCount(KKCriteria c) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
c
- the corg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)protected boolean doesOrderStatusExist(int status) throws org.apache.torque.TorqueException, com.konakart.app.KKException
status
- the statusorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionpublic java.lang.String getStatusText(int statusId, int languageId) throws java.lang.Exception
getStatusText
in interface OrderMgrIf
statusId
- the statusIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic void updateOrder(java.lang.String sessionId, int orderId, int status, boolean customerNotified, java.lang.String comments, OrderUpdateIf updateOrder) throws java.lang.Exception
OrderMgrIf
updateOrder
in interface OrderMgrIf
sessionId
- The session id of the logged in userorderId
- The numeric id of the orderstatus
- The new numeric state of the order. Valid states are defined in the database.customerNotified
- If you send an eMail to the customer to notify him of the state change then set
this to true to register the fact that an eMail has been sentcomments
- These comments are written into the orders_status_history recordupdateOrder
- contains order update data such as who updated the orderjava.lang.Exception
- an unexpected exceptionpublic void updateOrder(java.lang.String sessionId, int orderId, int status, boolean customerNotified, java.lang.String comments, java.lang.String paymentModuleSubCode, OrderUpdateIf updateOrder) throws java.lang.Exception
OrderMgrIf
updateOrder
in interface OrderMgrIf
sessionId
- The session id of the logged in userorderId
- The numeric id of the orderstatus
- The new numeric state of the order. Valid states are defined in the database.customerNotified
- If you send an eMail to the customer to notify him of the state change then set
this to true to register the fact that an eMail has been sentcomments
- These comments are written into the orders_status_history recordpaymentModuleSubCode
- A code to indicate what type of payment method has been used when we're using gateway like
BraintreeupdateOrder
- contains order update data such as who updated the orderjava.lang.Exception
- an unexpected exceptionpublic void updateOrder(int orderId, int status, boolean customerNotified, java.lang.String comments, OrderUpdateIf updateOrder) throws java.lang.Exception
OrderMgrIf
updateOrder
in interface OrderMgrIf
orderId
- The numeric id of the orderstatus
- The new numeric state of the order. Valid states are defined in the database.customerNotified
- If you send an eMail to the customer to notify him of the state change then set
this to true to register the fact that an eMail has been sentcomments
- These comments are written into the orders_status_history recordupdateOrder
- contains order update data such as who updated the orderjava.lang.Exception
- an unexpected exceptionprotected void updateOrder(int orderId, int status, boolean customerNotified, java.lang.String comments, java.lang.String paymentModuleSubCode, OrderUpdateIf updateOrder) throws java.lang.Exception
java.lang.Exception
public void changeOrderStatus(java.lang.String sessionId, int orderId, int status, boolean customerNotified, java.lang.String comments) throws java.lang.Exception
changeOrderStatus
in interface OrderMgrIf
sessionId
- the sessionIdorderId
- the orderIdstatus
- the statuscustomerNotified
- Has the customer been notifiedcomments
- the commentsjava.lang.Exception
- an unexpected exceptionpublic void changeOrderStatus(int orderId, int status, boolean customerNotified, java.lang.String comments) throws java.lang.Exception
changeOrderStatus
in interface OrderMgrIf
orderId
- the orderIdstatus
- the statuscustomerNotified
- Has the customer been notifiedcomments
- the commentsjava.lang.Exception
- an unexpected exceptionpublic int getOrderStatus(java.lang.String sessionId, int orderId) throws java.lang.Exception
getOrderStatus
in interface OrderMgrIf
sessionId
- the sessionIdorderId
- the orderIdjava.lang.Exception
- an unexpected exceptionpublic OrderStatus[] getAllOrderStatuses(int languageId) throws java.lang.Exception
getAllOrderStatuses
in interface OrderMgrIf
languageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic void updateInventory(java.lang.String sessionId, int orderId) throws java.lang.Exception
updateInventory
in interface OrderMgrIf
sessionId
- the sessionIdorderId
- the orderIdjava.lang.Exception
- an unexpected exceptionpublic void updateInventoryWithOptions(java.lang.String sessionId, int orderId, CreateOrderOptionsIf options) throws java.lang.Exception
updateInventoryWithOptions
in interface OrderMgrIf
sessionId
- the sessionIdorderId
- the orderIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionpublic java.lang.String getSecretKeyForOrderId(int orderId) throws java.lang.Exception
getSecretKeyForOrderId
in interface OrderMgrIf
orderId
- the orderIdjava.lang.Exception
- an unexpected exceptionpublic int getOrderIdFromSecretKey(java.lang.String secretKey) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException
getOrderIdFromSecretKey
in interface OrderMgrIf
secretKey
- the secretKeycom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public void deleteOrderIdForSecretKey(java.lang.String secretKey) throws org.apache.torque.TorqueException
deleteOrderIdForSecretKey
in interface OrderMgrIf
secretKey
- the secretKeyorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public int saveIpnHistory(java.lang.String sessionId, IpnHistoryIf ipnHistory) throws java.lang.Exception
saveIpnHistory
in interface OrderMgrIf
sessionId
- the sessionIdipnHistory
- the ipnHistoryjava.lang.Exception
- an unexpected exceptionpublic IpnHistory[] getIpnHistory(java.lang.String sessionId, int orderId) throws java.lang.Exception
getIpnHistory
in interface OrderMgrIf
sessionId
- The session id of the logged in userorderId
- The numeric id of the orderjava.lang.Exception
- an unexpected exceptionpublic IpnHistory[] getIpnHistory(int orderId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException
getIpnHistory
in interface OrderMgrIf
orderId
- the orderIdcom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public Order createAndSaveOrder(java.lang.String emailAddr, java.lang.String password, CustomerRegistrationIf custReg, BasketIf[] basketItemArray, java.lang.String shippingModule, java.lang.String paymentModule, int languageId) throws java.lang.Exception
createAndSaveOrder
in interface OrderMgrIf
emailAddr
- the emailAddrpassword
- the passwordcustReg
- the custRegbasketItemArray
- the basketItemArrayshippingModule
- the shippingModulepaymentModule
- the paymentModulelanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic void setCreditCardDetailsOnOrder(java.lang.String sessionId, int orderId, CreditCardIf card) throws java.lang.Exception
setCreditCardDetailsOnOrder
in interface OrderMgrIf
sessionId
- the sessionIdorderId
- the orderIdcard
- the cardjava.lang.Exception
- an unexpected exceptionprotected FetchProductOptionsIf createFetchProductOptions(CreateOrderOptionsIf options)
options
- the optionsprotected AddToBasketOptionsIf createAddToBasketOptions(CreateOrderOptionsIf options)
options
- the optionspublic void setRewardPointReservationId(java.lang.String sessionId, int orderId, int reservationId) throws java.lang.Exception
sessionId
parameter and then updates the reservation id.setRewardPointReservationId
in interface OrderMgrIf
sessionId
- the sessionIdorderId
- the orderIdreservationId
- the reservationIdjava.lang.Exception
- an unexpected exceptionpublic void setRewardPointReservationId(int customerId, int orderId, int reservationId) throws java.lang.Exception
customerId
parameter and then updates the reservation id.setRewardPointReservationId
in interface OrderMgrIf
customerId
- the customerIdorderId
- the orderIdreservationId
- the reservationIdjava.lang.Exception
- an unexpected exceptionprotected void manageDataDescriptor(DataDescriptorIf dataDesc, KKCriteria c)
dataDesc
- the dataDescc
- the cpublic void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface OrderMgrIf
java.lang.Exception
- an unexpected exceptionpublic void escapeOrder(OrderIf order)
escapeOrder
in interface OrderMgrIf
order
- the orderpublic static boolean isCustomAttrAnOracleCLOB()
protected boolean isEnhancedVariantHandlingModeEnabled() throws java.lang.Exception
java.lang.Exception
Copyright © 2018 DS Data Systems UK Ltd.