|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.konakartadmin.bl.AdminBaseMgr
public class AdminBaseMgr
The base for all Admin Managers
Nested Class Summary | |
---|---|
protected class |
AdminBaseMgr.StaticData
Used to store the static data of this manager |
Field Summary | |
---|---|
protected KKAdminIf |
adminEng
Our Admin Engine |
protected static java.lang.String |
baseMgrMutex
mutex |
protected static java.util.Map<java.lang.String,AdminBaseMgr.StaticData> |
baseStaticDataHM
Hash Map that contains the static data |
protected static java.lang.String |
cDataEnd
CDATA end |
protected static java.lang.String |
cDataStart
CDATA start |
protected org.apache.commons.configuration.Configuration |
kkConf
Configuration from properties file |
protected static java.lang.String |
kkInstanceId
The KonaKart Instance - read from the properties file |
private static org.apache.commons.logging.Log |
log
the log |
protected AdminMgrFactory |
mgrFactory
Factory for creating managers |
protected static java.lang.String |
STORE_ID
store id |
protected java.lang.String |
templateBaseDir
Velocity template base directory under WEB-INF/classes. |
Constructor Summary | |
---|---|
AdminBaseMgr()
Constructor |
Method Summary | |
---|---|
protected static void |
addInsertAttr(org.apache.torque.util.Criteria c,
java.lang.String attrName,
int value)
A utility method to not add integers that are equal to ConstantsMgr.NOT_SET |
protected static void |
addInsertAttr(org.apache.torque.util.Criteria c,
java.lang.String attrName,
java.lang.Object value)
A utility to not add null objects |
protected void |
checkIntIsSet(int param,
java.lang.String paramType,
java.lang.String paramName)
Throws an exception if the int parameter is KKConstants.NOT_SET. |
protected void |
checkRequired(java.lang.Object param,
java.lang.String paramType,
java.lang.String paramName)
Throws an exception with a proper message if the required parameter is null or null or empty for the case of a string. |
protected AdminAddressMgrIf |
getAdminAddressMgr()
|
protected AdminAuditMgrIf |
getAdminAuditMgr()
|
protected AdminBillingMgrIf |
getAdminBillingMgr()
|
protected AdminBookableProductMgrIf |
getAdminBookableProductMgr()
|
protected AdminCategoryMgrIf |
getAdminCatMgr()
|
protected AdminConfigurationMgrIf |
getAdminConfigMgr()
|
protected AdminCurrencyMgrIf |
getAdminCurrMgr()
|
protected AdminCustomerMgrIf |
getAdminCustMgr()
|
protected AdminCustomerTagMgrIf |
getAdminCustTagMgr()
|
protected AdminEmailMgrIf |
getAdminEmailMgr()
|
KKAdminIf |
getAdminEng()
|
AdminHtmlMgrIf |
getAdminHtmlMgr()
|
protected AdminLanguageMgrIf |
getAdminLanguageMgr()
|
protected AdminManufacturerMgrIf |
getAdminManuMgr()
|
AdminMessageMgrIf |
getAdminMessageMgr()
|
protected AdminMiscItemMgrIf |
getAdminMiscItemMgr()
|
protected AdminModulesMgrIf |
getAdminModulesMgr()
|
AdminMultiStoreMgrIf |
getAdminMultiStoreMgr()
|
protected AdminOrderMgrIf |
getAdminOrderMgr()
|
protected AdminPdfMgrIf |
getAdminPdfMgr()
|
protected AdminProdAttrMgrIf |
getAdminProdAttrMgr()
|
protected AdminProductMgrIf |
getAdminProdMgr()
|
protected AdminPromotionMgrIf |
getAdminPromMgr()
|
protected AdminPublishProductMgrIf |
getAdminPublishProdMgr()
|
AdminReviewMgrIf |
getAdminReviewMgr()
|
protected AdminSearchRuleMgrIf |
getAdminSearchRuleMgr()
|
protected AdminSecurityMgrIf |
getAdminSecMgr()
|
AdminSolrMgrIf |
getAdminSolrMgr()
|
AdminStoreMgrIf |
getAdminStoreMgr()
|
protected AdminTagMgrIf |
getAdminTagMgr()
|
protected AdminTaxMgrIf |
getAdminTaxMgr()
|
AdminValidationMgrIf |
getAdminValidationMgr()
|
AdminVelocityContextMgrIf |
getAdminVelocityContextMgr()
|
AdminWishListMgrIf |
getAdminWishListMgr()
|
boolean |
getBooleanFromString(java.lang.String value,
boolean def)
Get a boolean value for the String |
protected ExportXMLDataIf |
getExportXMLData()
Finds and returns an implementation of the ExportXMLDataIf on the class path |
int |
getIntFromString(java.lang.String value,
int def)
Get an integer value for the String |
protected org.apache.commons.configuration.Configuration |
getKkConfig()
Get the kkConf the properties file |
protected java.lang.String |
getKkInstanceId()
Get the instance Id from the properties file |
protected int |
getMode()
Return the engine mode |
protected java.lang.String |
getModeString()
Return the engine mode - as a descriptive String for diagnostic purposes only |
protected com.konakart.mqif.MqMgrIf |
getMqMgr()
|
protected com.konakart.bl.KKCriteria |
getNewCriteria()
Gets a new KKCriteria object and sets the Database name. |
protected com.konakart.bl.KKCriteria |
getNewCriteria(boolean allStores)
Gets a new KKCriteria object and sets the Database name. |
java.lang.String |
getPostSearchText()
|
java.lang.String |
getPreSearchText()
|
protected java.lang.String |
getPropertyValue(java.lang.String propKey)
|
protected int |
getRecordCount(com.konakart.bl.KKCriteria c)
This method is mainly used for paging... |
protected AdminRewardPointMgrIf |
getRewardPointMgr()
|
protected int |
getSingleIntResult(com.konakart.bl.KKCriteria c)
This method is used to run a SELECT defined by the Criteria and return the single integer value returned by the query as the result. |
protected java.lang.String |
getStoreId()
Return the storeId. |
protected org.apache.velocity.Template |
getTemplate(org.apache.velocity.app.VelocityEngine ve,
java.lang.String configDir,
java.lang.String templateName)
Helper method to search for the velocity templates under the Template Base Directory |
protected java.lang.String |
getTemplateBase(java.lang.String configDir)
Returns the template base directory which is created by concatenating the following: Value of the Directory configuration variable passed in current storeId |
protected Xml_io_If |
getXml_io()
Finds and returns an implementation of the Xml_io_If on the class path |
protected void |
init(KKAdminIf eng)
Init method called from the super class. |
protected boolean |
isConfigSet(java.lang.String configKey,
boolean defaultValue)
Is the specified config key's value is set to TRUE, YES or ON (case insensitive)? If the config key's value isn't found the specified default value is returned. |
protected boolean |
isEnterprise()
Returns true if we are in Enterprise Mode |
protected boolean |
isMultiStoreLanguagesShared()
Returns true if we can share languages in multi-store single db mode |
protected boolean |
isMultiStoreMode()
Is the engine running in one of the MultiStore modes? |
protected boolean |
isMultiStoreShareCategories()
Returns true if we can share categories in multi-store single db mode. |
protected boolean |
isMultiStoreShareCustomers()
Returns true if we need to share customers in multi-store single db mode |
protected boolean |
isMultiStoreShareProducts()
Returns true if we can share products in multi-store single db mode |
protected boolean |
isMultiStoreSingleDBCSMode()
Is the engine running in MultiStore Single DB Customers Shared mode? |
protected boolean |
isMultiStoreSingleDBMode()
Is the engine running in one of the MultiStore Single DB modes? |
protected boolean |
isMultiStoreSingleDBNonCSMode()
Is the engine running in MultiStore Single DB Non-Shared Customers mode? |
protected KKAdminException |
manageException(java.lang.Exception e)
Common code to manage exceptions in the Admin Managers |
void |
refreshConfigs()
Refresh the configuration of the Admin Base Manager |
java.lang.String |
removeCData(java.lang.String stringIn)
Returns the string passed in as stringIn without the CData information. |
void |
setAdminEng(KKAdminIf adminEng)
|
void |
setupWildCardRules(AdminBaseMgr.StaticData sd)
Some of the managers, but not all, will want to set these Wildcard rules |
void |
setWildCardAfter(AdminBaseMgr.StaticData sd)
Set the post-search string based on the configuration variable value |
void |
setWildCardBefore(AdminBaseMgr.StaticData sd)
Set the pre-search string based on the configuration variable value |
protected void |
shutdownGracefully(java.io.BufferedWriter bw)
Common code to shutdown gracefully for the case where there is a buffered writer for the log. |
protected void |
shutdownGracefully(java.util.concurrent.ExecutorService executor,
java.io.BufferedWriter bw)
Common code to shutdown gracefully for the case where eMails are being send by multiple threads and there is a buffered writer for the log. |
protected java.lang.String |
timestampStr()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static org.apache.commons.logging.Log log
protected static java.lang.String baseMgrMutex
protected static final java.lang.String STORE_ID
protected static final java.lang.String cDataStart
protected static final java.lang.String cDataEnd
protected KKAdminIf adminEng
protected java.lang.String templateBaseDir
protected static java.util.Map<java.lang.String,AdminBaseMgr.StaticData> baseStaticDataHM
protected AdminMgrFactory mgrFactory
protected org.apache.commons.configuration.Configuration kkConf
protected static java.lang.String kkInstanceId
Constructor Detail |
---|
public AdminBaseMgr()
Method Detail |
---|
protected void init(KKAdminIf eng) throws java.lang.Exception
eng
- the Admin Engine
java.lang.Exception
protected java.lang.String getPropertyValue(java.lang.String propKey) throws KKAdminException
propKey
-
KKAdminException
protected int getRecordCount(com.konakart.bl.KKCriteria c) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
c
- the Criteria
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
protected int getSingleIntResult(com.konakart.bl.KKCriteria c) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
c
- the Criteria
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
protected org.apache.commons.configuration.Configuration getKkConfig() throws KKAdminException
KKAdminException
protected java.lang.String getKkInstanceId() throws KKAdminException
KKAdminException
public void setupWildCardRules(AdminBaseMgr.StaticData sd)
sd
- StaticDataprotected boolean isEnterprise() throws KKAdminException
KKAdminException
- if the engine config has not yet been definedpublic boolean getBooleanFromString(java.lang.String value, boolean def)
value
- the String value to parsedef
- the default result if there's a problem parsing the String
public int getIntFromString(java.lang.String value, int def)
value
- the String value to parsedef
- the default result if there's a problem parsing the String
protected AdminTaxMgrIf getAdminTaxMgr() throws java.lang.Exception
java.lang.Exception
protected AdminAddressMgrIf getAdminAddressMgr() throws java.lang.Exception
java.lang.Exception
protected AdminManufacturerMgrIf getAdminManuMgr() throws java.lang.Exception
java.lang.Exception
protected AdminCustomerMgrIf getAdminCustMgr() throws java.lang.Exception
java.lang.Exception
protected AdminConfigurationMgrIf getAdminConfigMgr() throws java.lang.Exception
java.lang.Exception
protected AdminProductMgrIf getAdminProdMgr() throws java.lang.Exception
java.lang.Exception
protected AdminPublishProductMgrIf getAdminPublishProdMgr() throws java.lang.Exception
java.lang.Exception
protected AdminPromotionMgrIf getAdminPromMgr() throws java.lang.Exception
java.lang.Exception
protected AdminModulesMgrIf getAdminModulesMgr() throws java.lang.Exception
java.lang.Exception
protected AdminTagMgrIf getAdminTagMgr() throws java.lang.Exception
java.lang.Exception
protected AdminCurrencyMgrIf getAdminCurrMgr() throws java.lang.Exception
java.lang.Exception
protected AdminSecurityMgrIf getAdminSecMgr() throws java.lang.Exception
java.lang.Exception
protected AdminCategoryMgrIf getAdminCatMgr() throws java.lang.Exception
java.lang.Exception
protected AdminEmailMgrIf getAdminEmailMgr() throws java.lang.Exception
java.lang.Exception
protected AdminOrderMgrIf getAdminOrderMgr() throws java.lang.Exception
java.lang.Exception
protected AdminPdfMgrIf getAdminPdfMgr() throws java.lang.Exception
java.lang.Exception
protected AdminMiscItemMgrIf getAdminMiscItemMgr() throws java.lang.Exception
java.lang.Exception
protected AdminLanguageMgrIf getAdminLanguageMgr() throws java.lang.Exception
java.lang.Exception
protected AdminAuditMgrIf getAdminAuditMgr() throws java.lang.Exception
java.lang.Exception
public AdminHtmlMgrIf getAdminHtmlMgr() throws java.lang.Exception
java.lang.Exception
public AdminReviewMgrIf getAdminReviewMgr() throws java.lang.Exception
java.lang.Exception
public AdminMessageMgrIf getAdminMessageMgr() throws java.lang.Exception
java.lang.Exception
public AdminValidationMgrIf getAdminValidationMgr() throws java.lang.Exception
java.lang.Exception
public AdminSolrMgrIf getAdminSolrMgr() throws java.lang.Exception
java.lang.Exception
public AdminVelocityContextMgrIf getAdminVelocityContextMgr() throws java.lang.Exception
java.lang.Exception
public AdminWishListMgrIf getAdminWishListMgr() throws java.lang.Exception
java.lang.Exception
public AdminMultiStoreMgrIf getAdminMultiStoreMgr()
public AdminStoreMgrIf getAdminStoreMgr() throws java.lang.Exception
java.lang.Exception
protected AdminCustomerTagMgrIf getAdminCustTagMgr() throws java.lang.Exception
java.lang.Exception
protected AdminRewardPointMgrIf getRewardPointMgr() throws java.lang.Exception
java.lang.Exception
protected AdminSearchRuleMgrIf getAdminSearchRuleMgr() throws java.lang.Exception
java.lang.Exception
protected AdminBillingMgrIf getAdminBillingMgr() throws java.lang.Exception
java.lang.Exception
protected AdminBookableProductMgrIf getAdminBookableProductMgr() throws java.lang.Exception
java.lang.Exception
protected AdminProdAttrMgrIf getAdminProdAttrMgr() throws java.lang.Exception
java.lang.Exception
protected com.konakart.mqif.MqMgrIf getMqMgr() throws java.lang.Exception
java.lang.Exception
protected static void addInsertAttr(org.apache.torque.util.Criteria c, java.lang.String attrName, int value)
c
- attrName
- value
- public java.lang.String removeCData(java.lang.String stringIn)
stringIn
-
protected static void addInsertAttr(org.apache.torque.util.Criteria c, java.lang.String attrName, java.lang.Object value)
c
- attrName
- value
- protected void checkRequired(java.lang.Object param, java.lang.String paramType, java.lang.String paramName) throws KKAdminException
param
- paramType
- paramName
-
KKAdminException
protected void checkIntIsSet(int param, java.lang.String paramType, java.lang.String paramName) throws KKAdminException
param
- paramType
- paramName
-
KKAdminException
public void setWildCardBefore(AdminBaseMgr.StaticData sd) throws java.lang.Exception
sd
- StaticData
java.lang.Exception
protected boolean isConfigSet(java.lang.String configKey, boolean defaultValue) throws org.apache.torque.TorqueException, KKAdminException, com.workingdogs.village.DataSetException, java.lang.Exception
configKey
- the configuration keydefaultValue
- the default value to use if the configuration key isn't found
java.lang.Exception
com.workingdogs.village.DataSetException
KKAdminException
org.apache.torque.TorqueException
public void setWildCardAfter(AdminBaseMgr.StaticData sd) throws java.lang.Exception
sd
- StaticData
java.lang.Exception
public java.lang.String getPreSearchText()
public java.lang.String getPostSearchText()
public KKAdminIf getAdminEng()
public void setAdminEng(KKAdminIf adminEng)
adminEng
- The adminEng to set.protected int getMode() throws KKAdminException
KKAdminException
protected java.lang.String getModeString()
protected boolean isMultiStoreMode() throws KKAdminException
KKAdminException
protected boolean isMultiStoreSingleDBMode() throws KKAdminException
KKAdminException
protected boolean isMultiStoreSingleDBCSMode() throws KKAdminException
KKAdminException
protected boolean isMultiStoreSingleDBNonCSMode() throws KKAdminException
KKAdminException
protected java.lang.String getStoreId() throws KKAdminException
KKAdminException
protected com.konakart.bl.KKCriteria getNewCriteria()
protected com.konakart.bl.KKCriteria getNewCriteria(boolean allStores)
allStores
-
protected boolean isMultiStoreShareCustomers() throws KKAdminException
KKAdminException
protected boolean isMultiStoreShareProducts() throws KKAdminException
KKAdminException
protected boolean isMultiStoreShareCategories() throws KKAdminException
com.konakart.app.KKException
KKAdminException
protected boolean isMultiStoreLanguagesShared() throws KKAdminException
KKAdminException
protected KKAdminException manageException(java.lang.Exception e)
e
-
public void refreshConfigs() throws java.lang.Exception
java.lang.Exception
protected void shutdownGracefully(java.util.concurrent.ExecutorService executor, java.io.BufferedWriter bw) throws java.io.IOException, java.lang.InterruptedException
executor
- bw
-
java.io.IOException
java.lang.InterruptedException
protected void shutdownGracefully(java.io.BufferedWriter bw) throws java.io.IOException, java.lang.InterruptedException
bw
-
java.io.IOException
java.lang.InterruptedException
protected java.lang.String timestampStr()
protected org.apache.velocity.Template getTemplate(org.apache.velocity.app.VelocityEngine ve, java.lang.String configDir, java.lang.String templateName) throws org.apache.velocity.exception.ResourceNotFoundException, org.apache.velocity.exception.ParseErrorException, KKAdminException, java.lang.Exception
ve
- configDir
- the configuration parameter that defines the root directory for the templatetemplateName
-
org.apache.velocity.exception.ResourceNotFoundException
org.apache.velocity.exception.ParseErrorException
KKAdminException
java.lang.Exception
protected java.lang.String getTemplateBase(java.lang.String configDir) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException, java.lang.Exception
If the config variable isn't available, a default value of the current directory is returned.
configDir
- the configuration parameter that defines the root directory for the template
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
java.lang.Exception
protected Xml_io_If getXml_io() throws KKAdminException
KKAdminException
- if the Xml_io class cannot be loadedprotected ExportXMLDataIf getExportXMLData() throws KKAdminException
KKAdminException
- if the ExportXMLData class cannot be loaded
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |