public class ExportMgr extends BaseMgr implements ExportMgrIf
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
erpOutputQueuePrefix
Prefix for output queue
|
protected static org.apache.commons.logging.Log |
log
the log
|
templateBaseDir| Modifier and Type | Method and Description |
|---|---|
void |
exportCustomer(java.lang.String storeId,
int customerId,
CustomerRegistrationIf custReg,
java.lang.String type)
Get the customer from the customer Id and export it
|
void |
exportOrder(java.lang.String storeId,
int orderId)
Write the order with the specified Id to a queue
|
void |
exportOrder(java.lang.String storeId,
OrderIf order)
Write the order to a queue
|
IOAddress |
getBillingAddressFromOrder(OrderIf order,
java.util.HashMap<java.lang.String,CountryIf> countryMap)
Create an IOAddress for the billing address
|
IOAddress |
getCustomerAddressFromOrder(OrderIf order,
java.util.HashMap<java.lang.String,CountryIf> countryMap)
Create an IOAddress for the customer
|
IOAddress |
getDeliverAddressFromOrder(OrderIf order,
java.util.HashMap<java.lang.String,CountryIf> countryMap)
Create an IOAddress for the delivery address
|
java.lang.String |
getERPOutputQueuePrefix() |
java.lang.String[] |
getIntegrations()
Returns an array of strings containing the integration names
|
IOCustomerOut |
getIOCustomer(int customerId,
CustomerRegistrationIf custReg)
Get an IOCustomerOut object from a kkCustomerId
|
IOOrderOut |
getIOOrder(OrderIf orderIn)
Creates an IOOrder object (ready to export) from an OrderIf object.
|
boolean |
isERPEnabled() |
boolean |
isExportCustomer() |
boolean |
isExportOrder() |
boolean |
isUpdateObjectEnabled(int objectType,
int operationType)
Utility that returns true or false depending to determine whether a message should be
exported when an object has been modified
|
void |
setERPOutputQueuePrefix(java.lang.String erpOutputQueuePrefix) |
void |
updateObject(java.lang.String storeId,
int objectType,
int operationType,
int kkObjectId)
Writes an updateObject message to the queue.
|
void |
updateObject(java.lang.String storeId,
int objectType,
int operationType,
int kkObjectId,
java.lang.String objectId1,
java.lang.String objectId2,
java.lang.String value1,
java.lang.String value2)
Writes an updateObject message to the queue.
|
void |
writeToQueue(java.lang.String storeId,
java.lang.String msg)
Method to post data to a queue based on the storeId
|
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, updateStaticVariablesNowprotected static org.apache.commons.logging.Log log
protected java.lang.String erpOutputQueuePrefix
public ExportMgr(KKEngIf eng) throws java.lang.Exception
eng - the engjava.lang.Exception - an unexpected exceptionpublic void exportOrder(java.lang.String storeId,
OrderIf order)
throws java.lang.Exception
exportOrder in interface ExportMgrIfstoreId - the storeIdorder - the orderjava.lang.Exception - an unexpected exceptionpublic void exportOrder(java.lang.String storeId,
int orderId)
throws java.lang.Exception
exportOrder in interface ExportMgrIfstoreId - the storeIdorderId - the orderIdjava.lang.Exception - an unexpected exceptionpublic IOOrderOut getIOOrder(OrderIf orderIn) throws java.lang.Exception
getIOOrder in interface ExportMgrIforderIn - the orderInjava.lang.Exception - an unexpected exceptionpublic IOAddress getCustomerAddressFromOrder(OrderIf order, java.util.HashMap<java.lang.String,CountryIf> countryMap) throws com.konakart.app.KKException
getCustomerAddressFromOrder in interface ExportMgrIforder - the ordercountryMap - the countryMapcom.konakart.app.KKException - an unexpected KKException exceptionpublic IOAddress getBillingAddressFromOrder(OrderIf order, java.util.HashMap<java.lang.String,CountryIf> countryMap) throws java.lang.Exception
getBillingAddressFromOrder in interface ExportMgrIforder - the ordercountryMap - the countryMapjava.lang.Exception - an unexpected exceptionpublic IOAddress getDeliverAddressFromOrder(OrderIf order, java.util.HashMap<java.lang.String,CountryIf> countryMap) throws java.lang.Exception
getDeliverAddressFromOrder in interface ExportMgrIforder - the ordercountryMap - the countryMapjava.lang.Exception - an unexpected exceptionpublic void exportCustomer(java.lang.String storeId,
int customerId,
CustomerRegistrationIf custReg,
java.lang.String type)
throws java.lang.Exception
exportCustomer in interface ExportMgrIfstoreId - the storeIdcustomerId - the customerIdcustReg - the custRegtype - INSERT or UPDATEjava.lang.Exception - an unexpected exceptionpublic IOCustomerOut getIOCustomer(int customerId, CustomerRegistrationIf custReg) throws java.lang.Exception
getIOCustomer in interface ExportMgrIfcustomerId - the customerIdcustReg - the custRegjava.lang.Exception - an unexpected exceptionpublic void writeToQueue(java.lang.String storeId,
java.lang.String msg)
throws java.lang.Exception
writeToQueue in interface ExportMgrIfstoreId - the storeIdmsg - the msgjava.lang.Exception - an unexpected exceptionpublic java.lang.String getERPOutputQueuePrefix()
getERPOutputQueuePrefix in interface ExportMgrIfpublic void setERPOutputQueuePrefix(java.lang.String erpOutputQueuePrefix)
setERPOutputQueuePrefix in interface ExportMgrIferpOutputQueuePrefix - the erpOutputQueuePrefix to setpublic void updateObject(java.lang.String storeId,
int objectType,
int operationType,
int kkObjectId)
throws java.lang.Exception
updateObject in interface ExportMgrIfstoreId - the storeIdobjectType - Determines the type of object
operationType - Determines the type of operation
kkObjectId - Id of the KonaKart object being updatedjava.lang.Exception - an unexpected exceptionpublic void updateObject(java.lang.String storeId,
int objectType,
int operationType,
int kkObjectId,
java.lang.String objectId1,
java.lang.String objectId2,
java.lang.String value1,
java.lang.String value2)
throws java.lang.Exception
updateObject in interface ExportMgrIfstoreId - the storeIdobjectType - Determines the type of object
operationType - Determines the type of operation
kkObjectId - Id of the KonaKart object being updatedobjectId1 - Additional identifier that can be used by the ERP to identify the object.objectId2 - Additional identifier that can be used by the ERP to identify the object.value1 - Optional value to simplify the processing of the message.value2 - Optional value to simplify the processing of the message.java.lang.Exception - an unexpected exceptionpublic boolean isUpdateObjectEnabled(int objectType,
int operationType)
throws java.lang.Exception
isUpdateObjectEnabled in interface ExportMgrIfobjectType - Determines the type of object
operationType - Determines the type of operation
java.lang.Exception - an unexpected exceptionpublic boolean isERPEnabled()
throws java.lang.Exception
isERPEnabled in interface ExportMgrIfjava.lang.Exception - an unexpected exceptionpublic java.lang.String[] getIntegrations()
throws com.konakart.app.KKException,
java.lang.Exception
com.konakart.app.KKException - an unexpected exception in the KK enginejava.lang.Exception - an unexpected exceptionpublic boolean isExportCustomer()
throws java.lang.Exception
isExportCustomer in interface ExportMgrIfjava.lang.Exception - an unexpected exceptionpublic boolean isExportOrder()
throws java.lang.Exception
isExportOrder in interface ExportMgrIfjava.lang.Exception - an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.