com.ibm.di.config.xml
Class AssemblyLineFactory

java.lang.Object
  extended by com.ibm.di.config.xml.Factories
      extended by com.ibm.di.config.xml.AssemblyLineFactory

public class AssemblyLineFactory
extends Factories

This class implements the reading and writing of a AssemblyLineConfig in XML format.


Field Summary
static java.lang.String ASSEMBLYLINE_TAG
          XML tag - "AssemblyLine"
static java.lang.String CALLPARAM_TAG
          XML tag - "CallParam"
static java.lang.String CALLRETURN_TAG
          IO setting - "CallReturn"
static java.lang.String CONNECTORS_TAG
          XML tag - "Connectors"
static java.lang.String EPILOG_TAG
          XML tag - "Epilog"
static java.lang.String EPILOG2_TAG
          XML tag - "Epilog2"
static java.lang.String INIT_PARAMS_TAG
          XML tag - "InitParams"
static java.lang.String IOSETTINGS_DEFAULT
          IO setting - "DefaultValue"
static java.lang.String IOSETTINGS_INPUT
          IO setting - "InputParameters"
static java.lang.String IOSETTINGS_NULLBEHAVIOR
          IO setting - "NullBehavior"
static java.lang.String IOSETTINGS_NULLBEHAVIORVALUE
          IO setting - "NullBehaviorValue"
static java.lang.String IOSETTINGS_OUTPUT
          IO setting - "OutputParameters"
static java.lang.String IOSETTINGS_REQUIRED
          IO setting - "Syntax"
static java.lang.String IOSETTINGS_SYNTAX
          IO setting - "Syntax"
static java.lang.String IOSETTINGS_TAG
          XML tag - "IOSettings"
static java.lang.String IOSETTINGS_TARGETATTR
          IO setting - "TargetAttribute"
static java.lang.String LOG_ENABLED_TAG
          XML tag - "LogEnabled"
static java.lang.String LOG_SETTINGS_TAG
          IO setting - "Logging"
static java.lang.String ONFAILURE_TAG
          XML tag - "OnFailure"
static java.lang.String ONSUCCESS_TAG
          XML tag - "OnSuccess"
static java.lang.String OPERATION_PUBLIC_TAG
          XML tag - "Public"
static java.lang.String OPERATION_TAG
          XML tag - "Operation"
static java.lang.String OPERATIONS_TAG
          XML tag - "Operations"
static java.lang.String OPTIONS_TAG
          XML tag - "ThreadOptions"
static java.lang.String PROLOG_TAG
          XML tag - "Prolog"
static java.lang.String PROLOGINIT_TAG
          XML tag - "PrologInit"
static java.lang.String SETTINGS_TAG
          XML tag - "Settings"
static java.lang.String SHUTDOWN_TAG
          XML tag - "Shutdown"
static java.lang.String STARTCYCLE_TAG
          XML tag - "StartCycle"
 
Fields inherited from class com.ibm.di.config.xml.Factories
classMap, implMap, INHERIT_TAG, logger, MOD_TS_TAG, NAME_ATTRIBUTE, NAME_TAG, NULLBEHAVIOR, NULLBEHAVIORVALUE, NULLDEFINITION, NULLDEFINITIONVALUE, PARAMETER_TAG, parent, USER_COMMENT_ATTRIBUTE, VALUE_ATTRIBUTE
 
Constructor Summary
AssemblyLineFactory()
           
 
Method Summary
 void build(BaseConfiguration config, org.w3c.dom.Element elem)
          Generate a XML element from a configuration object.
 void getAttributeMaps(org.w3c.dom.Element elem, AssemblyLineConfig config)
          This method parses all AttributeMap elements in the XML file into configuration objects.
 void getCallParam(CallConfig config, org.w3c.dom.Element elem)
           
 void getInitParams(org.w3c.dom.Element elem, OperationsConfig al)
          This method converts old style and reads the new style initialization parameters.
 void getOperation(org.w3c.dom.Element elem, OperationsConfig alc, java.lang.String forceName)
           
 void getOperations(org.w3c.dom.Element elem, OperationsConfig alc)
          Get operations.
 void getSchemas(org.w3c.dom.Element elem, AssemblyLineConfig config)
          This method parses all Schema elements in the XML file into configuration objects.
 void migrateCallParam(AssemblyLineConfig assemblyLine, org.w3c.dom.Element elem, boolean input)
          Reads and converts the old style call parameters to the new style.
 void parse(BaseConfiguration config, org.w3c.dom.Element elem)
          Parse a XML element into a configuration object.
 void setInitParams(org.w3c.dom.Element elem, OperationsConfig alc)
          Generates a XML element from the init params of the provided operation configuration and add the newly created element to the it to the Input and Output Attribute Map of the connector.
 void setOperations(org.w3c.dom.Element elem, OperationsConfig alc)
          Generates a XML element from the provided operation configuration and add it to the Input and Output Attribute Map of the connector.
 
Methods inherited from class com.ibm.di.config.xml.Factories
debug, dump, getBaseName, getClassTag, getFactory, getImpl, getInheritsFrom, getNodeText, getNodeTextByName, getParameter, getParameters, getSingleElement, isDebugMode, logmsg, setBaseName, setInheritsFrom, setParameter, setParameters, setSingleElement, setSingleElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASSEMBLYLINE_TAG

public static final java.lang.String ASSEMBLYLINE_TAG
XML tag - "AssemblyLine"

See Also:
Constant Field Values

CONNECTORS_TAG

public static final java.lang.String CONNECTORS_TAG
XML tag - "Connectors"

See Also:
Constant Field Values

LOG_ENABLED_TAG

public static final java.lang.String LOG_ENABLED_TAG
XML tag - "LogEnabled"

See Also:
Constant Field Values

PROLOG_TAG

public static final java.lang.String PROLOG_TAG
XML tag - "Prolog"

See Also:
Constant Field Values

PROLOGINIT_TAG

public static final java.lang.String PROLOGINIT_TAG
XML tag - "PrologInit"

See Also:
Constant Field Values

EPILOG_TAG

public static final java.lang.String EPILOG_TAG
XML tag - "Epilog"

See Also:
Constant Field Values

EPILOG2_TAG

public static final java.lang.String EPILOG2_TAG
XML tag - "Epilog2"

See Also:
Constant Field Values

SHUTDOWN_TAG

public static final java.lang.String SHUTDOWN_TAG
XML tag - "Shutdown"

See Also:
Constant Field Values

STARTCYCLE_TAG

public static final java.lang.String STARTCYCLE_TAG
XML tag - "StartCycle"

See Also:
Constant Field Values

ONSUCCESS_TAG

public static final java.lang.String ONSUCCESS_TAG
XML tag - "OnSuccess"

See Also:
Constant Field Values

ONFAILURE_TAG

public static final java.lang.String ONFAILURE_TAG
XML tag - "OnFailure"

See Also:
Constant Field Values

IOSETTINGS_TAG

public static final java.lang.String IOSETTINGS_TAG
XML tag - "IOSettings"

See Also:
Constant Field Values

SETTINGS_TAG

public static final java.lang.String SETTINGS_TAG
XML tag - "Settings"

See Also:
Constant Field Values

OPTIONS_TAG

public static final java.lang.String OPTIONS_TAG
XML tag - "ThreadOptions"

See Also:
Constant Field Values

OPERATIONS_TAG

public static final java.lang.String OPERATIONS_TAG
XML tag - "Operations"

See Also:
Constant Field Values

OPERATION_TAG

public static final java.lang.String OPERATION_TAG
XML tag - "Operation"

See Also:
Constant Field Values

OPERATION_PUBLIC_TAG

public static final java.lang.String OPERATION_PUBLIC_TAG
XML tag - "Public"

See Also:
Constant Field Values

INIT_PARAMS_TAG

public static final java.lang.String INIT_PARAMS_TAG
XML tag - "InitParams"

See Also:
Constant Field Values

CALLPARAM_TAG

public static final java.lang.String CALLPARAM_TAG
XML tag - "CallParam"

See Also:
Constant Field Values

IOSETTINGS_INPUT

public static final java.lang.String IOSETTINGS_INPUT
IO setting - "InputParameters"

See Also:
Constant Field Values

IOSETTINGS_OUTPUT

public static final java.lang.String IOSETTINGS_OUTPUT
IO setting - "OutputParameters"

See Also:
Constant Field Values

IOSETTINGS_TARGETATTR

public static final java.lang.String IOSETTINGS_TARGETATTR
IO setting - "TargetAttribute"

See Also:
Constant Field Values

IOSETTINGS_NULLBEHAVIOR

public static final java.lang.String IOSETTINGS_NULLBEHAVIOR
IO setting - "NullBehavior"

See Also:
Constant Field Values

IOSETTINGS_NULLBEHAVIORVALUE

public static final java.lang.String IOSETTINGS_NULLBEHAVIORVALUE
IO setting - "NullBehaviorValue"

See Also:
Constant Field Values

IOSETTINGS_SYNTAX

public static final java.lang.String IOSETTINGS_SYNTAX
IO setting - "Syntax"

See Also:
Constant Field Values

IOSETTINGS_DEFAULT

public static final java.lang.String IOSETTINGS_DEFAULT
IO setting - "DefaultValue"

Note: Deprecated, only for backwards compatibility

See Also:
Constant Field Values

IOSETTINGS_REQUIRED

public static final java.lang.String IOSETTINGS_REQUIRED
IO setting - "Syntax"

See Also:
Constant Field Values

LOG_SETTINGS_TAG

public static final java.lang.String LOG_SETTINGS_TAG
IO setting - "Logging"

See Also:
Constant Field Values

CALLRETURN_TAG

public static final java.lang.String CALLRETURN_TAG
IO setting - "CallReturn"

See Also:
Constant Field Values
Constructor Detail

AssemblyLineFactory

public AssemblyLineFactory()
Method Detail

parse

public void parse(BaseConfiguration config,
                  org.w3c.dom.Element elem)
           throws java.lang.Exception
Parse a XML element into a configuration object.

Overrides:
parse in class Factories
Parameters:
config - an instance of the BaseConfiguration class which internal parameters will get set based on the information from the provided XML Element.
elem - this is a part of the XML tree that represents the BaseConfiguration object.
Throws:
java.lang.Exception - in case the configuration object the provided XML element represents is not recognized.

getOperations

public void getOperations(org.w3c.dom.Element elem,
                          OperationsConfig alc)
                   throws java.lang.Exception
Get operations. Calls getOperation for every Operation element in the config.

Parameters:
elem - this is a part of the XML tree that represents the BaseConfiguration object.
alc - OperationsConfig object
Throws:
java.lang.Exception - if error occurs

getOperation

public void getOperation(org.w3c.dom.Element elem,
                         OperationsConfig alc,
                         java.lang.String forceName)
                  throws java.lang.Exception
Parameters:
elem - this is a part of the XML tree that represents the BaseConfiguration object.
alc - OperationsConfig object
forceName - if not null sets the Operation name; otherwise the Operation name is retrieved from its 'name' tag;
Throws:
java.lang.Exception

getInitParams

public void getInitParams(org.w3c.dom.Element elem,
                          OperationsConfig al)
                   throws java.lang.Exception
This method converts old style and reads the new style initialization parameters.

Parameters:
elem - Element object
al - OperationsConfig object
Throws:
java.lang.Exception -
  • if could not locate single Element from elem 's children.

  • if could not publish parameters.

  • if could not parse XML file into a configuration object.

  • getSchemas

    public void getSchemas(org.w3c.dom.Element elem,
                           AssemblyLineConfig config)
                    throws java.lang.Exception
    This method parses all Schema elements in the XML file into configuration objects.

    Parameters:
    elem - this is a part of the XML tree that represents the AssemblyLineConfig object.
    config - an instance of the AssemblyLineConfig class which internal parameters will get set based on the information from the provided XML Element.
    Throws:
    java.lang.Exception - if could not parse the XML file into a configuration object

    getAttributeMaps

    public void getAttributeMaps(org.w3c.dom.Element elem,
                                 AssemblyLineConfig config)
                          throws java.lang.Exception
    This method parses all AttributeMap elements in the XML file into configuration objects.

    Parameters:
    elem - this is a part of the XML tree that represents the AssemblyLineConfig object.
    config - an instance of the AssemblyLineConfig class which internal parameters will get set based on the information from the provided XML Element.
    Throws:
    java.lang.Exception - if could not parse the XML file into a configuration object

    migrateCallParam

    public void migrateCallParam(AssemblyLineConfig assemblyLine,
                                 org.w3c.dom.Element elem,
                                 boolean input)
                          throws java.lang.Exception
    Reads and converts the old style call parameters to the new style.

    Parameters:
    assemblyLine - an instance of the AssemblyLineConfig class which internal parameters will get set based on the information from the provided XML Element.
    elem - this is a part of the XML tree that represents the AssemblyLineConfig object.
    input - if true add call parameters to input attribute map item, else to the output
    Throws:
    java.lang.Exception

    getCallParam

    public void getCallParam(CallConfig config,
                             org.w3c.dom.Element elem)
                      throws java.lang.Exception
    Parameters:
    elem - this is a part of the XML tree that represents the AssemblyLineConfig object.
    config - an instance of the AssemblyLineConfig class which internal parameters will get set based on the information from the provided XML Element.
    Throws:
    java.lang.Exception - if could not return some text from a node's children

    build

    public void build(BaseConfiguration config,
                      org.w3c.dom.Element elem)
               throws java.lang.Exception
    Generate a XML element from a configuration object.

    Overrides:
    build in class Factories
    Parameters:
    config - an instance of the BaseConfiguration class which internal parameters will be represented as a XML sub-tree.
    elem - this is the part of the XML tree where the config object's XML representation will be attached to.
    Throws:
    java.lang.Exception - in case the tag name of the provided XML element is not recognized as a valid name which is used for configuration object representation as a XML.

    setOperations

    public void setOperations(org.w3c.dom.Element elem,
                              OperationsConfig alc)
                       throws java.lang.Exception
    Generates a XML element from the provided operation configuration and add it to the Input and Output Attribute Map of the connector.

    Parameters:
    elem - this is the part of the XML tree where the config object's XML representation will be attached to.
    alc - an instance of the OperationsConfig class to set
    Throws:
    java.lang.Exception

    setInitParams

    public void setInitParams(org.w3c.dom.Element elem,
                              OperationsConfig alc)
                       throws java.lang.Exception
    Generates a XML element from the init params of the provided operation configuration and add the newly created element to the it to the Input and Output Attribute Map of the connector.

    Parameters:
    elem - this is the part of the XML tree where the config object's XML representation will be attached to.
    alc - an instance of the OperationsConfig class which internal parameters will get set based on the information from the provided XML Element.
    Throws:
    java.lang.Exception