com.konakart.app
Class EngineConfig

java.lang.Object
  extended by com.konakart.app.EngineConfig
All Implemented Interfaces:
EngineConfigIf, java.lang.Cloneable

public class EngineConfig
extends java.lang.Object
implements java.lang.Cloneable, EngineConfigIf

Used to configure the KonaKart engine when instantiated


Field Summary
static int MODE_MULTI_STORE_NON_SHARED_DB
          Constant for mode
static int MODE_MULTI_STORE_SHARED_DB
          Constant for mode
static int MODE_SINGLE_STORE
          Constant for mode
 
Constructor Summary
EngineConfig()
           
 
Method Summary
 EngineConfig clone()
          Clones the current object
 java.lang.String getAppPropertiesFileName()
          The name of the properties file for the KonaKart application engine which must be on the classpath.
 java.lang.String getEngineId()
          This is not designed to be set by developers.
 int getMode()
          Used to configure the engine at startup.
 java.lang.String getPropertiesFileName()
          The name of the properties file for the KonaKart engine which must be on the classpath.
 java.lang.String getStoreId()
          Used in multi-store mode to configure the engine to use the correct store.
 boolean isCustomersShared()
          Only relevant when in MODE_MULTI_STORE_SHARED_DB mode.
 boolean isProductsShared()
          Only relevant when in MODE_MULTI_STORE_SHARED_DB mode.
 void setAppPropertiesFileName(java.lang.String appPropertiesFileName)
          The name of the properties file for the KonaKart application engine which must be on the classpath.
 void setCustomersShared(boolean customersShared)
          Only relevant when in MODE_MULTI_STORE_SHARED_DB mode.
 void setEngineId(java.lang.String engineId)
          This is not designed to be set by developers.
 void setMode(int mode)
          Used to configure the engine at startup.
 void setProductsShared(boolean productsShared)
          Only relevant when in MODE_MULTI_STORE_SHARED_DB mode.
 void setPropertiesFileName(java.lang.String propertiesFileName)
          The name of the properties file for the KonaKart engine which must be on the classpath.
 void setStoreId(java.lang.String storeId)
          Used in multi-store mode to configure the engine to use the correct store.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MODE_SINGLE_STORE

public static final int MODE_SINGLE_STORE
Constant for mode

See Also:
Constant Field Values

MODE_MULTI_STORE_NON_SHARED_DB

public static final int MODE_MULTI_STORE_NON_SHARED_DB
Constant for mode

See Also:
Constant Field Values

MODE_MULTI_STORE_SHARED_DB

public static final int MODE_MULTI_STORE_SHARED_DB
Constant for mode

See Also:
Constant Field Values
Constructor Detail

EngineConfig

public EngineConfig()
Method Detail

clone

public EngineConfig clone()
                   throws java.lang.CloneNotSupportedException
Clones the current object

Overrides:
clone in class java.lang.Object
Returns:
Returns a clone of the current object
Throws:
java.lang.CloneNotSupportedException

getStoreId

public java.lang.String getStoreId()
Used in multi-store mode to configure the engine to use the correct store.

Specified by:
getStoreId in interface EngineConfigIf
Returns:
Returns the storeId.

setStoreId

public void setStoreId(java.lang.String storeId)
Used in multi-store mode to configure the engine to use the correct store.

Specified by:
setStoreId in interface EngineConfigIf
Parameters:
storeId - The storeId to set.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Returns a string containing the attributes of the EngineConfig object.

getMode

public int getMode()
Used to configure the engine at startup. Valid values are:

Specified by:
getMode in interface EngineConfigIf
Returns:
Returns the mode.

setMode

public void setMode(int mode)
Used to configure the engine at startup. Valid values are:

Specified by:
setMode in interface EngineConfigIf
Parameters:
mode - The mode to set.

getPropertiesFileName

public java.lang.String getPropertiesFileName()
The name of the properties file for the KonaKart engine which must be on the classpath.

Specified by:
getPropertiesFileName in interface EngineConfigIf
Returns:
Returns the propertiesFileName.

setPropertiesFileName

public void setPropertiesFileName(java.lang.String propertiesFileName)
The name of the properties file for the KonaKart engine which must be on the classpath.

Specified by:
setPropertiesFileName in interface EngineConfigIf
Parameters:
propertiesFileName - The propertiesFileName to set.

getAppPropertiesFileName

public java.lang.String getAppPropertiesFileName()
The name of the properties file for the KonaKart application engine which must be on the classpath.

Specified by:
getAppPropertiesFileName in interface EngineConfigIf
Returns:
Returns the appPropertiesFileName.

setAppPropertiesFileName

public void setAppPropertiesFileName(java.lang.String appPropertiesFileName)
The name of the properties file for the KonaKart application engine which must be on the classpath.

Specified by:
setAppPropertiesFileName in interface EngineConfigIf
Parameters:
appPropertiesFileName - The appPropertiesFileName to set.

isCustomersShared

public boolean isCustomersShared()
Only relevant when in MODE_MULTI_STORE_SHARED_DB mode. If set to true, customers are shared between all stores. If we aren't in MODE_MULTI_STORE_SHARED_DB mode, it always returns false.

Specified by:
isCustomersShared in interface EngineConfigIf
Returns:
Returns true or false

setCustomersShared

public void setCustomersShared(boolean customersShared)
Only relevant when in MODE_MULTI_STORE_SHARED_DB mode. If set to true, customers are shared between all stores.

Specified by:
setCustomersShared in interface EngineConfigIf
Parameters:
customersShared - set to true or false

isProductsShared

public boolean isProductsShared()
Only relevant when in MODE_MULTI_STORE_SHARED_DB mode. If set to true, products can be shared between all stores.

Specified by:
isProductsShared in interface EngineConfigIf
Returns:
the productsShared

setProductsShared

public void setProductsShared(boolean productsShared)
Only relevant when in MODE_MULTI_STORE_SHARED_DB mode. If set to true, products can be shared between all stores.

Specified by:
setProductsShared in interface EngineConfigIf
Parameters:
productsShared - the productsShared to set

getEngineId

public java.lang.String getEngineId()
This is not designed to be set by developers. Consider it to be read only

Specified by:
getEngineId in interface EngineConfigIf
Returns:
the engineId

setEngineId

public void setEngineId(java.lang.String engineId)
This is not designed to be set by developers. Consider it to be read only

Specified by:
setEngineId in interface EngineConfigIf
Parameters:
engineId - the engineId to set


Copyright © 2011 DS Data Systems UK Ltd.