com.zphinx.spine.start
Class SpineConfiguration

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

public class SpineConfiguration
extends Object

SpineConfiguration maintains the properties available to configure ViewProcessors,BusinessDelegates and their associated DataAccessObjects.

These properties are defined in the spine.xml file used to configure this application and they provide inversion of control(IOC) capabilites to the spine application framework by allowing the user change, delegates,processors,proxies and dao's associated with a process call.

Version:
$1.0:

Copyright ©Zphinx Software Solutions

Author:
David Ladapo

Field Summary
static int CONFIG_PACKAGE_NAME
          An int used to represent a packageName
static int CONFIG_SUB_CLASS
          An int used to represent a subClass
 
Method Summary
 DelegateConfiguration get(String key)
          Gets the DelegateConfiguration object identified by this key
 String getBuilder(String key, String delegateName)
          Gets the builder instance in use by this configuration
 String getDAOClass(String key, String delegateName)
          Gets the DAO class of the key associated the delegateName
 int getDAOType(String key, String delegateName)
          Gets the type of the LabelIntBean associated the delegateName
 String[] getDelegateString(String s, int j)
          Gets the string array which denotes the full name of the sub class of the delegates used by this configuration.
static SpineConfiguration getInstance(int i)
          Gets the only instance of this object
 ManagedDaoBean[] getManagedBean(String key, String delegateName)
          Gets the ManagedDaoBean[] associated with the delegateName
 ProxyConfig getProxyConfiguration()
          Gets the ProxyConfig Object
 void put(String key, DelegateConfiguration delegateConfig)
          Add a DelegateConfiguration object to this collection
 void putAll(Map m)
          Copies the contents of map m to this object
 void setProxyConfiguration(ProxyConfig pConfig)
          Sets the ProxyConfig Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_PACKAGE_NAME

public static final int CONFIG_PACKAGE_NAME
An int used to represent a packageName

See Also:
Constant Field Values

CONFIG_SUB_CLASS

public static final int CONFIG_SUB_CLASS
An int used to represent a subClass

See Also:
Constant Field Values
Method Detail

putAll

public void putAll(Map m)
Copies the contents of map m to this object

Parameters:
m - The map to copy into this map

getDelegateString

public String[] getDelegateString(String s,
                                  int j)
Gets the string array which denotes the full name of the sub class of the delegates used by this configuration.

Parameters:
s - The identifier for the DelegateConfiguration
j - An int representing the kind of strings to get from the DelegateBean
Returns:
The array of Strings which denotes the ids of the delegates contained in this DelegateConfiguration

getDAOClass

public String getDAOClass(String key,
                          String delegateName)
Gets the DAO class of the key associated the delegateName

Parameters:
key - The identifier for the DelegateConfiguration
delegateName - The name identifier of the Delegate sub class
Returns:
The name of the DAO class

getManagedBean

public ManagedDaoBean[] getManagedBean(String key,
                                       String delegateName)
Gets the ManagedDaoBean[] associated with the delegateName

Parameters:
key - The identifier for the DelegateConfiguration
delegateName - The name identifier of the Delegate sub class
Returns:
The LabelIntBean associated with this delegateName

getDAOType

public int getDAOType(String key,
                      String delegateName)
Gets the type of the LabelIntBean associated the delegateName

Parameters:
key - The identifier for the DelegateConfiguration
delegateName - The name identifier of the Delegate sub class
Returns:
The type of the DataAccessObject to create

get

public DelegateConfiguration get(String key)
Gets the DelegateConfiguration object identified by this key

Parameters:
key - The key which identifies the DelegateConfiguration
Returns:
The DelegateConfiguration object associated with this key

put

public void put(String key,
                DelegateConfiguration delegateConfig)
Add a DelegateConfiguration object to this collection

Parameters:
key - The key which identifies this object
delegateConfig - DelegateConfiguration object to register with this System

getInstance

public static SpineConfiguration getInstance(int i)
Gets the only instance of this object

Parameters:
i - An int representing the size of the Map contained in this object, set to zero to create a non specified size.
Returns:
An instance of this object

getBuilder

public String getBuilder(String key,
                         String delegateName)
Gets the builder instance in use by this configuration

Parameters:
key - The key to the processor class that owns this configuration
delegateName - The name of the delegate containing the builder instance.
Returns:
The name of the builder in use by this system

getProxyConfiguration

public ProxyConfig getProxyConfiguration()
Gets the ProxyConfig Object

Returns:
the ProxyConfig Object

setProxyConfiguration

public void setProxyConfiguration(ProxyConfig pConfig)
Sets the ProxyConfig Object

Parameters:
pConfig - the ProxyConfig Object to set