public interface AdminOrderMgrIf
Modifier and Type | Method and Description |
---|---|
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) from
the current store.
|
int |
deleteOrder(int ordId,
boolean allStores)
Deletes an order and all associated records (eg OrderProducts, OrderStatusHistory etc)
|
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
|
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
|
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
|
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.
|
int |
getOrderCount(int orderStatus)
Returns a count of the Orders with the specified order status
|
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.
|
AdminOrderRefundSearchResult |
getOrderRefunds(AdminOrderRefundSearch retSearch,
int offset,
int size)
Search for Order Refunds
|
AdminOrderReturnSearchResult |
getOrderReturns(AdminOrderReturnSearch retSearch,
int offset,
int size)
Search for Order Returns
|
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.
|
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.
|
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.
|
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
|
void |
setRewardPointReservationId(int orderId,
int reservationId)
Updates the reward point reservation id for the order identified by
orderId . |
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 getOrderCount(int orderStatus) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
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)AdminOrderSearchResult getOrdersLite(AdminOrderSearch search, int offset, int size, int languageId) throws KKAdminException
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
- an unexpected exception in the KonaKart Admin engineAdminOrderSearchResult getOrders(AdminOrderSearch search, int offset, int size, int languageId) throws java.lang.Exception
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 exceptionAdminOrder[] getOrdersCreatedSince(java.util.Calendar since, int languageId) throws java.lang.Exception
since
- the date to use to define the range of orders to returnlanguageId
- the language idjava.lang.Exception
- an unexpected exceptionvoid updateOrder(int orderId, int orderStatus, java.lang.String comments, boolean notifyCustomer, AdminOrderUpdate updateOrder) throws java.lang.Exception
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 exceptionvoid updateOrder(int orderId, int orderStatus, java.lang.String comments, boolean notifyCustomer, AdminOrderUpdate updateOrder, java.lang.String storeId) throws java.lang.Exception
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 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 exceptionvoid updateOrderStatus(int orderId, int orderStatus, java.lang.String comments, boolean notifyCustomer) throws java.lang.Exception
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 exceptionAdminOrder getOrderForOrderId(int orderId) throws java.lang.Exception
orderId
- the orderIdjava.lang.Exception
- an unexpected exceptionAdminOrder getOrderForOrderId(int orderId, int languageId) throws java.lang.Exception
orderId
- the orderIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionAdminOrder getOrderForOrderId(int orderId, int languageId, boolean allStores) throws java.lang.Exception
orderId
- the orderIdlanguageId
- the languageIdallStores
- When set to true the method will return an order from a different store. This is
useful for multi-vendor orders which may all be in different stores.java.lang.Exception
- an unexpected exceptionAdminOrderStatusName[] getAllOrderStatuses(int languageId) throws java.lang.Exception
languageId
- the languageIdjava.lang.Exception
- an unexpected exceptionvoid calculateTotals(int scale, int taxQuantityRule, AdminOrderProduct orderProduct)
scale
- The scale used in the calculationstaxQuantityRule
- The tax calculation rule to useorderProduct
- the orderProductint deleteOrder(int ordId) throws KKAdminException
Removes records from :
ordId
- Order id of the order to deleteKKAdminException
- an unexpected exception in the KonaKart Admin engineint deleteOrder(int ordId, boolean allStores) throws KKAdminException
Removes records from :
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 EngineAdminOrderStatusNameSearchResult getOrderStatusNames(AdminOrderStatusNameSearch 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 exception in the KonaKart Admin engineint deleteOrderStatusName(int ordStatId) throws KKAdminException
ordStatId
- An OrderStatusName idKKAdminException
- an unexpected exception in the KonaKart Admin engineint insertOrderStatusName(AdminOrderStatusName ordStat) throws KKAdminException
ordStat
- An AdminOrderStatusName objectKKAdminException
- an unexpected exception in the KonaKart Admin engineint insertOrderStatusNames(AdminOrderStatusName[] ordStats) throws KKAdminException
ordStats
- An AdminOrderStatusName array objectKKAdminException
- an unexpected exception in the KonaKart Admin engineint updateOrderStatusName(AdminOrderStatusName ordStat) throws java.lang.Exception
ordStat
- An AdminOrderStatusName objectjava.lang.Exception
- an unexpected exceptionboolean doesOrderStatusExist(int ordStatId, int langId) throws org.apache.torque.TorqueException, KKAdminException
ordStatId
- the order status IdlangId
- the language Idorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminIpnHistories searchForIpnHistory(AdminDataDescriptor dataDesc, AdminIpnSearch ipnSearch) throws java.lang.Exception
dataDesc
- the dataDescipnSearch
- the ipnSearchjava.lang.Exception
- an unexpected exceptionint insertOrderReturn(AdminOrderReturn orderRet) throws java.lang.Exception
orderRet
- the orderRetjava.lang.Exception
- an unexpected exceptionvoid editOrderReturn(AdminOrderReturn orderRet) throws java.lang.Exception
orderRet
- the orderRetjava.lang.Exception
- an unexpected exceptionvoid deleteOrderReturn(int orderRetId) throws java.lang.Exception
orderRetId
- the orderRetIdjava.lang.Exception
- an unexpected exceptionAdminOrderReturnSearchResult getOrderReturns(AdminOrderReturnSearch retSearch, int offset, int size) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
retSearch
- the retSearchoffset
- the offsetsize
- the sizeKKAdminException
- an 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)void editOrder(AdminOrder order) throws java.lang.Exception
updateOrder()
.
The attributes that can be modified are:
order
- the orderjava.lang.Exception
- an unexpected exceptionvoid 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:
The following Credit Card attributes can be saved (on the AdminCreditCard object):
creditCard
- the AdminCreditCard objectjava.lang.Exception
- an unexpected exceptionKKAdminException
- an unexpected exception in the KonaKart Admin engineint insertIpnHistory(AdminIpnHistory ipnHistory) throws java.lang.Exception
ipnHistory
- the ipnHistoryjava.lang.Exception
- an unexpected exceptionvoid deleteIpnHistory(int ipnHistoryId) throws KKAdminException
ipnHistoryId
- IPN History id of the record to deleteKKAdminException
- unexpected exception in the KonaKart Admin Engineboolean isSaveCreditCardDetails()
void refreshConfigs() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionint insertOrder(AdminOrder order) throws java.lang.Exception
order
- the orderjava.lang.Exception
- an unexpected exceptionAdminCreditCard encryptCreditCard(AdminCreditCard creditCard, java.lang.String ek) throws KKAdminException
creditCard
- the original credit card objectek
- the encryption keyKKAdminException
- an unexpected exception in the KonaKart Admin enginevoid decryptOrder(AdminOrder order) throws KKAdminException
order
- the order object that will be populated with the unencrypted attributesKKAdminException
- an unexpected exception in the KonaKart Admin enginevoid setRewardPointReservationId(int orderId, int reservationId) throws java.lang.Exception
orderId
.orderId
- the orderIdreservationId
- the reservationIdjava.lang.Exception
- an unexpected exceptioncom.konakart.app.ExportOrderResponse exportOrder(com.konakart.app.ExportOrderOptions options) throws KKAdminException
options
- Defines the options to use for the export of the OrderKKAdminException
- an unexpected exception in the KonaKart Admin engineint insertOrderRefund(AdminOrderRefund orderRefund) throws java.lang.Exception
orderRefund
- the orderRefundjava.lang.Exception
- an unexpected exceptionvoid editOrderRefund(AdminOrderRefund orderRefund) throws java.lang.Exception
orderRefund
- the orderRefundjava.lang.Exception
- an unexpected exceptionvoid deleteOrderRefund(int orderRefundId) throws java.lang.Exception
orderRefundId
- the orderRefundIdjava.lang.Exception
- an unexpected exceptionAdminOrderRefundSearchResult getOrderRefunds(AdminOrderRefundSearch retSearch, int offset, int size) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
retSearch
- the retSearchoffset
- the offsetsize
- the sizeKKAdminException
- an 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)java.lang.String getRMACode(int orderId)
orderId
- Id of the orderjava.lang.String getCouponCode(java.lang.String options)
options
- Optional parameter that may be used to control how the coupon code is generatedAdminOrderReturnStatusSearchResult getOrderReturnStatuses(AdminOrderReturnStatusSearch 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
- unexpected exception in the KonaKart Admin Engineint deleteOrderReturnStatus(int ordRetStatId) throws KKAdminException
ordRetStatId
- An OrderReturnStatus idKKAdminException
- unexpected exception in the KonaKart Admin Engineint insertOrderReturnStatus(AdminOrderReturnStatus ordRetStat) throws KKAdminException
ordRetStat
- An AdminOrderReturnStatus objectKKAdminException
- unexpected exception in the KonaKart Admin Engineint insertOrderReturnStatuses(AdminOrderReturnStatus[] ordRetStats) throws KKAdminException
ordRetStats
- An AdminOrderReturnStatus array objectKKAdminException
- unexpected exception in the KonaKart Admin Engineint updateOrderReturnStatus(AdminOrderReturnStatus ordRetStat) throws java.lang.Exception
ordRetStat
- An AdminOrderReturnStatus objectjava.lang.Exception
- an unexpected exceptionAdminOrderReturnStatus[] getAllOrderReturnStatuses(int languageId) throws java.lang.Exception
languageId
- the languageIdjava.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.