public class AdminProductExportBatchMgr extends AdminBatchBaseMgr
Modifier and Type | Class and Description |
---|---|
protected class |
AdminProductExportBatchMgr.Counter
A Counter object
|
AdminBatchBaseMgr.CustTagCounter
AdminBaseMgr.StaticData
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
RSS_HEADER |
private static java.lang.String |
XML_HEADER |
log
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminProductExportBatchMgr(KKAdminIf eng) |
Modifier and Type | Method and Description |
---|---|
private void |
addCatToHash(java.util.HashMap<java.lang.Integer,AdminCategory> catHash,
AdminCategory cat) |
void |
createGoogleShoppingFeed(java.lang.String logName,
java.lang.String appendLogStr,
java.lang.String recordFetchSizeStr,
java.lang.String feedFileName,
java.lang.String sessId)
Creates a feed for Google Shopping.
|
private java.lang.String |
getBrand(AdminProduct adProd) |
private java.lang.String |
getCategoryName(java.util.HashMap<java.lang.Integer,AdminCategory> catHash,
int categoryId) |
private java.lang.String |
getFeatureDescriptions(AdminProduct adProd) |
private java.lang.String |
getGtin(AdminProduct adProd) |
private java.lang.String |
getId(AdminProduct adProd) |
private java.lang.String |
getImageLinks(AdminProduct adProd,
java.lang.String sessId) |
private java.lang.String |
getMpn(AdminProduct adProd) |
private java.lang.String |
getProductDescription(AdminProduct adProd) |
private java.lang.String |
getProductDetail(AdminProduct adProd) |
private java.lang.String |
getProductLine(AdminProduct adProd) |
private java.lang.String |
getProductName(AdminProduct adProd) |
private java.lang.String |
getProductPageUrl(AdminProduct adProd,
java.lang.String sessId) |
private java.lang.String |
getProductType(java.util.HashMap<java.lang.Integer,AdminCategory> catHash,
AdminProduct adProd) |
private java.lang.String |
getReleaseDate(AdminProduct adProd) |
private java.lang.String |
getSuggestedRetailPrice(AdminProduct adProd,
AdminCurrency currency) |
private java.lang.String |
getTitle(AdminProduct adProd) |
private java.lang.String |
getYYYY_MM_DD(java.util.Date date) |
private void |
processProduct(java.io.BufferedWriter bw,
java.io.BufferedWriter bfw,
int recordFetchSize,
java.lang.String sessId,
AdminProductExportBatchMgr.Counter count,
int defLangId,
int prodId,
AdminCurrency currency,
java.util.HashMap<java.lang.Integer,AdminCategory> catHash) |
private void |
processProducts(java.io.BufferedWriter bw,
java.io.BufferedWriter bfw,
int recordFetchSize,
java.lang.String sessId,
AdminProductExportBatchMgr.Counter count) |
private void |
writeLog(java.io.BufferedWriter bw,
java.lang.String msg) |
ensureCustomerTagIsPresent, getAdEngConf, getAdminJsonEngine, getBatchLogName, getBoolean, getCustomerTagsHash, getInt, getIntArray, getIntArray, getLiteCustomerCriteria, getLiteCustomers, getLogName, getOrders, getSkuForProduct, insertOrUpdateCustomerTag, trimMultiTag, validateTemplate
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, refreshConfigs, removeCData, sendMQMessages, setAdminEng, setDebugStackTraceExclusions, setKkAdminPropsFilePath, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr, updateStaticVariablesNow
private static final java.lang.String XML_HEADER
private static final java.lang.String RSS_HEADER
public AdminProductExportBatchMgr(KKAdminIf eng) throws java.lang.Exception
eng
- the Admin enginejava.lang.Exception
- an unexpected exceptionpublic void createGoogleShoppingFeed(java.lang.String logName, java.lang.String appendLogStr, java.lang.String recordFetchSizeStr, java.lang.String feedFileName, java.lang.String sessId) throws java.lang.Exception
The feed needs to be uploaded to Google either manually or on a scheduled basis using a read from Google.
logName
- The name of the log which shouldn't include the path or extension. i.e. It should
be myLog rather than /logs/myLog.txt.appendLogStr
- If set to false, a new log will be created every time the batch job is run.
Otherwise new data will be appended to the existing log. It defaults to false.recordFetchSizeStr
- It the batch involves reading many records in a loop, this determines the maximum
number read in any one loop. It defaults to 100.feedFileName
- The resulting feed file namesessId
- The sessionId. The sessionId is a special parameter defined in the
konakart_jobs.xml file. If a parameter is defined with value "SESSION_ID",
KonaKart will replace this value with the sessionId of the logged in session.java.lang.Exception
- an unexpected exceptionprivate void writeLog(java.io.BufferedWriter bw, java.lang.String msg) throws java.io.IOException
java.io.IOException
private void processProducts(java.io.BufferedWriter bw, java.io.BufferedWriter bfw, int recordFetchSize, java.lang.String sessId, AdminProductExportBatchMgr.Counter count) throws java.lang.Exception
java.lang.Exception
private void processProduct(java.io.BufferedWriter bw, java.io.BufferedWriter bfw, int recordFetchSize, java.lang.String sessId, AdminProductExportBatchMgr.Counter count, int defLangId, int prodId, AdminCurrency currency, java.util.HashMap<java.lang.Integer,AdminCategory> catHash) throws java.lang.Exception
java.lang.Exception
private java.lang.String getProductPageUrl(AdminProduct adProd, java.lang.String sessId) throws KKAdminException
KKAdminException
private java.lang.String getImageLinks(AdminProduct adProd, java.lang.String sessId) throws KKAdminException
KKAdminException
private java.lang.String getFeatureDescriptions(AdminProduct adProd)
private java.lang.String getProductDescription(AdminProduct adProd)
private java.lang.String getProductDetail(AdminProduct adProd)
private java.lang.String getProductType(java.util.HashMap<java.lang.Integer,AdminCategory> catHash, AdminProduct adProd) throws java.lang.Exception
java.lang.Exception
private java.lang.String getProductLine(AdminProduct adProd)
private java.lang.String getSuggestedRetailPrice(AdminProduct adProd, AdminCurrency currency)
private java.lang.String getReleaseDate(AdminProduct adProd)
private java.lang.String getYYYY_MM_DD(java.util.Date date)
private java.lang.String getMpn(AdminProduct adProd)
private java.lang.String getGtin(AdminProduct adProd)
private java.lang.String getProductName(AdminProduct adProd)
private java.lang.String getTitle(AdminProduct adProd)
private java.lang.String getBrand(AdminProduct adProd)
private java.lang.String getId(AdminProduct adProd)
private java.lang.String getCategoryName(java.util.HashMap<java.lang.Integer,AdminCategory> catHash, int categoryId) throws java.lang.Exception
java.lang.Exception
private void addCatToHash(java.util.HashMap<java.lang.Integer,AdminCategory> catHash, AdminCategory cat)
Copyright © 2018 DS Data Systems UK Ltd.