com.zphinx.spine.start
Class ApplicationConfigurator

java.lang.Object
  extended by com.zphinx.spine.start.ApplicationConfigurator

public class ApplicationConfigurator
extends Object

ApplicationConfigurator is used by this application to run initializers at configuration time.It will use a map usually obtained from the spine-init.xml file to initialize the framework.

Client developers can add a plugin via the initialization file, which must have a concrete implementation that can be used to provide application functionality.This plugin is avialable throughout the duration of the application and can by queried by the PluginServiceLocator.getPlugin(String) or PluginServiceLocator.getPlugins() method of this object.

Version:
$1.0

Copyright ©Zphinx Software Solutions

Author:
David Ladapo

Field Summary
static String CONFIG_DATASOURCE
          The key used to store the datasource Object
static String CONFIG_FILE
          The key used to store the path to the configuration file
static String LOG_FILE
          The key used to store the path to the logfile
static String ROLE_CONFIG_FILE
          The key used to store the path to the role configuration file
static String WATCH_TIME
          The key used to store the watchTime value
 
Method Summary
 void configure(Map map)
          Configures the application by running all initialization objects
 void configure(Map map, DataSource dataSource)
          Configures the application and initializes the datasource objects
 void configure(String fileName, DataSource dataSource)
          Configures the application using the xml path at the stated location and initializes the datasource objects
static ApplicationConfigurator getInstance()
          Gets the static instance of this object
 void setDataSource(DataSource dataSource)
          Sets the dataSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_DATASOURCE

public static final String CONFIG_DATASOURCE
The key used to store the datasource Object

See Also:
Constant Field Values

WATCH_TIME

public static final String WATCH_TIME
The key used to store the watchTime value

See Also:
Constant Field Values

CONFIG_FILE

public static final String CONFIG_FILE
The key used to store the path to the configuration file

See Also:
Constant Field Values

ROLE_CONFIG_FILE

public static final String ROLE_CONFIG_FILE
The key used to store the path to the role configuration file

See Also:
Constant Field Values

LOG_FILE

public static final String LOG_FILE
The key used to store the path to the logfile

See Also:
Constant Field Values
Method Detail

configure

public void configure(Map map)
Configures the application by running all initialization objects

Parameters:
map - The map containing the configuration parameters, the keys in this map are listed above as constants

configure

public void configure(Map map,
                      DataSource dataSource)
Configures the application and initializes the datasource objects

Parameters:
map - The map containing the configuration parameters, the keys in this map are listed above as constants
dataSource - the dataSource to set

configure

public void configure(String fileName,
                      DataSource dataSource)
Configures the application using the xml path at the stated location and initializes the datasource objects

Parameters:
fileName - The full path to the xml file containing the configuration parameters, the keys in this file are listed above as constants except where the key value is a node list
dataSource - the dataSource to set

getInstance

public static ApplicationConfigurator getInstance()
Gets the static instance of this object

Returns:
the static instance of this object

setDataSource

public void setDataSource(DataSource dataSource)
Sets the dataSource

Parameters:
dataSource - the dataSource to set