chemaxon.alchemist.configbuilder
Class ConfigElementFactory

java.lang.Object
  extended by chemaxon.alchemist.configbuilder.ConfigElementFactory

public class ConfigElementFactory
extends java.lang.Object

This class is responsible for creating config item objects defined by configuration xml, and bundle file

Author:
Istvan Cseh

Constructor Summary
ConfigElementFactory(chemaxon.alchemist.configbuilder.configuration.marshalling.Configuration configuration)
          Creates a ConfigElementFactory based on Configuration
ConfigElementFactory(java.lang.String configPath)
          Creates a ConfigElementFactory based on configPath
 
Method Summary
 ConfigElement create(java.lang.Class configElementClass)
          Creates an instance of configElementClass class.
 ConfigElement create(chemaxon.alchemist.configbuilder.configuration.marshalling.Element xmlElement)
          Creates ConfigElement instance based on bundle informations
 ConfigElement create(java.lang.String configElementId)
          Creates an instace of class extending ConfigElement and identified by configElementId in configuration XML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigElementFactory

public ConfigElementFactory(java.lang.String configPath)
Creates a ConfigElementFactory based on configPath

Parameters:
configPath - is the path to configuration xml file of elements

ConfigElementFactory

public ConfigElementFactory(chemaxon.alchemist.configbuilder.configuration.marshalling.Configuration configuration)
                     throws java.lang.IllegalArgumentException
Creates a ConfigElementFactory based on Configuration

Parameters:
configuration - is the configuration of elements
Throws:
java.lang.IllegalArgumentException
Method Detail

create

public ConfigElement create(java.lang.String configElementId)
                     throws java.lang.IllegalArgumentException
Creates an instace of class extending ConfigElement and identified by configElementId in configuration XML

Parameters:
configElementId - is the id of config element
Returns:
the ConfigElement instance
Throws:
java.lang.IllegalArgumentException

create

public ConfigElement create(java.lang.Class configElementClass)
                     throws java.lang.IllegalArgumentException
Creates an instance of configElementClass class.
Note: BasicConfigElement can not be created this way, since it can be represented in many ways

Parameters:
configElementClass - is the class of the ConfigElement inheritance to be created
Returns:
a new configElementClass class instance
Throws:
java.lang.IllegalArgumentException

create

public ConfigElement create(chemaxon.alchemist.configbuilder.configuration.marshalling.Element xmlElement)
                     throws java.lang.IllegalArgumentException
Creates ConfigElement instance based on bundle informations

Parameters:
xmlElement - is the xml data that new ConfigElement is based on
Returns:
the ConfigElement instance
Throws:
java.lang.IllegalArgumentException