public class AdminOrderMgr extends AdminBaseMgr implements AdminOrderMgrIf
Modifier and Type | Class and Description |
---|---|
protected class |
AdminOrderMgr.StaticData |
Modifier and Type | Field and Description |
---|---|
static java.lang.Boolean |
customAttrAnOracleCLOB
is Oracle CLOB used for custom_attrs column on the orders_products table?
|
protected static org.apache.commons.logging.Log |
log
the log
|
protected static java.lang.String |
mutex
Mutex for this manager
|
protected static java.util.Map<java.lang.String,AdminOrderMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminOrderMgr(KKAdminIf eng) |
Modifier and Type | Method and Description |
---|---|
protected void |
addOrderRefundsToOrder(AdminOrder order)
Get an array of order refund objects for this order and attach them to the order
|
protected void |
addOrderReturnStatusOrderBy(com.konakart.db.KKCriteria c,
AdminOrderReturnStatusSearch search) |
protected int |
addOrderReturnStatusSearchCriteria(com.konakart.db.KKCriteria c,
AdminOrderReturnStatusSearch search) |
protected void |
addOrderReturnsToOrder(AdminOrder order)
Get an array of order return objects for this order and attach them to the order
|
protected int |
addOrderSearchCriteria(com.konakart.db.KKCriteria c,
AdminOrderSearch orderSearch) |
protected void |
addOrdersOrderBy(com.konakart.db.KKCriteria c,
AdminOrderSearch orderSearch) |
protected void |
addOrderStatusOrderBy(com.konakart.db.KKCriteria c,
AdminOrderStatusNameSearch search) |
protected int |
addOrderStatusSearchCriteria(com.konakart.db.KKCriteria c,
AdminOrderStatusNameSearch search) |
protected void |
addShipperOrderBy(com.konakart.db.KKCriteria c,
AdminShipperSearch search)
Adds order by criteria for returning Shipper objects
|
protected int |
addShipperSearchCriteria(com.konakart.db.KKCriteria c,
AdminShipperSearch search)
Adds search criteria for returning Shipper objects
|
void |
calculateTotals(int scale,
int taxQuantityRule,
AdminOrderProduct orderProduct)
We calculate totalPriceIncTax, totalPriceExTax and tax starting from price which is the price
of one product without options and without tax.
|
void |
decryptOrder(AdminOrder order)
Decrypt the encrypted parts of an order - but only if the encryption key passed in is
non-null and not empty.
|
void |
deleteIpnHistory(int ipnHistoryId)
Deletes an IPNHistory record by it's Id
|
int |
deleteOrder(int ordId)
Deletes an order and all associated records (eg OrderProducts, OrderStatusHistory etc)
|
int |
deleteOrder(int ordId,
boolean allStores)
Deletes an order and all associated records (eg OrderProducts, OrderStatusHistory etc) from
the current store.
|
void |
deleteOrderRefund(int orderRefundId)
Delete the AdminOrderRefund object
|
void |
deleteOrderReturn(int orderRetId)
Delete the AdminOrderReturn object and any associated AdminOrderReturnProduct objects
|
int |
deleteOrderReturnStatus(int ordRetStatId)
Delete an OrderReturnStatus
|
int |
deleteOrderStatusName(int ordStatId)
Delete an OrderStatusName
|
int |
deleteShipper(int shipperId)
Delete a Shipper
|
protected boolean |
doesOrderExist(int orderId)
Returns true if the parameter orderId points to an order in the database - in the current
store.
|
protected boolean |
doesOrderExist(int orderId,
boolean allStores)
Returns true if the parameter orderId points to an order in the database.
|
protected boolean |
doesOrderReturnStatusExist(int orderReturnStatusId)
Checks to see whether an Order Return Status already exists with this id for any language.
|
protected boolean |
doesOrderReturnStatusExist(int orderReturnStatusId,
int langId)
Checks to see whether an Order Return Status already exists with this id and this language
id.
|
protected boolean |
doesOrderStatusExist(int status)
Determines whether an order_status record exists for the status id parameter
|
boolean |
doesOrderStatusExist(int ordStatId,
int langId)
Checks to see whether an Order Status already exists with this id and this language id.
|
void |
editOrder(AdminOrder order)
Edit an existing order.
|
void |
editOrderRefund(AdminOrderRefund orderRefund)
Edits an AdminOrderRefund object.
|
void |
editOrderReturn(AdminOrderReturn orderRet)
Edits an AdminOrderReturn object.
|
AdminCreditCard |
encryptCreditCard(AdminCreditCard creditCard,
java.lang.String ek)
Encrypt the credit card details - but only if the encryption key passed in is non-null and
not empty.
|
com.konakart.app.ExportOrderResponse |
exportOrder(com.konakart.app.ExportOrderOptions options)
Exports the Order
|
com.konakart.app.ExportOrderResponse |
exportOrderByShippingModule(com.konakart.app.ExportOrderOptions options)
Export an order to XML by using the respective Shipping Module to export the order.
|
com.konakart.app.ExportOrderResponse |
exportOrderToXml(com.konakart.app.ExportOrderOptions options)
Export an order to XML
|
com.konakart.app.ExportOrderResponse |
exportOrderToXmlString(com.konakart.app.ExportOrderOptions options)
Export an order to an XML String
|
protected void |
formatOrderAddresses(AdminOrder order)
It gets the address templates for all three addresses and sets the formatted addresses
|
protected AdminOrderIntegrationMgrInterface |
getAdminOrderIntegMgrInstanceByName(java.lang.String className)
Called to instantiate an AdminOrderIntegrationMgr.
|
protected AdminOrderIntegrationMgrInterface |
getAdminOrderIntegrationMgr()
Used to get an instance of the OrderIntegrationMgr
|
AdminOrderReturnStatus[] |
getAllOrderReturnStatuses(int languageId)
Returns an array of AdminOrderReturnStatus objects for the languages specified
|
AdminOrderStatusName[] |
getAllOrderStatuses(int languageId)
Returns an array of AdminOrdersStatusName objects for the languages specified
|
protected void |
getArchivedOrders(AdminOrder order,
int languageId,
boolean allStores)
Get the archived orders for the order
|
protected int |
getCount(com.konakart.db.KKCriteria c)
This method is mainly used for paging.
|
java.lang.String |
getCouponCode(java.lang.String options)
This method may be customized in the OrderIntegrationMgr to implement an algorithm that
creates a coupon code or to read a coupon code from an external source.
|
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.
|
protected java.lang.String |
getEncryptionKey(int orderId)
Returns the encryption key used on an Order
|
protected int |
getIpnCount(com.konakart.db.KKCriteria c)
This method is mainly used for paging.
|
int |
getOrderCount(int orderStatus)
Returns a count of the Orders with the specified order status
|
protected void |
getOrderCountryAndZone(AdminOrder order)
Instantiate the Country and Zone objects for the order
|
protected void |
getOrderDetails(AdminOrder order,
int languageId,
boolean allStores)
Calls methods to get all of the details of the order
|
AdminOrder |
getOrderForExport(int orderId)
Return the AdminOrder with the specified orderId.
|
AdminOrder |
getOrderForOrderId(int orderId)
Retrieve an order for an orderId, using the default language
|
AdminOrder |
getOrderForOrderId(int orderId,
int languageId)
Returns an order for an orderId and a languageId.
|
AdminOrder |
getOrderForOrderId(int orderId,
int languageId,
boolean allStores)
Returns an order for an orderId and a languageId.
|
protected void |
getOrderProducts(AdminOrder[] orders,
boolean allStores)
Get the OrderProducts and the Options of each OrderProduct for the orders in the array
|
protected void |
getOrderProducts(AdminOrder order,
boolean allStores)
Get the OrderProduct and the Options of each OrderProduct for this order.
|
AdminOrderRefundSearchResult |
getOrderRefunds(AdminOrderRefundSearch retSearch,
int offset,
int size)
Search for Order Refunds
|
AdminOrderReturnSearchResult |
getOrderReturns(AdminOrderReturnSearch retSearch,
int offset,
int size)
Search for Order Returns
|
protected int |
getOrderReturnStatus(int orderRetId)
Get the current status of an order return
|
AdminOrderReturnStatusSearchResult |
getOrderReturnStatuses(AdminOrderReturnStatusSearch search)
This returns an AdminOrderReturnStatusSearchResult object.
|
AdminOrderSearchResult |
getOrders(AdminOrderSearch search,
int offset,
int size,
int languageId)
Returns a set of Orders matching the specified search criteria
|
AdminOrder[] |
getOrdersCreatedSince(java.util.Calendar since,
int languageId)
Returns a set of Orders created since the specified date
|
AdminOrderSearchResult |
getOrdersLite(AdminOrderSearch search,
int offset,
int size,
int languageId)
Returns a set of Orders matching the specified search criteria - the orders returned are
sparsely-populated for performance.
|
AdminOrderStatusNameSearchResult |
getOrderStatusNames(AdminOrderStatusNameSearch search)
This returns an AdminOrderStatusNameSearchResult object.
|
protected void |
getOrderTotals(AdminOrder order,
boolean allStores)
Populates the Order object with an array of OrderTotal objects sorted by the sortOrder
attribute
|
protected int |
getRefundsCount(com.konakart.db.KKCriteria c)
This method is mainly used for paging.
|
protected int |
getReturnsCount(com.konakart.db.KKCriteria c)
This method is mainly used for paging.
|
java.lang.String |
getRMACode(int orderId)
This method may be customized in the OrderIntegrationMgr to implement an algorithm that
creates an RMA code for the order.
|
AdminShipper |
getShipper(int shipperId)
Get a shipper by id
|
AdminShipperSearchResult |
getShippers(AdminShipperSearch search)
This returns an AdminShipperSearchResult object matching the search constraints
|
protected void |
getStatusTrail(AdminOrder order,
int languageId,
boolean allStores)
Populates the Order object with an array of OrderStatusHistory objects
|
int |
insertIpnHistory(AdminIpnHistory ipnHistory)
Save the AdminIpnHistory object in the database.
|
int |
insertOrder(AdminOrder order)
Insert an order
|
int |
insertOrderRefund(AdminOrderRefund orderRefund)
Inserts an AdminOrderRefund object
|
int |
insertOrderReturn(AdminOrderReturn orderRet)
Inserts an AdminOrderReturn object and links it to an array of AdminOrderProduct objects in
order to identify which products in the order were returned.
|
int |
insertOrderReturnStatus(AdminOrderReturnStatus ordRetStat)
Insert an AdminOrderReturnStatus object
|
int |
insertOrderReturnStatuses(AdminOrderReturnStatus[] ordRetStats)
Insert an array of AdminOrderReturnStatus objects.
|
int |
insertOrderStatusName(AdminOrderStatusName ordStat)
Insert an AdminOrderStatusName object
|
int |
insertOrderStatusNames(AdminOrderStatusName[] ordStats)
Insert an array of AdminOrderStatusName objects.
|
int |
insertShipper(AdminShipper shipper)
Insert a Shipper
|
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()
Check in the static data if enhanced variant handling mode is enabled.
|
boolean |
isSaveCreditCardDetails()
If true, credit card details will be saved
|
void |
refreshConfigs()
Refresh the Configuration variables for this manager
|
AdminIpnHistories |
searchForIpnHistory(AdminDataDescriptor dataDesc,
AdminIpnSearch ipnSearch)
Search for IPN History objects
|
void |
setCreditCardDetailsOnOrder(AdminCreditCard creditCard)
Set Credit Card details on an existing order
|
protected void |
setCriteriaForEncyptionCols(com.konakart.db.KKCriteria c)
Set the criteria object with all of the encryption attributes for a "Lite" order
|
protected void |
setCriteriaWithJoinsLite(com.konakart.db.KKCriteria c,
int languageId)
Set the criteria object with all of the attributes for a "Lite" order
|
protected void |
setCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c,
int languageId)
Set the criteria object with all of the attributes for an order
|
protected void |
setCriteriaWithStandardAttributesLite(com.konakart.db.KKCriteria c,
int languageId)
Set the criteria object with all of the attributes for a "Lite" order
|
void |
setRewardPointReservationId(int orderId,
int reservationId)
Updates the reward point reservation id for the order identified by
orderId . |
protected void |
setupStoreCreditCardDetails(AdminOrderMgr.StaticData sd)
Set the pre-search string based on the configuration variable value
|
void |
updateOrder(int orderId,
int orderStatus,
java.lang.String comments,
boolean notifyCustomer,
AdminOrderUpdate updateOrder)
Update the order status with optional comments.
|
void |
updateOrder(int orderId,
int orderStatus,
java.lang.String comments,
boolean notifyCustomer,
AdminOrderUpdate _updateOrder,
java.lang.String storeId)
Update the order status with optional comments.
|
int |
updateOrderReturnStatus(AdminOrderReturnStatus ordRetStat)
Update an AdminOrderReturnStatus object
|
void |
updateOrderStatus(int orderId,
int orderStatus,
java.lang.String comments,
boolean notifyCustomer)
Update the order status with optional comments
|
int |
updateOrderStatusName(AdminOrderStatusName ordStat)
Update an AdminOrderStatusName object
|
int |
updateShipper(AdminShipper shipper)
Update a Shipper
|
addInsertAttr, addInsertAttr, addStringRuleConstraint, addStringRuleConstraint, checkAPICallEnabled, checkIntInRange, checkIntIsSet, checkRequired, executeQuery, executeQuery, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminContentMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustPwdHistMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminEngineCacheMgr, getAdminEventMgr, getAdminExecuteMgr, getAdminFileMgr, getAdminFilterMgr, getAdminHtmlMgr, getAdminImportMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminMiscPriceMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminServletMgr, getAdminShipmentMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminSuggestionMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getDebugStackTraceExclusions, getEmailThreadGracefulShutdownTimeout, getExportMgr, getExportMgr, getExportXMLData, getIntFromString, getKkAdminPropsFilePath, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getNewCriteria, getNewCriteria, getOtherModuleByName, getPostSearchText, getPreSearchText, getProductsToCategoresCriteria, getPropertyValue, getPropertyValue, getPropertyValueAsBool, getPropertyValueAsInt, getPropertyValueAsLong, getRecordCount, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, insertKKEvent, insertKKEvent, isBusiness, isBusinessOrEnterprise, isCommunity, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareCustomersOrProducts, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, isUnix, isWindows, manageException, manageThrowable, removeCData, sendMQMessages, setAdminEng, setDebugStackTraceExclusions, setKkAdminPropsFilePath, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr, updateStaticVariablesNow
protected static org.apache.commons.logging.Log log
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,AdminOrderMgr.StaticData> staticDataHM
public static java.lang.Boolean customAttrAnOracleCLOB
public AdminOrderMgr(KKAdminIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionprotected void setupStoreCreditCardDetails(AdminOrderMgr.StaticData sd)
sd
- StaticDatapublic int getOrderCount(int orderStatus) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
getOrderCount
in interface AdminOrderMgrIf
orderStatus
- the order statusorg.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 int getCount(com.konakart.db.KKCriteria c) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
c
- the KKCriteriaorg.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 int getIpnCount(com.konakart.db.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)public AdminOrderSearchResult getOrdersLite(AdminOrderSearch search, int offset, int size, int languageId) throws KKAdminException
getOrdersLite
in interface AdminOrderMgrIf
search
- the Orders search criteria object (can be null)offset
- offset in the dbsize
- max number of records to return from the offsetlanguageId
- the language Id - or it could be DEFAULT_LANG to use the default languageKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void decryptOrder(AdminOrder order) throws KKAdminException
decryptOrder
in interface AdminOrderMgrIf
order
- the order object that will be populated with the unencrypted attributesKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminOrderSearchResult getOrders(AdminOrderSearch search, int offset, int size, int languageId) throws java.lang.Exception
getOrders
in interface AdminOrderMgrIf
search
- the Orders search criteria object (can be null)offset
- offset in the dbsize
- max number of records to return from the offsetlanguageId
- the language Id - or it could be DEFAULT_LANG to use the default languagejava.lang.Exception
- an unexpected exceptionpublic AdminOrder[] getOrdersCreatedSince(java.util.Calendar since, int languageId) throws java.lang.Exception
getOrdersCreatedSince
in interface AdminOrderMgrIf
since
- the date to use to define the range of orders to returnlanguageId
- the language idjava.lang.Exception
- an unexpected exceptionprotected void getOrderTotals(AdminOrder 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 getOrderProducts(AdminOrder order, boolean allStores) throws java.lang.Exception
order
- the orderallStores
- the allStoresjava.lang.Exception
- an unexpected exceptionprotected void getOrderProducts(AdminOrder[] orders, boolean allStores) throws java.lang.Exception
orders
- the ordersallStores
- the allStoresjava.lang.Exception
- an unexpected exceptionprotected void getOrderDetails(AdminOrder order, int languageId, boolean allStores) throws java.lang.Exception
order
- the orderlanguageId
- the languageIdallStores
- 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 exceptionpublic void updateOrder(int orderId, int orderStatus, java.lang.String comments, boolean notifyCustomer, AdminOrderUpdate updateOrder) throws java.lang.Exception
AdminOrderMgrIf
updateOrder
in interface AdminOrderMgrIf
orderId
- the order idorderStatus
- the new Order Statuscomments
- if not null, these comments are addednotifyCustomer
- if true the customer will be notified by emailupdateOrder
- contains order update data such as who updated the orderjava.lang.Exception
- an unexpected exceptionpublic void updateOrder(int orderId, int orderStatus, java.lang.String comments, boolean notifyCustomer, AdminOrderUpdate _updateOrder, java.lang.String storeId) throws java.lang.Exception
AdminOrderMgrIf
updateOrder
in interface AdminOrderMgrIf
orderId
- the order idorderStatus
- the new Order Statuscomments
- if not null, these comments are addednotifyCustomer
- if true the customer will be notified by email_updateOrder
- contains order update data such as who updated the orderstoreId
- This is useful for multi-vendor orders when we desire to pass the status change of
the vendor order on to the parent order. If the storeId is set to a non null value
we assume that the order belongs to the store with this id.java.lang.Exception
- an unexpected exceptionpublic void updateOrderStatus(int orderId, int orderStatus, java.lang.String comments, boolean notifyCustomer) throws java.lang.Exception
updateOrderStatus
in interface AdminOrderMgrIf
orderId
- the order idorderStatus
- the new Order Statuscomments
- if not null, these comments are addednotifyCustomer
- if true the customer will be notified by emailjava.lang.Exception
- an unexpected exceptionprotected AdminOrderIntegrationMgrInterface getAdminOrderIntegrationMgr()
protected AdminOrderIntegrationMgrInterface getAdminOrderIntegMgrInstanceByName(java.lang.String className) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
className
- the classNamejava.lang.IllegalAccessException
- an unexpected IllegalAccessException exceptionjava.lang.InstantiationException
- an unexpected InstantiationException exceptionjava.lang.ClassNotFoundException
- an unexpected ClassNotFoundException exceptionjava.lang.reflect.InvocationTargetException
- an unexpected InvocationTargetException exceptionjava.lang.IllegalArgumentException
- an unexpected IllegalArgumentException exceptionpublic AdminOrder getOrderForOrderId(int orderId) throws java.lang.Exception
getOrderForOrderId
in interface AdminOrderMgrIf
orderId
- the orderIdjava.lang.Exception
- an unexpected exceptionpublic AdminOrder getOrderForOrderId(int orderId, int languageId) throws java.lang.Exception
getOrderForOrderId
in interface AdminOrderMgrIf
orderId
- the orderIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionpublic AdminOrder getOrderForOrderId(int orderId, int languageId, boolean allStores) throws java.lang.Exception
getOrderForOrderId
in interface AdminOrderMgrIf
orderId
- the orderIdlanguageId
- the languageIdallStores
- the allStoresjava.lang.Exception
- an unexpected exceptionprotected void getArchivedOrders(AdminOrder order, int languageId, boolean allStores) throws java.lang.Exception
order
- the orderlanguageId
- the languageIdallStores
- the allStoresjava.lang.Exception
- an unexpected exceptionprotected java.lang.String getEncryptionKey(int orderId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
orderId
- the orderIdorg.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, KKAdminException
status
- the statusorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected void formatOrderAddresses(AdminOrder order) throws java.lang.Exception
order
- the orderjava.lang.Exception
- an unexpected exceptionprotected void getStatusTrail(AdminOrder 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 getOrderCountryAndZone(AdminOrder order) throws java.lang.Exception
order
- the orderjava.lang.Exception
- an unexpected exceptionpublic AdminOrderStatusName[] getAllOrderStatuses(int languageId) throws java.lang.Exception
getAllOrderStatuses
in interface AdminOrderMgrIf
languageId
- the languageIdjava.lang.Exception
- an unexpected exceptionprotected void addOrdersOrderBy(com.konakart.db.KKCriteria c, AdminOrderSearch orderSearch)
c
- the corderSearch
- the orderSearchprotected int addOrderSearchCriteria(com.konakart.db.KKCriteria c, AdminOrderSearch orderSearch) throws KKAdminException, org.apache.torque.TorqueException
c
- the corderSearch
- the orderSearchKKAdminException
- unexpected exception in the KonaKart Admin Engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected void setCriteriaWithJoinsLite(com.konakart.db.KKCriteria c, int languageId)
c
- Criteria to add tolanguageId
- the language Idprotected void setCriteriaWithStandardAttributesLite(com.konakart.db.KKCriteria c, int languageId)
c
- the clanguageId
- the languageIdprotected void setCriteriaForEncyptionCols(com.konakart.db.KKCriteria c)
c
- the cprotected void setCriteriaWithStandardAttributes(com.konakart.db.KKCriteria c, int languageId)
c
- the clanguageId
- the languageIdpublic void calculateTotals(int scale, int taxQuantityRule, AdminOrderProduct orderProduct)
calculateTotals
in interface AdminOrderMgrIf
scale
- The scale used in the calculationstaxQuantityRule
- The tax calculation rule to useorderProduct
- the orderProductpublic int deleteOrder(int ordId) throws KKAdminException
Removes records from :
deleteOrder
in interface AdminOrderMgrIf
ordId
- Order id of the order to deleteKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int deleteOrder(int ordId, boolean allStores) throws KKAdminException
Removes records from :
deleteOrder
in interface AdminOrderMgrIf
ordId
- Order id of the order to deleteallStores
- if true the order is removed whichever store it is in. If false the order is only
removed if it is found in the current store.KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminOrderStatusNameSearchResult getOrderStatusNames(AdminOrderStatusNameSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getOrderStatusNames
in interface AdminOrderMgrIf
search
- the searchorg.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)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int deleteOrderStatusName(int ordStatId) throws KKAdminException
deleteOrderStatusName
in interface AdminOrderMgrIf
ordStatId
- An OrderStatusName idKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int insertOrderStatusName(AdminOrderStatusName ordStat) throws KKAdminException
insertOrderStatusName
in interface AdminOrderMgrIf
ordStat
- An AdminOrderStatusName objectKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int insertOrderStatusNames(AdminOrderStatusName[] ordStats) throws KKAdminException
insertOrderStatusNames
in interface AdminOrderMgrIf
ordStats
- An AdminOrderStatusName array objectKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int updateOrderStatusName(AdminOrderStatusName ordStat) throws java.lang.Exception
updateOrderStatusName
in interface AdminOrderMgrIf
ordStat
- An AdminOrderStatusName objectjava.lang.Exception
- an unexpected exceptionpublic boolean doesOrderStatusExist(int ordStatId, int langId) throws org.apache.torque.TorqueException, KKAdminException
doesOrderStatusExist
in interface AdminOrderMgrIf
ordStatId
- the order status IdlangId
- the language Idorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected void addOrderStatusOrderBy(com.konakart.db.KKCriteria c, AdminOrderStatusNameSearch search)
c
- the csearch
- the searchprotected int addOrderStatusSearchCriteria(com.konakart.db.KKCriteria c, AdminOrderStatusNameSearch search)
c
- the csearch
- the searchpublic AdminIpnHistories searchForIpnHistory(AdminDataDescriptor dataDesc, AdminIpnSearch ipnSearch) throws java.lang.Exception
AdminOrderMgrIf
searchForIpnHistory
in interface AdminOrderMgrIf
dataDesc
- the dataDescipnSearch
- the ipnSearchjava.lang.Exception
- an unexpected exceptionpublic int insertOrderReturn(AdminOrderReturn orderRet) throws java.lang.Exception
insertOrderReturn
in interface AdminOrderMgrIf
orderRet
- the orderRetjava.lang.Exception
- an unexpected exceptionpublic void editOrderReturn(AdminOrderReturn orderRet) throws java.lang.Exception
editOrderReturn
in interface AdminOrderMgrIf
orderRet
- the orderRetjava.lang.Exception
- an unexpected exceptionpublic void deleteOrderReturn(int orderRetId) throws java.lang.Exception
deleteOrderReturn
in interface AdminOrderMgrIf
orderRetId
- the orderRetIdjava.lang.Exception
- an unexpected exceptionprotected int getOrderReturnStatus(int orderRetId) throws com.workingdogs.village.DataSetException, org.apache.torque.TorqueException, KKAdminException
orderRetId
- The id of the order returncom.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)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected void addOrderReturnsToOrder(AdminOrder order) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
order
- the ordercom.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)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminOrderReturnSearchResult getOrderReturns(AdminOrderReturnSearch retSearch, int offset, int size) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
AdminOrderMgrIf
getOrderReturns
in interface AdminOrderMgrIf
retSearch
- the retSearchoffset
- the offsetsize
- the sizeKKAdminException
- unexpected exception in the KonaKart Admin Engineorg.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 int getReturnsCount(com.konakart.db.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)public void editOrder(AdminOrder order) throws java.lang.Exception
updateOrder()
.
The attributes that can be modified are:
editOrder
in interface AdminOrderMgrIf
order
- the orderjava.lang.Exception
- an unexpected exceptionpublic void setCreditCardDetailsOnOrder(AdminCreditCard creditCard) throws java.lang.Exception, KKAdminException
This method only allows you to update the credit card details on an order. In order to change
the order status you must use updateOrderStatus()
.
The Credit Card details are only saved if the ability to save credit card details is enabled in the configuration of the store.
The orderId must be populated in the id field of the AdminCreditCard object.
Before being saved, this sensitive information is encrypted.
No update or insert is done for attributes of the AdminCreditCard object that are set to null. The credit card details are mapped as follows to attributes in the order object:
setCreditCardDetailsOnOrder
in interface AdminOrderMgrIf
creditCard
- the AdminCreditCard objectjava.lang.Exception
- an unexpected exceptionKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic AdminCreditCard encryptCreditCard(AdminCreditCard creditCard, java.lang.String ek) throws KKAdminException
encryptCreditCard
in interface AdminOrderMgrIf
creditCard
- the original credit card objectek
- the encryption keyKKAdminException
- unexpected exception in the KonaKart Admin Engineprotected boolean doesOrderExist(int orderId) throws org.apache.torque.TorqueException
orderId
- the orderIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)protected boolean doesOrderExist(int orderId, boolean allStores) throws org.apache.torque.TorqueException
orderId
- the orderIdallStores
- if true the order is searched for whichever store it is in. If false the order is
only searched for in the current store.org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)public int insertIpnHistory(AdminIpnHistory ipnHistory) throws java.lang.Exception
insertIpnHistory
in interface AdminOrderMgrIf
ipnHistory
- the ipnHistoryjava.lang.Exception
- an unexpected exceptionpublic void deleteIpnHistory(int ipnHistoryId) throws KKAdminException
deleteIpnHistory
in interface AdminOrderMgrIf
ipnHistoryId
- IPN History id of the record to deleteKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int insertOrder(AdminOrder order) throws java.lang.Exception
insertOrder
in interface AdminOrderMgrIf
order
- the orderjava.lang.Exception
- an unexpected exceptionpublic boolean isSaveCreditCardDetails()
AdminOrderMgrIf
isSaveCreditCardDetails
in interface AdminOrderMgrIf
public com.konakart.app.ExportOrderResponse exportOrder(com.konakart.app.ExportOrderOptions options) throws KKAdminException
AdminOrderMgrIf
exportOrder
in interface AdminOrderMgrIf
options
- Defines the options to use for the export of the OrderKKAdminException
- an unexpected exception in the KonaKart Admin enginepublic com.konakart.app.ExportOrderResponse exportOrderToXmlString(com.konakart.app.ExportOrderOptions options) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
options
- export options in ExportOrderOptionsorg.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)java.lang.Exception
- an unexpected exceptionpublic com.konakart.app.ExportOrderResponse exportOrderToXml(com.konakart.app.ExportOrderOptions options) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, java.lang.Exception
options
- export options in ExportOrderOptionsorg.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)java.lang.Exception
- an unexpected exceptionpublic AdminOrder getOrderForExport(int orderId) throws KKAdminException
orderId
- id of the order to retrieveKKAdminException
- if the order does not exist or there are other more serious problemspublic com.konakart.app.ExportOrderResponse exportOrderByShippingModule(com.konakart.app.ExportOrderOptions options) throws KKAdminException
options
- export options in ExportOrderOptionsKKAdminException
- an unexpected KKAdminException exceptionpublic void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface AdminOrderMgrIf
refreshConfigs
in class AdminBaseMgr
java.lang.Exception
- an unexpected exceptionpublic void setRewardPointReservationId(int orderId, int reservationId) throws java.lang.Exception
orderId
.setRewardPointReservationId
in interface AdminOrderMgrIf
orderId
- the orderIdreservationId
- the reservationIdjava.lang.Exception
- an unexpected exceptionpublic int insertOrderRefund(AdminOrderRefund orderRefund) throws java.lang.Exception
insertOrderRefund
in interface AdminOrderMgrIf
orderRefund
- the orderRefundjava.lang.Exception
- an unexpected exceptionpublic void editOrderRefund(AdminOrderRefund orderRefund) throws java.lang.Exception
editOrderRefund
in interface AdminOrderMgrIf
orderRefund
- the orderRefundjava.lang.Exception
- an unexpected exceptionpublic void deleteOrderRefund(int orderRefundId) throws java.lang.Exception
deleteOrderRefund
in interface AdminOrderMgrIf
orderRefundId
- the orderRefundIdjava.lang.Exception
- an unexpected exceptionprotected void addOrderRefundsToOrder(AdminOrder order) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
order
- the ordercom.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)KKAdminException
- an unexpected KKAdminException exceptionpublic AdminOrderRefundSearchResult getOrderRefunds(AdminOrderRefundSearch retSearch, int offset, int size) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
AdminOrderMgrIf
getOrderRefunds
in interface AdminOrderMgrIf
retSearch
- the retSearchoffset
- the offsetsize
- the sizeKKAdminException
- an unexpected KKAdminException exceptionorg.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 int getRefundsCount(com.konakart.db.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)public AdminShipperSearchResult getShippers(AdminShipperSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
search
- the searchorg.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)KKAdminException
- an unexpected KKAdminException exceptionpublic AdminShipper getShipper(int shipperId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
shipperId
- the shipperIdorg.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)KKAdminException
- an unexpected KKAdminException exceptionprotected int addShipperSearchCriteria(com.konakart.db.KKCriteria c, AdminShipperSearch search)
c
- the csearch
- the searchprotected void addShipperOrderBy(com.konakart.db.KKCriteria c, AdminShipperSearch search)
c
- the csearch
- the searchpublic int insertShipper(AdminShipper shipper) throws org.apache.torque.TorqueException, KKAdminException
shipper
- A shipper objectorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected KKAdminException exceptionpublic int updateShipper(AdminShipper shipper) throws org.apache.torque.TorqueException, KKAdminException
shipper
- A shipper objectorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected KKAdminException exceptionpublic int deleteShipper(int shipperId) throws org.apache.torque.TorqueException, KKAdminException
shipperId
- A shipper idorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected KKAdminException exceptionpublic java.lang.String getRMACode(int orderId)
getRMACode
in interface AdminOrderMgrIf
orderId
- Id of the orderpublic java.lang.String getCouponCode(java.lang.String options)
getCouponCode
in interface AdminOrderMgrIf
options
- Optional parameter that may be used to control how the coupon code is generatedpublic static boolean isCustomAttrAnOracleCLOB()
public AdminOrderReturnStatusSearchResult getOrderReturnStatuses(AdminOrderReturnStatusSearch search) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
getOrderReturnStatuses
in interface AdminOrderMgrIf
search
- the searchorg.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)KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int deleteOrderReturnStatus(int ordRetStatId) throws KKAdminException
deleteOrderReturnStatus
in interface AdminOrderMgrIf
ordRetStatId
- An OrderReturnStatus idKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int insertOrderReturnStatus(AdminOrderReturnStatus ordRetStat) throws KKAdminException
insertOrderReturnStatus
in interface AdminOrderMgrIf
ordRetStat
- An AdminOrderReturnStatus objectKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int insertOrderReturnStatuses(AdminOrderReturnStatus[] ordRetStats) throws KKAdminException
insertOrderReturnStatuses
in interface AdminOrderMgrIf
ordRetStats
- An AdminOrderReturnStatus array objectKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic int updateOrderReturnStatus(AdminOrderReturnStatus ordRetStat) throws java.lang.Exception
updateOrderReturnStatus
in interface AdminOrderMgrIf
ordRetStat
- An AdminOrderReturnStatus objectjava.lang.Exception
- an unexpected exceptionprotected boolean doesOrderReturnStatusExist(int orderReturnStatusId, int langId) throws org.apache.torque.TorqueException, KKAdminException
orderReturnStatusId
- the order return status IdlangId
- the language Idorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected boolean doesOrderReturnStatusExist(int orderReturnStatusId) throws org.apache.torque.TorqueException, KKAdminException
orderReturnStatusId
- the order return status Idorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected void addOrderReturnStatusOrderBy(com.konakart.db.KKCriteria c, AdminOrderReturnStatusSearch search)
c
- the csearch
- the searchprotected int addOrderReturnStatusSearchCriteria(com.konakart.db.KKCriteria c, AdminOrderReturnStatusSearch search)
c
- the csearch
- the searchpublic AdminOrderReturnStatus[] getAllOrderReturnStatuses(int languageId) throws java.lang.Exception
getAllOrderReturnStatuses
in interface AdminOrderMgrIf
languageId
- the languageIdjava.lang.Exception
- an unexpected exceptionprotected boolean isEnhancedVariantHandlingModeEnabled() throws KKAdminException
KKAdminException
- an unexpected KKAdminException exceptionCopyright © 2018 DS Data Systems UK Ltd.