public class AdminFileBatchMgr extends AdminBatchBaseMgr
AdminBatchBaseMgr.CustTagCounter
AdminBaseMgr.StaticData
log
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminFileBatchMgr(KKAdminIf eng) |
Modifier and Type | Method and Description |
---|---|
private int |
purgeFile(java.io.File file,
int ageInDays,
java.io.BufferedWriter bw) |
java.lang.String |
purgeFiles(java.lang.String logName,
java.lang.String appendLogStr,
java.lang.String fileDirectory,
java.lang.String fileFilter,
java.lang.String ageInDaysStr)
This batch job is used as a housekeeping utility to purge files in a specified directory
older than a specified number of days.
|
java.lang.String |
purgeMultipleFiles(java.lang.String logName,
java.lang.String appendLogStr,
java.lang.String fileDefn)
This batch job is used as a housekeeping utility to purge files in a specified directory
older than a specified number of days.
|
private java.lang.String |
purgeMultipleTrees(java.lang.String fileDefn,
java.lang.String descendDirs,
java.io.BufferedWriter bw)
This batch job is used as a housekeeping utility to purge files in a specified directory
older than a specified number of days.
|
java.lang.String |
purgeMultipleTrees(java.lang.String logName,
java.lang.String appendLogStr,
java.lang.String fileDefn,
java.lang.String descendDirs)
This batch job is used as a housekeeping utility to purge files in a specified directory
older than a specified number of days.
|
private int |
rolloverFile(java.io.File file,
int sizeInKB,
java.io.BufferedWriter bw) |
java.lang.String |
rolloverMultipleFiles(java.lang.String logName,
java.lang.String appendLogStr,
java.lang.String fileDefn)
This batch job is used as a housekeeping utility to "rollover" files in a specified directory
that are over a specified size.
|
java.lang.String |
syncFilesFromRemoteKKAdmin(java.lang.String logName,
java.lang.String appendLogStr,
java.lang.String remoteJSONAdminUrl,
java.lang.String localDir,
java.lang.String remoteDir,
java.lang.String sessId)
This batch job is used to synchronize files from a remote KonaKart system to a local KonaKart
system.
|
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
public AdminFileBatchMgr(KKAdminIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic java.lang.String purgeFiles(java.lang.String logName, java.lang.String appendLogStr, java.lang.String fileDirectory, java.lang.String fileFilter, java.lang.String ageInDaysStr) throws java.lang.Exception
logName
- The name of the log which shouldn't include the path. e.g. myLog.logappendLogStr
- 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.fileDirectory
- the directory where the files are that are to be purged.fileFilter
- only files that are matched by this regular expression are considered for purging.ageInDaysStr
- only files that are older than this many days will be purged.java.lang.Exception
- an unexpected exceptionpublic java.lang.String purgeMultipleFiles(java.lang.String logName, java.lang.String appendLogStr, java.lang.String fileDefn) throws java.lang.Exception
logName
- The name of the log which shouldn't include the path. e.g. myLog.logappendLogStr
- 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.fileDefn
- Comma-separated list of file purge definitions. Each one is composed of:
directory, file filter (as a regular expression to indicate which files to purge),
age in days (files older than this many days are purged)java.lang.Exception
- an unexpected exceptionpublic java.lang.String purgeMultipleTrees(java.lang.String logName, java.lang.String appendLogStr, java.lang.String fileDefn, java.lang.String descendDirs) throws java.lang.Exception
logName
- The name of the log which shouldn't include the path. e.g. myLog.logappendLogStr
- 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.fileDefn
- Comma-separated list of file purge definitions. Each one is composed of:
directory, file filter (as a regular expression to indicate which files to purge),
age in days (files older than this many days are purged)descendDirs
- If "true" we purge old files that match the regular expressions in the specified
directory and all its child directories. If not "true" only the old files in the
specified directory that match the regular expression are purged.java.lang.Exception
- an unexpected exceptionprivate java.lang.String purgeMultipleTrees(java.lang.String fileDefn, java.lang.String descendDirs, java.io.BufferedWriter bw) throws java.lang.Exception
fileDefn
- Comma-separated list of file purge definitions. Each one is composed of:
directory, file filter (as a regular expression to indicate which files to purge),
age in days (files older than this many days are purged)descendDirs
- If "true" we purge old files that match the regular expressions in the specified
directory and all its child directories. If not "true" only the old files in the
specified directory that match the regular expression are purged.bw
- A BufferedWriter that this will write diagnostic output to. Must be passed in to
this call.java.lang.Exception
- an unexpected exceptionprivate int purgeFile(java.io.File file, int ageInDays, java.io.BufferedWriter bw) throws java.io.IOException
java.io.IOException
public java.lang.String syncFilesFromRemoteKKAdmin(java.lang.String logName, java.lang.String appendLogStr, java.lang.String remoteJSONAdminUrl, java.lang.String localDir, java.lang.String remoteDir, java.lang.String sessId) throws java.lang.Exception
logName
- The name of the log which shouldn't include the path. e.g. myLog.logappendLogStr
- 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.remoteJSONAdminUrl
- URL of remote Admin JSON servicelocalDir
- local directoryremoteDir
- local directorysessId
- 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 exceptionpublic java.lang.String rolloverMultipleFiles(java.lang.String logName, java.lang.String appendLogStr, java.lang.String fileDefn) throws java.lang.Exception
Note that files whose name have a digit (0-9) in the position before the last "." will not be rolled over. This is to avoid rolling over files that have already been rolled over. This makes the configuration for the batch job considerably easier.
logName
- The name of the log which shouldn't include the path. e.g. myLog.logappendLogStr
- 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.fileDefn
- Comma-separated list of file rollover definitions. Each one is composed of:
directory, file filter (as a regular expression to indicate which files to roll
over), size in KB (files that are larger than this many kilobytes will be rolled
over)java.lang.Exception
- an unexpected exceptionprivate int rolloverFile(java.io.File file, int sizeInKB, java.io.BufferedWriter bw) throws java.io.IOException
java.io.IOException
Copyright © 2018 DS Data Systems UK Ltd.