com.konakartadmin.ws
Class KKAdminEngineMgr

java.lang.Object
  extended by com.konakartadmin.ws.KKAdminEngineMgr

public class KKAdminEngineMgr
extends java.lang.Object

For creating KonaKart Admin engines


Field Summary
static java.lang.String DEFAULT_KKADMIN_ENGINE_CLASS_NAME
          The default Admin Engine class name
protected static org.apache.commons.logging.Log log
           
 
Constructor Summary
KKAdminEngineMgr()
           
 
Method Summary
 void checkStoreIsSupportedInMultiStoreMode(java.lang.String databasesUsed, java.lang.String storeId)
          Check whether the storeId is included in the list of databases used - in Multi Store Mode
 void checkStoreIsSupportedInSingleStoreMode(java.lang.String storeId)
          Check whether the storeId is supported in Single Store Mode
 KKAdminIf createKKAdminEngine(org.apache.commons.configuration.Configuration conf, java.lang.String enginePropertyName, java.lang.String propsFileName, AdminEngineConfig adminEngConfig)
          Creates a KKAdmin engine using configuration values in the specified properties and Admin Engine Configuration object
 KKAdminIf getKKAdminByName(AdminEngineConfig adminEngConfig)
          Create a new KKAdmin engine from a class of the specified default name.
 KKAdminIf getKKAdminByName(java.lang.String kkAdminEngineName, AdminEngineConfig adminEngConfig)
          Create a new KKAdmin engine from a class of the specified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_KKADMIN_ENGINE_CLASS_NAME

public static final java.lang.String DEFAULT_KKADMIN_ENGINE_CLASS_NAME
The default Admin Engine class name

See Also:
Constant Field Values

log

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

KKAdminEngineMgr

public KKAdminEngineMgr()
Method Detail

createKKAdminEngine

public KKAdminIf createKKAdminEngine(org.apache.commons.configuration.Configuration conf,
                                     java.lang.String enginePropertyName,
                                     java.lang.String propsFileName,
                                     AdminEngineConfig adminEngConfig)
                              throws KKAdminException
Creates a KKAdmin engine using configuration values in the specified properties and Admin Engine Configuration object

Parameters:
conf - the configuration object read from the properties file
enginePropertyName - the name of the property to look up in the Configuration to find the engine class name
propsFileName - the name of the properties file that holds the properties - used only for diagnostic purposes in exceptions
adminEngConfig - the Admin Engine configuration object
Returns:
a newly instantiated KKAdmin engine
Throws:
KKAdminException

getKKAdminByName

public KKAdminIf getKKAdminByName(java.lang.String kkAdminEngineName,
                                  AdminEngineConfig adminEngConfig)
                           throws java.lang.InstantiationException,
                                  java.lang.IllegalAccessException,
                                  java.lang.ClassNotFoundException,
                                  java.lang.IllegalArgumentException,
                                  java.lang.reflect.InvocationTargetException
Create a new KKAdmin engine from a class of the specified name. We look at the constructors in the specified class to find out if there are any constructors declared that will accept an AdminEngineConfig object. If there are, we use that constructor with the specified AdminEngineConfig object. If not, we use the default constructor.

Parameters:
kkAdminEngineName - the name of the class that implements KKAdminIf
adminEngConfig - the engine configuration object
Returns:
a newly-instantiated KKAdmin Engine
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException

checkStoreIsSupportedInMultiStoreMode

public void checkStoreIsSupportedInMultiStoreMode(java.lang.String databasesUsed,
                                                  java.lang.String storeId)
                                           throws KKAdminException
Check whether the storeId is included in the list of databases used - in Multi Store Mode

Parameters:
databasesUsed - the property value from the properties file
storeId - the storeId to check for
Throws:
KKAdminException - throws this if the storeId is not in the list of supported databases

checkStoreIsSupportedInSingleStoreMode

public void checkStoreIsSupportedInSingleStoreMode(java.lang.String storeId)
                                            throws KKAdminException
Check whether the storeId is supported in Single Store Mode

Parameters:
storeId - the storeId to check for
Throws:
KKAdminException - throws this if the storeId is not supported in Single Store Mode

getKKAdminByName

public KKAdminIf getKKAdminByName(AdminEngineConfig adminEngConfig)
                           throws java.lang.InstantiationException,
                                  java.lang.IllegalAccessException,
                                  java.lang.ClassNotFoundException,
                                  java.lang.IllegalArgumentException,
                                  java.lang.reflect.InvocationTargetException
Create a new KKAdmin engine from a class of the specified default name. We look at the constructors in the specified class to find out if there are any constructors declared that will accept an AdminEngineConfig object. If there are, we use that constructor with the specified AdminEngineConfig object. If not, we use the default constructor.

Parameters:
adminEngConfig - the engine configuration object
Returns:
a newly-instantiated KKAdmin Engine
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException


Copyright © 2011 DS Data Systems UK Ltd.