public class Exporter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private KKAdminIf |
adEng |
private AdminEngineConfig |
adEngConf |
private java.util.HashMap<java.lang.Integer,AdminCategory> |
catHash |
protected static org.apache.commons.logging.Log |
log
the log
|
private java.util.HashMap<java.lang.String,AdminManufacturer> |
manuHash |
protected static com.fasterxml.jackson.databind.ObjectMapper |
mapper
JSON Data Mapping Object
|
private java.lang.String |
sessionId |
Constructor and Description |
---|
Exporter() |
Modifier and Type | Method and Description |
---|---|
private void |
addCatToHash(AdminCategory cat) |
private void |
addProductCustomFields(AdminProduct adProd,
ExporterOptions exporterOptions) |
private void |
checkCustomers(java.lang.String sessionId2,
KKAdminIf adEng2,
ExporterOptions exporterOptions) |
void |
doExport(ExporterOptions exporterOptions,
java.lang.String userName,
java.lang.String password,
java.lang.String storeId,
int engineMode,
boolean customersShared,
boolean productsShared,
boolean categoriesShared)
Export data for ZucchettiAI
|
void |
doExport(java.lang.String sessionId,
KKAdminIf adEng,
ExporterOptions exporterOptions)
Export data for ZucchettiAI
|
private AdminProduct[] |
duplicateSpecialProducts(AdminProduct[] adminProducts) |
private void |
exportCustomers(java.lang.String sessionId,
KKAdminIf adEng,
ExporterOptions exporterOptions)
Export the customers
|
private void |
exportProducts(java.lang.String sessionId,
KKAdminIf adEng,
ExporterOptions exporterOptions)
Export the products
|
KKAdminIf |
getAdEng() |
AdminEngineConfig |
getAdEngConf() |
private java.lang.String |
getCategoryName(int categoryId) |
java.util.HashMap<java.lang.String,AdminManufacturer> |
getManuHash() |
static com.fasterxml.jackson.databind.ObjectMapper |
getMapper() |
java.lang.String |
getSessionId() |
private java.lang.String |
getTagValueForProductsViewed(AdminProduct[] productArray,
int maxItems) |
static void |
main(java.lang.String[] args) |
private void |
populateTag(java.lang.String sessionId,
KKAdminIf adEng,
ExporterOptions exporterOptions)
Populate the specified tag at random
|
void |
setAdEng(KKAdminIf adEng) |
void |
setAdEngConf(AdminEngineConfig adEngConf) |
private AdminCustomerTag[] |
setCustomFieldsForCustomer(AdminCustomer cust,
AdminCustomerTag[] custTags,
boolean randomize) |
private void |
setNextCustomerCustomField(AICustomer AICust,
java.lang.String customValue,
int nxtFld) |
void |
setSessionId(java.lang.String sessionId) |
protected static org.apache.commons.logging.Log log
private KKAdminIf adEng
private java.lang.String sessionId
private AdminEngineConfig adEngConf
private java.util.HashMap<java.lang.String,AdminManufacturer> manuHash
private java.util.HashMap<java.lang.Integer,AdminCategory> catHash
protected static com.fasterxml.jackson.databind.ObjectMapper mapper
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- command line argumentsjava.lang.Exception
- an unexpected exceptionpublic void doExport(ExporterOptions exporterOptions, java.lang.String userName, java.lang.String password, java.lang.String storeId, int engineMode, boolean customersShared, boolean productsShared, boolean categoriesShared) throws KKAdminException, com.konakart.app.KKException, java.io.IOException
exporterOptions
- the exporter optionsuserName
- usernamepassword
- passwordstoreId
- storeIdengineMode
- engine modecustomersShared
- set to true if customers are sharedproductsShared
- set to true if products are sharedcategoriesShared
- set to true if categories are sharedKKAdminException
- Unexpected problem in the KKAdmin enginecom.konakart.app.KKException
- Unexpected problem in the KKEng enginejava.io.IOException
- Unexpected I/O problempublic void doExport(java.lang.String sessionId, KKAdminIf adEng, ExporterOptions exporterOptions) throws KKAdminException, com.konakart.app.KKException, java.io.IOException
sessionId
- sessionIdadEng
- admin engineexporterOptions
- exporter optionsKKAdminException
- Unexpected problem in the KKAdmin enginecom.konakart.app.KKException
- Unexpected problem in the KKEng enginejava.io.IOException
- Unexpected I/O problemprivate void exportProducts(java.lang.String sessionId, KKAdminIf adEng, ExporterOptions exporterOptions) throws KKAdminException, java.io.IOException
sessionId
- sessionIdadEng
- admin engineexporterOptions
- exporter optionsKKAdminException
- Unexpected problem in the KKAdmin enginejava.io.IOException
- Unexpected I/O problemprivate void addProductCustomFields(AdminProduct adProd, ExporterOptions exporterOptions)
private java.lang.String getCategoryName(int categoryId) throws KKAdminException
KKAdminException
private void addCatToHash(AdminCategory cat)
private void exportCustomers(java.lang.String sessionId, KKAdminIf adEng, ExporterOptions exporterOptions) throws KKAdminException, java.io.IOException
sessionId
- sessionIdadEng
- admin engineexporterOptions
- exporter optionsKKAdminException
- Unexpected problem in the KKAdmin enginejava.io.IOException
- Unexpected I/O problemprivate AdminCustomerTag[] setCustomFieldsForCustomer(AdminCustomer cust, AdminCustomerTag[] custTags, boolean randomize)
private void setNextCustomerCustomField(AICustomer AICust, java.lang.String customValue, int nxtFld) throws KKAdminException
KKAdminException
private AdminProduct[] duplicateSpecialProducts(AdminProduct[] adminProducts)
private void checkCustomers(java.lang.String sessionId2, KKAdminIf adEng2, ExporterOptions exporterOptions) throws com.konakart.app.KKException, java.io.IOException
com.konakart.app.KKException
java.io.IOException
public KKAdminIf getAdEng()
public void setAdEng(KKAdminIf adEng)
adEng
- the adEng to setpublic java.lang.String getSessionId()
public void setSessionId(java.lang.String sessionId)
sessionId
- the sessionId to setpublic AdminEngineConfig getAdEngConf()
public void setAdEngConf(AdminEngineConfig adEngConf)
adEngConf
- the adEngConf to setpublic java.util.HashMap<java.lang.String,AdminManufacturer> getManuHash()
public static com.fasterxml.jackson.databind.ObjectMapper getMapper()
private void populateTag(java.lang.String sessionId, KKAdminIf adEng, ExporterOptions exporterOptions) throws KKAdminException, java.io.IOException
sessionId
- sessionIdadEng
- admin engineexporterOptions
- exporter optionsKKAdminException
- Unexpected problem in the KKAdmin enginejava.io.IOException
- Unexpected I/O problemprivate java.lang.String getTagValueForProductsViewed(AdminProduct[] productArray, int maxItems)
Copyright © 2018 DS Data Systems UK Ltd.