com.konakartadmin.app
Class AdminEngineConfig

java.lang.Object
  extended by com.konakartadmin.app.AdminEngineConfig

public class AdminEngineConfig
extends java.lang.Object

Used to configure the KonaKart Admin engine client when it is instantiated.

Attributes required are dependent on the mode.

When creating engine clients for RMI and SOAP you can use the properties attribute to define your properties rather than referencing a properties file. The structure of the properties array is:

properties[0] = key 1
properties[1] = value 1
properties[2] = key 2
properties[3] = value 2
etc

If the properties array is non-null it will be used instead of the properties file (for the RMI and SOAP engines only). It may be useful to choose this way of constructing engine clients if you do not wish to use files to store the property definitions.


Field Summary
private  java.lang.String axisClientFileName
           
private  boolean categoriesShared
           
private  boolean customersShared
           
private  java.lang.String engineId
          This is not designed to be set by developers.
private  int mode
          Mode is SingleStore, MultiStore (Multi-DB) or MultiStore (Single-DB)
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
private  boolean productsShared
           
private  java.lang.String[] properties
           
private  java.lang.String propertiesFileName
           
private  java.lang.String storeId
           
 
Constructor Summary
AdminEngineConfig()
           
 
Method Summary
 java.lang.String getAxisClientFileName()
           
 java.lang.String getEngineId()
           
 int getMode()
          Used to configure the engine at startup.
 java.lang.String[] getProperties()
           
 java.lang.String getPropertiesFileName()
          The name of the properties file 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 isCategoriesShared()
          Only relevant when in MODE_MULTI_STORE_SHARED_DB mode and products are shared.
 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 setAxisClientFileName(java.lang.String axisClientFileName)
          The name of the konakartadmin AXIS client properties file name - only relevant when web services are used between client and konakartadmin servers.
 void setCategoriesShared(boolean categoriesShared)
          Only relevant when in MODE_MULTI_STORE_SHARED_DB mode and products are shared.
 void setCustomersShared(boolean customersShared)
          Only relevant when in MODE_MULTI_STORE_SHARED_DB mode.
 void setEngineId(java.lang.String engineId)
           
 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 setProperties(java.lang.String[] properties)
           
 void setPropertiesFileName(java.lang.String propertiesFileName)
          The name of the properties file 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
clone, 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

storeId

private java.lang.String storeId

mode

private int mode
Mode is SingleStore, MultiStore (Multi-DB) or MultiStore (Single-DB)


propertiesFileName

private java.lang.String propertiesFileName

axisClientFileName

private java.lang.String axisClientFileName

customersShared

private boolean customersShared

productsShared

private boolean productsShared

categoriesShared

private boolean categoriesShared

properties

private java.lang.String[] properties

engineId

private java.lang.String engineId
This is not designed to be set by developers. Consider it to be read only

Constructor Detail

AdminEngineConfig

public AdminEngineConfig()
Method Detail

toString

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

getStoreId

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

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.

Parameters:
storeId - The storeId to set.

getMode

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

Returns:
Returns the mode.

setMode

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

Parameters:
mode - The mode to set.

getPropertiesFileName

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

Returns:
Returns the propertiesFileName.

setPropertiesFileName

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

Parameters:
propertiesFileName - The propertiesFileName to set.

getAxisClientFileName

public java.lang.String getAxisClientFileName()
Returns:
the name of the konakartadmin AXIS client properties file name

setAxisClientFileName

public void setAxisClientFileName(java.lang.String axisClientFileName)
The name of the konakartadmin AXIS client properties file name - only relevant when web services are used between client and konakartadmin servers.

Parameters:
axisClientFileName -

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.

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.

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.

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.

Parameters:
productsShared - the productsShared to set

isCategoriesShared

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

Returns:
the categoriesShared

setCategoriesShared

public void setCategoriesShared(boolean categoriesShared)
Only relevant when in MODE_MULTI_STORE_SHARED_DB mode and products are shared. If set to true, categories can be shared between all stores.

Parameters:
categoriesShared - the categoriesShared to set

getEngineId

public java.lang.String getEngineId()
Returns:
Returns the engineId.

setEngineId

public void setEngineId(java.lang.String engineId)
Parameters:
engineId - The engineId to set.

getProperties

public java.lang.String[] getProperties()
Returns:
the properties. For RMI and SOAP, if set the properties are used to configure the engine instead of the values read from the properties file. The structure of the properties array is:

properties[0] = key 1
properties[1] = value 1
properties[2] = key 2
properties[3] = value 2
etc


setProperties

public void setProperties(java.lang.String[] properties)
Parameters:
properties - the properties to set


Copyright © 2011 DS Data Systems UK Ltd.