|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.konakartadmin.bl.AdminBaseMgr
com.konakartadmin.bl.AdminModulesMgr
public class AdminModulesMgr
Manages the add-on-modules... currently three types: Payment, Order Total and Shipping
Nested Class Summary | |
---|---|
protected class |
AdminModulesMgr.StaticData
Used to store the static data of this manager |
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
|
protected static java.lang.String |
mutex
|
protected static java.util.Map<java.lang.String,AdminModulesMgr.StaticData> |
staticDataHM
Hash Map that contains the static data |
Fields inherited from class com.konakartadmin.bl.AdminBaseMgr |
---|
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir |
Constructor Summary | |
---|---|
AdminModulesMgr(KKAdminIf eng)
Constructor |
Method Summary | |
---|---|
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 |
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 |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
protected static java.lang.String mutex
protected static java.util.Map<java.lang.String,AdminModulesMgr.StaticData> staticDataHM
Constructor Detail |
---|
public AdminModulesMgr(KKAdminIf eng) throws java.lang.Exception
eng
-
java.lang.Exception
Method Detail |
---|
public void init() throws KKAdminException
init
in interface AdminModulesMgrIf
KKAdminException
public void fetchModules() throws KKAdminException
fetchModules
in interface AdminModulesMgrIf
KKAdminException
protected ModuleInterface[] loadModules(java.lang.String classesStr, int moduleType) throws KKAdminException
classesStr
- moduleType
- the type of module
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
moduleName
-
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.reflect.InvocationTargetException
java.lang.IllegalArgumentException
public KKModule[] getModules(int moduleType) throws com.konakart.app.KKException, KKAdminException
getModules
in interface AdminModulesMgrIf
moduleType
- the module type
com.konakart.app.KKException
KKAdminException
public ShippingModuleInterface getShippingModuleByCode(java.lang.String code)
getShippingModuleByCode
in interface AdminModulesMgrIf
code
- the code for the Shipping Module
public 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 transaction
java.lang.Exception
protected AdminPaymentIf getPaymentModuleForName(java.lang.String moduleClassName) throws java.lang.IllegalArgumentException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.ClassNotFoundException
moduleClassName
-
java.lang.IllegalArgumentException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.ClassNotFoundException
private 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
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |