public class AdminBatchBaseMgr extends AdminBaseMgr
Modifier and Type | Class and Description |
---|---|
protected class |
AdminBatchBaseMgr.CustTagCounter
A return object containing CustomerTag counters for inserted and updated records
|
AdminBaseMgr.StaticData
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log
the log
|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminBatchBaseMgr() |
Modifier and Type | Method and Description |
---|---|
protected void |
ensureCustomerTagIsPresent(AdminCustomerTag tag,
java.io.BufferedWriter bw) |
protected AdminEngineConfig |
getAdEngConf() |
protected KKAdminIf |
getAdminJsonEngine(java.lang.String adminJSONUrlStr) |
protected java.lang.String |
getBatchLogName(java.lang.String logNameIn,
boolean appendLog)
Creates the name of the log depending on whether it has to be unique or not and appends it to
the log file directory.
|
protected boolean |
getBoolean(java.lang.String in,
boolean defValue,
boolean useDefault)
Convert a String to a boolean, passing in a default value.
|
protected java.util.HashMap<java.lang.String,AdminCustomerTag> |
getCustomerTagsHash(int customerId,
java.util.Set<java.lang.String> tagsToUpdate)
Get the customer tags for the specified customerId.
|
protected int |
getInt(java.lang.String in,
int defValue,
boolean useDefault)
Convert a String to an int, passing in a default value.
|
protected int[] |
getIntArray(java.lang.String in)
Convert a String to an int[]
|
protected int[] |
getIntArray(java.lang.String in,
java.lang.String sep)
Convert a String to an int[]
|
protected com.konakart.db.KKCriteria |
getLiteCustomerCriteria(int size)
Get the criteria object to retrieve lite customers
|
protected java.util.List<AdminCustomer> |
getLiteCustomers(com.konakart.db.KKCriteria c,
int custId)
The method returns a null list within the return object when all of the customers have been
read.
|
protected java.lang.String |
getLogName(java.lang.String logNameIn,
boolean appendLog)
Creates the name of the log depending on whether it has to be unique or not and appends it to
the log file directory.
|
protected AdminOrder[] |
getOrders(com.konakart.db.KKCriteria c,
int orderId)
The method returns an array of orders which will be empty when all of the orders have been
read.
|
protected java.lang.String |
getSkuForProduct(int productId,
AdminOrder[] orders)
Get the SKU for the specified product.
|
protected void |
insertOrUpdateCustomerTag(java.lang.String tagName,
java.util.HashMap<java.lang.String,AdminCustomerTag> currentTags,
int custId,
java.lang.String value,
java.util.HashMap<java.lang.String,AdminBatchBaseMgr.CustTagCounter> tagCounter)
Insert or Update the specified tag with the specified value.
|
protected java.lang.String |
trimMultiTag(java.lang.String tagValue,
java.lang.String delim,
int maxTagValueSize)
Trim the multi-value customer tag value to the specified size by chopping off items from the
end of the String.
|
protected void |
validateTemplate(java.lang.String templateName)
Check that the Velocity template is valid
|
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
protected java.lang.String getLogName(java.lang.String logNameIn, boolean appendLog) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException, java.lang.Exception
logNameIn
- the logNameInappendLog
- the appendLogjava.lang.Exception
- an unexpected exceptionKKAdminException
- an unexpected exception in the KonaKart Admin enginecom.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)protected java.lang.String getBatchLogName(java.lang.String logNameIn, boolean appendLog) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException, java.lang.Exception
logNameIn
- the logNameInappendLog
- the appendLogjava.lang.Exception
- an unexpected exceptionKKAdminException
- an unexpected exception in the KonaKart Admin enginecom.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)protected void validateTemplate(java.lang.String templateName) throws java.lang.Exception
templateName
- Velocity template name to validatejava.lang.Exception
- an unexpected exceptionprotected int getInt(java.lang.String in, int defValue, boolean useDefault) throws KKAdminException
in
- the indefValue
- the defValueuseDefault
- the useDefaultKKAdminException
- an unexpected exception in the KonaKart Admin engineprotected boolean getBoolean(java.lang.String in, boolean defValue, boolean useDefault) throws KKAdminException
in
- the indefValue
- the defValueuseDefault
- the useDefaultKKAdminException
- an unexpected exception in the KonaKart Admin engineprotected int[] getIntArray(java.lang.String in) throws KKAdminException
in
- the inKKAdminException
- an unexpected exception in the KonaKart Admin engineprotected int[] getIntArray(java.lang.String in, java.lang.String sep) throws KKAdminException
in
- the insep
- Separator string to split onKKAdminException
- an unexpected exception in the KonaKart Admin engineprotected AdminOrder[] getOrders(com.konakart.db.KKCriteria c, int orderId) throws java.lang.Exception
c
- the corderId
- the orderId - select orders with Orders_id greater than this valuejava.lang.Exception
- an unexpected exceptionprotected void ensureCustomerTagIsPresent(AdminCustomerTag tag, java.io.BufferedWriter bw) throws KKAdminException
KKAdminException
protected java.lang.String trimMultiTag(java.lang.String tagValue, java.lang.String delim, int maxTagValueSize) throws KKAdminException
tagValue
- the tag valuedelim
- the delimitermaxTagValueSize
- tag value sizeKKAdminException
- if something unexpected happened in the KKAdmin engineprotected java.lang.String getSkuForProduct(int productId, AdminOrder[] orders) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException, java.lang.Exception
productId
- the productIdorders
- array of ordersjava.lang.Exception
- if something unexpected happenedKKAdminException
- if something unexpected happened in the KKAdmin enginecom.workingdogs.village.DataSetException
- if something unexpected happened in the database layerorg.apache.torque.TorqueException
- if something unexpected happened in the database layerprotected java.util.List<AdminCustomer> getLiteCustomers(com.konakart.db.KKCriteria c, int custId) throws java.lang.Exception
c
- the lite customer criteriacustId
- the customerId (only customers with customerId greater than this will be returned)java.lang.Exception
- an unexpected exceptionprotected com.konakart.db.KKCriteria getLiteCustomerCriteria(int size) throws KKAdminException
size
- the number of records to retrieve at a timeKKAdminException
- if something unexpected happened in the KKAdmin engineprotected java.util.HashMap<java.lang.String,AdminCustomerTag> getCustomerTagsHash(int customerId, java.util.Set<java.lang.String> tagsToUpdate) throws java.lang.Exception
customerId
- the customerIdtagsToUpdate
- a set of tag names that we wish to updatejava.lang.Exception
- if something unexpected happenedprotected void insertOrUpdateCustomerTag(java.lang.String tagName, java.util.HashMap<java.lang.String,AdminCustomerTag> currentTags, int custId, java.lang.String value, java.util.HashMap<java.lang.String,AdminBatchBaseMgr.CustTagCounter> tagCounter) throws KKAdminException, org.apache.torque.TorqueException, java.text.ParseException, com.workingdogs.village.DataSetException, java.lang.Exception
tagName
- the new tag's namecurrentTags
- a HashMap of current customer tagscustId
- the customer's Idvalue
- the tag's new value to settagCounter
- the tag counter used for reporting resultsKKAdminException
- if something unexpected happened in the KKAdmin engineorg.apache.torque.TorqueException
- if something unexpected happened in the database layerjava.text.ParseException
- if something unexpected happened parsing in the KKAdmin enginecom.workingdogs.village.DataSetException
- if something unexpected happened in the database layerjava.lang.Exception
- if something unexpected happenedprotected AdminEngineConfig getAdEngConf() throws KKAdminException
KKAdminException
protected KKAdminIf getAdminJsonEngine(java.lang.String adminJSONUrlStr) throws KKAdminException
KKAdminException
Copyright © 2018 DS Data Systems UK Ltd.