com.konakartadmin.modules
Class Module

java.lang.Object
  extended by com.konakartadmin.modules.Module
All Implemented Interfaces:
ModuleInterface
Direct Known Subclasses:
OrderTotalModule, OtherModule, PaymentModule, ShippingModule

public class Module
extends java.lang.Object
implements ModuleInterface

Implements the Module interface


Field Summary
 java.lang.String configKeyStub
          the config Key Stub for the module
 KKConfiguration[] configs
          the set of configuration values for the module
 java.lang.String implementationFileName
          the implementation filename for the module
 java.lang.String[] keys
          the configuration keys for the module
protected static org.apache.commons.logging.Log log
           
private  java.util.ResourceBundle msgs
           
 
Fields inherited from interface com.konakartadmin.modules.ModuleInterface
MODULE_SUB_TYPE_PROMOTION, MODULE_TYPE_ORDER_TOTAL, MODULE_TYPE_OTHER, MODULE_TYPE_PAYMENT, MODULE_TYPE_SHIPPING
 
Constructor Summary
Module()
           
 
Method Summary
 java.lang.String getClassPrefix()
           
 java.lang.String getConfigKeyStub()
           
 KKConfiguration[] getConfigs()
           
 java.lang.String getImplementationFileName()
           
 java.lang.String[] getKeys()
           
 java.lang.String getModuleCode()
           
 int getModuleSubType()
           
 java.lang.String getModuleTitle()
           
 int getModuleType()
           
 java.util.ResourceBundle getMsgs()
           
 void init(java.lang.String moduleName)
          Initialise the Module
 void install()
          Install the module
 boolean installed()
          Is the module currently installed?
 void remove()
          Remove the module
 void setConfigKeyStub(java.lang.String configKeyStub)
           
 void setConfigs(KKConfiguration[] theConfigs)
           
 void setImplementationFileName(java.lang.String implementationFileName)
           
 void setKeys(java.lang.String[] theKeys)
           
 void setMsgs(java.util.ResourceBundle theMsgs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.konakartadmin.modules.ModuleInterface
toString
 

Field Detail

log

protected static org.apache.commons.logging.Log log

msgs

private java.util.ResourceBundle msgs

keys

public java.lang.String[] keys
the configuration keys for the module


implementationFileName

public java.lang.String implementationFileName
the implementation filename for the module


configKeyStub

public java.lang.String configKeyStub
the config Key Stub for the module


configs

public KKConfiguration[] configs
the set of configuration values for the module

Constructor Detail

Module

public Module()
Method Detail

init

public void init(java.lang.String moduleName)
Initialise the Module

Specified by:
init in interface ModuleInterface
Parameters:
moduleName - the module's ClassName (only the final part, not including the package)

getClassPrefix

public java.lang.String getClassPrefix()
Specified by:
getClassPrefix in interface ModuleInterface
Returns:
the class prefix

getModuleType

public int getModuleType()
Specified by:
getModuleType in interface ModuleInterface
Returns:
the module type

getModuleTitle

public java.lang.String getModuleTitle()
Specified by:
getModuleTitle in interface ModuleInterface
Returns:
the module's title - the friendly name for the user

install

public void install()
             throws com.konakart.app.KKException
Description copied from interface: ModuleInterface
Install the module

Specified by:
install in interface ModuleInterface
Throws:
com.konakart.app.KKException - if something unexpected happens with the database

installed

public boolean installed()
                  throws com.konakart.app.KKException
Description copied from interface: ModuleInterface
Is the module currently installed?

Specified by:
installed in interface ModuleInterface
Returns:
true if the module is currently installed
Throws:
com.konakart.app.KKException - if something unexpected happens with the database

remove

public void remove()
            throws com.konakart.app.KKException
Description copied from interface: ModuleInterface
Remove the module

Specified by:
remove in interface ModuleInterface
Throws:
com.konakart.app.KKException - if something unexpected happens with the database

getConfigs

public KKConfiguration[] getConfigs()
Specified by:
getConfigs in interface ModuleInterface
Returns:
an array of configuration values for this payment module

setConfigs

public void setConfigs(KKConfiguration[] theConfigs)
Parameters:
theConfigs - the configs to set

setKeys

public void setKeys(java.lang.String[] theKeys)
Parameters:
theKeys - the keys to set

getKeys

public java.lang.String[] getKeys()
                           throws com.konakart.app.KKException
Specified by:
getKeys in interface ModuleInterface
Returns:
the module's keys - the configuration_key values
Throws:
com.konakart.app.KKException

getMsgs

public java.util.ResourceBundle getMsgs()
Returns:
the AuthorizeNetConstants

setMsgs

public void setMsgs(java.util.ResourceBundle theMsgs)
Parameters:
theMsgs -

getImplementationFileName

public java.lang.String getImplementationFileName()
Specified by:
getImplementationFileName in interface ModuleInterface
Returns:
the implementationFileName

setImplementationFileName

public void setImplementationFileName(java.lang.String implementationFileName)
Parameters:
implementationFileName - the implementationFileName to set

getConfigKeyStub

public java.lang.String getConfigKeyStub()
Specified by:
getConfigKeyStub in interface ModuleInterface
Returns:
the configKeyStub

setConfigKeyStub

public void setConfigKeyStub(java.lang.String configKeyStub)
Specified by:
setConfigKeyStub in interface ModuleInterface
Parameters:
configKeyStub - the configKeyStub to set

getModuleSubType

public int getModuleSubType()
Specified by:
getModuleSubType in interface ModuleInterface
Returns:
the ModuleSubType

getModuleCode

public java.lang.String getModuleCode()
Specified by:
getModuleCode in interface ModuleInterface
Returns:
the module code


Copyright © 2011 DS Data Systems UK Ltd.