public class AdminModulesMgr extends AdminBaseMgr implements AdminModulesMgrIf
Modifier and Type | Class and Description |
---|---|
protected class |
AdminModulesMgr.StaticData
Used to store the static data of this manager
|
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
fetchModulesMutex |
protected static org.apache.commons.logging.Log |
log |
protected static java.util.SortedMap<java.lang.String,java.lang.Class<?>> |
moduleClassHash
Hash Map that contains the loaded module classes
|
protected static java.lang.String |
mutex |
protected static java.util.Map<java.lang.String,AdminModulesMgr.StaticData> |
staticDataHM
Hash Map that contains the static data
|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, debugStackTraceExclusions, kkAdminPropsFilePath, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
Constructor and Description |
---|
AdminModulesMgr(KKAdminIf eng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
com.konakart.app.NameValue[] |
callPaymentModule(java.lang.String moduleClassName,
com.konakart.app.PaymentOptions options)
This method is used to call a payment module from the Admin App.
|
void |
fetchModules()
Initialise the modules - regardless of the setting of initDone
|
private java.lang.Class<?> |
getClassByName(java.lang.String moduleName) |
protected ModuleInterface |
getModuleInstanceByName(java.lang.String moduleName)
Called to instantiate a module.
|
KKModule[] |
getModules(int moduleType)
Returns an array of Module objects for the module type specified
|
int |
getNumOrderTotalModules()
Returns the number of Order Total modules that can be set up
|
int |
getNumOtherModules()
Returns the number of Other modules that can be set up
|
int |
getNumPaymentModules()
Returns the number of payment modules that can be set up
|
int |
getNumShippingModules()
Returns the number of shipping modules that can be set up
|
OrderTotalModule[] |
getOrderTotalModules()
Returns an array of Order Total Modules
|
OtherModule[] |
getOtherModules()
Returns an array of Other Modules
|
protected AdminPaymentIf |
getPaymentModuleForName(java.lang.String moduleClassName)
Called to instantiate a payment module.
|
PaymentModule[] |
getPaymentModules()
Returns an array of payment modules
|
ShippingModuleInterface |
getShippingModuleByCode(java.lang.String code)
Get a ShippingModuleInterface with the specified code
|
ShippingModule[] |
getShippingModules()
Returns an array of Shipping Modules
|
private AdminModulesMgr.StaticData |
getStaticDataForStore() |
void |
init()
Initialise the modules - if not already initialised
|
private boolean |
isModuleInstalled(ModuleInterface modInstance,
java.lang.String[] keys) |
protected ModuleInterface[] |
loadModules(java.lang.String classesStr,
int moduleType)
Load up the modules identified in the classesStr.
|
void |
refreshConfigs()
Refresh the configuration of the Admin Currency Manager
|
void |
setNumOrderTotalModules(int numOrderTotalModules)
Set the number of modules that can be set up
|
void |
setNumOtherModules(int numOtherModules)
Set the number of Other modules that can be set up
|
void |
setNumPaymentModules(int numberPaymentModules)
Set the number of modules that can be set up
|
void |
setNumShippingModules(int numShippingModules)
Set the number of modules that can be set up
|
void |
setOrderTotalModules(OrderTotalModule[] orderTotalModules)
*Sets an array of Order Total modules
|
void |
setOtherModules(OtherModule[] otherModules)
Sets an array of Other modules
|
void |
setPaymentModules(PaymentModule[] paymentModules)
Sets an array of payment modules
|
void |
setShippingModules(ShippingModule[] shippingModules)
Sets an array of Shipping modules
|
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, removeCData, sendMQMessages, setAdminEng, setDebugStackTraceExclusions, setKkAdminPropsFilePath, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr, updateStaticVariablesNow
protected static org.apache.commons.logging.Log log
protected static java.lang.String mutex
protected static java.lang.String fetchModulesMutex
protected static java.util.Map<java.lang.String,AdminModulesMgr.StaticData> staticDataHM
protected static java.util.SortedMap<java.lang.String,java.lang.Class<?>> moduleClassHash
public AdminModulesMgr(KKAdminIf eng) throws java.lang.Exception
eng
- the engjava.lang.Exception
- an unexpected exceptionpublic void init() throws KKAdminException
init
in interface AdminModulesMgrIf
KKAdminException
- unexpected exception in the KonaKart Admin Enginepublic void fetchModules() throws KKAdminException
fetchModules
in interface AdminModulesMgrIf
KKAdminException
- unexpected exception in the KonaKart Admin Engineprotected ModuleInterface[] loadModules(java.lang.String classesStr, int moduleType) throws KKAdminException
classesStr
- the classesStrmoduleType
- the type of moduleKKAdminException
- unexpected exception in the KonaKart Admin Engineprivate boolean isModuleInstalled(ModuleInterface modInstance, java.lang.String[] keys) throws KKAdminException
KKAdminException
protected ModuleInterface getModuleInstanceByName(java.lang.String moduleName) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException, com.konakart.app.KKException
moduleName
- the moduleNamejava.lang.IllegalAccessException
- an unexpected IllegalAccessException exceptionjava.lang.InstantiationException
- an unexpected InstantiationException exceptionjava.lang.ClassNotFoundException
- an unexpected ClassNotFoundException exceptionjava.lang.reflect.InvocationTargetException
- an unexpected InvocationTargetException exceptionjava.lang.IllegalArgumentException
- an unexpected IllegalArgumentException exceptioncom.konakart.app.KKException
- an unexpected problem instantiating the module instanceprivate java.lang.Class<?> getClassByName(java.lang.String moduleName) throws java.lang.ClassNotFoundException, java.lang.LinkageError, java.lang.ExceptionInInitializerError, com.konakart.app.KKException
java.lang.ClassNotFoundException
java.lang.LinkageError
java.lang.ExceptionInInitializerError
com.konakart.app.KKException
public KKModule[] getModules(int moduleType) throws com.konakart.app.KKException, KKAdminException
getModules
in interface AdminModulesMgrIf
moduleType
- the module typecom.konakart.app.KKException
- an unexpected KKException exceptionKKAdminException
- unexpected exception in the KonaKart Admin Enginepublic ShippingModuleInterface getShippingModuleByCode(java.lang.String code)
getShippingModuleByCode
in interface AdminModulesMgrIf
code
- the code for the Shipping Modulepublic com.konakart.app.NameValue[] callPaymentModule(java.lang.String moduleClassName, com.konakart.app.PaymentOptions options) throws java.lang.Exception
AdminModulesMgrIf
com.konakartadmin.modules.AdminPaymentIf
interface, is
instantiated and the execute
method is called.callPaymentModule
in interface AdminModulesMgrIf
moduleClassName
- The full class name such as
com.konakartadmin.modules.payment.authorizenet.AdminPayment
options
- An object containing all of the parameters required for the transactionjava.lang.Exception
- an unexpected exceptionprotected AdminPaymentIf getPaymentModuleForName(java.lang.String moduleClassName) throws java.lang.IllegalArgumentException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
moduleClassName
- the moduleClassNamejava.lang.IllegalArgumentException
- an unexpected IllegalArgumentException exceptionjava.lang.InstantiationException
- an unexpected InstantiationException exceptionjava.lang.IllegalAccessException
- an unexpected IllegalAccessException exceptionjava.lang.reflect.InvocationTargetException
- an unexpected InvocationTargetException exceptionjava.lang.ClassNotFoundException
- an unexpected ClassNotFoundException exceptionprivate AdminModulesMgr.StaticData getStaticDataForStore()
public int getNumOrderTotalModules()
AdminModulesMgrIf
getNumOrderTotalModules
in interface AdminModulesMgrIf
public int getNumPaymentModules()
AdminModulesMgrIf
getNumPaymentModules
in interface AdminModulesMgrIf
public int getNumShippingModules()
AdminModulesMgrIf
getNumShippingModules
in interface AdminModulesMgrIf
public int getNumOtherModules()
AdminModulesMgrIf
getNumOtherModules
in interface AdminModulesMgrIf
public OrderTotalModule[] getOrderTotalModules()
AdminModulesMgrIf
getOrderTotalModules
in interface AdminModulesMgrIf
public OtherModule[] getOtherModules()
AdminModulesMgrIf
getOtherModules
in interface AdminModulesMgrIf
public PaymentModule[] getPaymentModules()
AdminModulesMgrIf
getPaymentModules
in interface AdminModulesMgrIf
public ShippingModule[] getShippingModules()
AdminModulesMgrIf
getShippingModules
in interface AdminModulesMgrIf
public void setNumOrderTotalModules(int numOrderTotalModules)
AdminModulesMgrIf
setNumOrderTotalModules
in interface AdminModulesMgrIf
numOrderTotalModules
- the numOrderTotalModules to setpublic void setNumPaymentModules(int numberPaymentModules)
AdminModulesMgrIf
setNumPaymentModules
in interface AdminModulesMgrIf
numberPaymentModules
- set the number of modules that can be set uppublic void setNumShippingModules(int numShippingModules)
AdminModulesMgrIf
setNumShippingModules
in interface AdminModulesMgrIf
numShippingModules
- the numShippingModules to setpublic void setNumOtherModules(int numOtherModules)
AdminModulesMgrIf
setNumOtherModules
in interface AdminModulesMgrIf
numOtherModules
- the numOtherModulespublic void setOrderTotalModules(OrderTotalModule[] orderTotalModules)
AdminModulesMgrIf
setOrderTotalModules
in interface AdminModulesMgrIf
orderTotalModules
- the orderTotalModules to setpublic void setPaymentModules(PaymentModule[] paymentModules)
AdminModulesMgrIf
setPaymentModules
in interface AdminModulesMgrIf
paymentModules
- the paymentModules to setpublic void setShippingModules(ShippingModule[] shippingModules)
AdminModulesMgrIf
setShippingModules
in interface AdminModulesMgrIf
shippingModules
- the shippingModules to setpublic void setOtherModules(OtherModule[] otherModules)
AdminModulesMgrIf
setOtherModules
in interface AdminModulesMgrIf
otherModules
- the otherModules to setpublic void refreshConfigs() throws java.lang.Exception
refreshConfigs
in interface AdminModulesMgrIf
refreshConfigs
in class AdminBaseMgr
java.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.