com.ibm.di.config.xml
Class Factories

java.lang.Object
  extended by com.ibm.di.config.xml.Factories
Direct Known Subclasses:
ALMappingFactory, AssemblyLineFactory, BranchingFactory, CheckpointFactory, ConnectorFactory, ContainerFactory, EventHandlerFactory, ExtPropFactory, FolderFactory, FunctionFactory, HookFactory, InstanceFactory, LibraryFactory, LoggingFactory, LoopFactory, NamespaceFactory, ParserFactory, PropertyFactory, PropertyStoreFactory, SandboxFactory, SchemaFactory, ScriptFactory, SolutionInterfaceFactory, TombstonesFactory

public class Factories
extends Object


Field Summary
static Hashtable classMap
           
static Hashtable implMap
           
static String INHERIT_TAG
           
static org.apache.log4j.Logger logger
           
static String NAME_ATTRIBUTE
           
static String NAME_TAG
           
static String PARAMETER_TAG
           
 Factories parent
           
static String USER_COMMENT_ATTRIBUTE
           
static String VALUE_ATTRIBUTE
           
 
Constructor Summary
Factories()
           
 
Method Summary
 void build(BaseConfiguration config, Element element)
          Generate XML element from configuration object
static void debug(String msg)
          General methods used by various factories
static void dump(BaseConfiguration config)
           
 void getBaseName(BaseConfiguration config, Element elem)
          This method retrives the name and inheritFrom attributes/elements and configures the base object with its name and also calls Metamergeconfig for any inherited objects.
static String getClassTag(Object config)
          Return element name used for specific class
static Factories getFactory(String tag)
          Return factory for element
static BaseConfiguration getImpl(String tag)
          Return new instance of configuration implementation
 void getInheritsFrom(BaseConfiguration config, Element elem)
           
 String getNodeText(Node node)
          Return text from a node's children
 String getNodeTextByName(Element node, String name)
          Return text from a single named node's children
 void getParameter(Element p, BaseConfiguration config)
           
 void getParameters(Element p, BaseConfiguration config)
          Add simple parameters to configuration
 Element getSingleElement(Element node, String name)
          Locate a single Element from a node's children
static boolean isDebugMode()
           
static void logmsg(String msg)
           
 void parse(BaseConfiguration config, Element element)
          Parse XML element into configuration object
 void setBaseName(BaseConfiguration config, Element elem)
           
 void setInheritsFrom(BaseConfiguration config, Element elem)
           
 void setParameter(Element p, BaseConfiguration config, Object pname)
           
 Element setParameters(Element p, BaseConfiguration config, String tag)
          Add simple parameters to configuration
 void setSingleElement(Element node, String tag, BaseConfiguration bc, String name)
           
 void setSingleElement(Element node, String tag, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static org.apache.log4j.Logger logger

classMap

public static Hashtable classMap

implMap

public static Hashtable implMap

PARAMETER_TAG

public static final String PARAMETER_TAG
See Also:
Constant Field Values

NAME_TAG

public static final String NAME_TAG
See Also:
Constant Field Values

INHERIT_TAG

public static final String INHERIT_TAG
See Also:
Constant Field Values

NAME_ATTRIBUTE

public static final String NAME_ATTRIBUTE
See Also:
Constant Field Values

VALUE_ATTRIBUTE

public static final String VALUE_ATTRIBUTE
See Also:
Constant Field Values

USER_COMMENT_ATTRIBUTE

public static final String USER_COMMENT_ATTRIBUTE
See Also:
Constant Field Values

parent

public Factories parent
Constructor Detail

Factories

public Factories()
Method Detail

getFactory

public static Factories getFactory(String tag)
                            throws Exception
Return factory for element

Throws:
Exception

getImpl

public static BaseConfiguration getImpl(String tag)
                                 throws Exception
Return new instance of configuration implementation

Throws:
Exception

getClassTag

public static String getClassTag(Object config)
Return element name used for specific class


isDebugMode

public static boolean isDebugMode()
Returns:
true if debug is enabled. Otherwise, false is returned.

parse

public void parse(BaseConfiguration config,
                  Element element)
           throws Exception
Parse XML element into configuration object

Throws:
Exception

build

public void build(BaseConfiguration config,
                  Element element)
           throws Exception
Generate XML element from configuration object

Throws:
Exception

debug

public static void debug(String msg)
General methods used by various factories


logmsg

public static void logmsg(String msg)

dump

public static void dump(BaseConfiguration config)

getBaseName

public void getBaseName(BaseConfiguration config,
                        Element elem)
                 throws Exception
This method retrives the name and inheritFrom attributes/elements and configures the base object with its name and also calls Metamergeconfig for any inherited objects.

Throws:
Exception

getInheritsFrom

public void getInheritsFrom(BaseConfiguration config,
                            Element elem)
                     throws Exception
Throws:
Exception

setBaseName

public void setBaseName(BaseConfiguration config,
                        Element elem)
                 throws Exception
Throws:
Exception

setInheritsFrom

public void setInheritsFrom(BaseConfiguration config,
                            Element elem)
                     throws Exception
Throws:
Exception

getParameters

public void getParameters(Element p,
                          BaseConfiguration config)
                   throws Exception
Add simple parameters to configuration

Throws:
Exception

getParameter

public void getParameter(Element p,
                         BaseConfiguration config)
                  throws Exception
Throws:
Exception

setParameters

public Element setParameters(Element p,
                             BaseConfiguration config,
                             String tag)
                      throws Exception
Add simple parameters to configuration

Throws:
Exception

setParameter

public void setParameter(Element p,
                         BaseConfiguration config,
                         Object pname)
                  throws Exception
Throws:
Exception

getNodeText

public String getNodeText(Node node)
                   throws Exception
Return text from a node's children

Throws:
Exception

getSingleElement

public Element getSingleElement(Element node,
                                String name)
                         throws Exception
Locate a single Element from a node's children

Throws:
Exception

getNodeTextByName

public String getNodeTextByName(Element node,
                                String name)
                         throws Exception
Return text from a single named node's children

Throws:
Exception

setSingleElement

public void setSingleElement(Element node,
                             String tag,
                             BaseConfiguration bc,
                             String name)
                      throws Exception
Throws:
Exception

setSingleElement

public void setSingleElement(Element node,
                             String tag,
                             String value)
                      throws Exception
Throws:
Exception