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 String ASSEMBLYLINE_TAG
          XML tag - "AssemblyLine"
static String CALLPARAM_TAG
          XML tag - "CallParam"
static String CALLRETURN_TAG
          IO setting - "CallReturn"
static String CONNECTORS_TAG
          XML tag - "Connectors"
static String EPILOG_TAG
          XML tag - "Epilog"
static String EPILOG2_TAG
          XML tag - "Epilog2"
static String INIT_PARAMS_TAG
          XML tag - "InitParams"
static String IOSETTINGS_DEFAULT
          IO setting - "DefaultValue"
static String IOSETTINGS_INPUT
          IO setting - "InputParameters"
static String IOSETTINGS_NULLBEHAVIOR
          IO setting - "NullBehavior"
static String IOSETTINGS_NULLBEHAVIORVALUE
          IO setting - "NullBehaviorValue"
static String IOSETTINGS_OUTPUT
          IO setting - "OutputParameters"
static String IOSETTINGS_REQUIRED
          IO setting - "Syntax"
static String IOSETTINGS_SYNTAX
          IO setting - "Syntax"
static String IOSETTINGS_TAG
          XML tag - "IOSettings"
static String IOSETTINGS_TARGETATTR
          IO setting - "TargetAttribute"
static String LOG_ENABLED_TAG
          XML tag - "LogEnabled"
static String LOG_SETTINGS_TAG
          IO setting - "Logging"
static String ONFAILURE_TAG
          XML tag - "OnFailure"
static String ONSUCCESS_TAG
          XML tag - "OnSuccess"
static String OPERATION_PUBLIC_TAG
          XML tag - "Public"
static String OPERATION_TAG
          XML tag - "Operation"
static String OPERATIONS_TAG
          XML tag - "Operations"
static String OPTIONS_TAG
          XML tag - "ThreadOptions"
static String PROLOG_TAG
          XML tag - "Prolog"
static String PROLOGINIT_TAG
          XML tag - "PrologInit"
static String SETTINGS_TAG
          XML tag - "Settings"
static String SHUTDOWN_TAG
          XML tag - "Shutdown"
static String STARTCYCLE_TAG
          XML tag - "StartCycle"
 
Fields inherited from class com.ibm.di.config.xml.Factories
classMap, implMap, INHERIT_TAG, logger, 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, Element elem)
          Generate a XML element from a configuration object.
 void getAttributeMaps(Element elem, AssemblyLineConfig config)
          This method parses all AttributeMap elements in the XML file into configuration objects.
 void getCallParam(CallConfig config, Element elem)
           
 void getInitParams(Element elem, OperationsConfig al)
          This method converts old style and reads the new style initialization parameters.
 void getOperation(Element elem, OperationsConfig alc, String forceName)
           
 void getOperations(Element elem, OperationsConfig alc)
          Get operations.
 void getSchemas(Element elem, AssemblyLineConfig config)
          This method parses all Schema elements in the XML file into configuration objects.
 void migrateCallParam(AssemblyLineConfig assemblyLine, Element elem, boolean input)
          Reads and converts the old style call parameters to the new style.
 void parse(BaseConfiguration config, Element elem)
          Parse a XML element into a configuration object.
 void setInitParams(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(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 String ASSEMBLYLINE_TAG
XML tag - "AssemblyLine"

See Also:
Constant Field Values

CONNECTORS_TAG

public static final String CONNECTORS_TAG
XML tag - "Connectors"

See Also:
Constant Field Values

LOG_ENABLED_TAG

public static final String LOG_ENABLED_TAG
XML tag - "LogEnabled"

See Also:
Constant Field Values

PROLOG_TAG

public static final String PROLOG_TAG
XML tag - "Prolog"

See Also:
Constant Field Values

PROLOGINIT_TAG

public static final String PROLOGINIT_TAG
XML tag - "PrologInit"

See Also:
Constant Field Values

EPILOG_TAG

public static final String EPILOG_TAG
XML tag - "Epilog"

See Also:
Constant Field Values

EPILOG2_TAG

public static final String EPILOG2_TAG
XML tag - "Epilog2"

See Also:
Constant Field Values

SHUTDOWN_TAG

public static final String SHUTDOWN_TAG
XML tag - "Shutdown"

See Also:
Constant Field Values

STARTCYCLE_TAG

public static final String STARTCYCLE_TAG
XML tag - "StartCycle"

See Also:
Constant Field Values

ONSUCCESS_TAG

public static final String ONSUCCESS_TAG
XML tag - "OnSuccess"

See Also:
Constant Field Values

ONFAILURE_TAG

public static final String ONFAILURE_TAG
XML tag - "OnFailure"

See Also:
Constant Field Values

IOSETTINGS_TAG

public static final String IOSETTINGS_TAG
XML tag - "IOSettings"

See Also:
Constant Field Values

SETTINGS_TAG

public static final String SETTINGS_TAG
XML tag - "Settings"

See Also:
Constant Field Values

OPTIONS_TAG

public static final String OPTIONS_TAG
XML tag - "ThreadOptions"

See Also:
Constant Field Values

OPERATIONS_TAG

public static final String OPERATIONS_TAG
XML tag - "Operations"

See Also:
Constant Field Values

OPERATION_TAG

public static final String OPERATION_TAG
XML tag - "Operation"

See Also:
Constant Field Values

OPERATION_PUBLIC_TAG

public static final String OPERATION_PUBLIC_TAG
XML tag - "Public"

See Also:
Constant Field Values

INIT_PARAMS_TAG

public static final String INIT_PARAMS_TAG
XML tag - "InitParams"

See Also:
Constant Field Values

CALLPARAM_TAG

public static final String CALLPARAM_TAG
XML tag - "CallParam"

See Also:
Constant Field Values

IOSETTINGS_INPUT

public static final String IOSETTINGS_INPUT
IO setting - "InputParameters"

See Also:
Constant Field Values

IOSETTINGS_OUTPUT

public static final String IOSETTINGS_OUTPUT
IO setting - "OutputParameters"

See Also:
Constant Field Values

IOSETTINGS_TARGETATTR

public static final String IOSETTINGS_TARGETATTR
IO setting - "TargetAttribute"

See Also:
Constant Field Values

IOSETTINGS_NULLBEHAVIOR

public static final String IOSETTINGS_NULLBEHAVIOR
IO setting - "NullBehavior"

See Also:
Constant Field Values

IOSETTINGS_NULLBEHAVIORVALUE

public static final String IOSETTINGS_NULLBEHAVIORVALUE
IO setting - "NullBehaviorValue"

See Also:
Constant Field Values

IOSETTINGS_SYNTAX

public static final String IOSETTINGS_SYNTAX
IO setting - "Syntax"

See Also:
Constant Field Values

IOSETTINGS_DEFAULT

public static final String IOSETTINGS_DEFAULT
IO setting - "DefaultValue"

Note: Deprecated, only for backwards compatibility

See Also:
Constant Field Values

IOSETTINGS_REQUIRED

public static final String IOSETTINGS_REQUIRED
IO setting - "Syntax"

See Also:
Constant Field Values

LOG_SETTINGS_TAG

public static final String LOG_SETTINGS_TAG
IO setting - "Logging"

See Also:
Constant Field Values

CALLRETURN_TAG

public static final String CALLRETURN_TAG
IO setting - "CallReturn"

See Also:
Constant Field Values
Constructor Detail

AssemblyLineFactory

public AssemblyLineFactory()
Method Detail

parse

public void parse(BaseConfiguration config,
                  Element elem)
           throws 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:
Exception - in case the configuration object the provided XML element represents is not recognized.

getOperations

public void getOperations(Element elem,
                          OperationsConfig alc)
                   throws 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:
Exception - if error occurs

getOperation

public void getOperation(Element elem,
                         OperationsConfig alc,
                         String forceName)
                  throws 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:
Exception

getInitParams

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

Parameters:
elem - Element object
al - OperationsConfig object
Throws:
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(Element elem,
                           AssemblyLineConfig config)
                    throws 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:
    Exception - if could not parse the XML file into a configuration object

    getAttributeMaps

    public void getAttributeMaps(Element elem,
                                 AssemblyLineConfig config)
                          throws 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:
    Exception - if could not parse the XML file into a configuration object

    migrateCallParam

    public void migrateCallParam(AssemblyLineConfig assemblyLine,
                                 Element elem,
                                 boolean input)
                          throws 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:
    Exception

    getCallParam

    public void getCallParam(CallConfig config,
                             Element elem)
                      throws 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:
    Exception - if could not return some text from a node's children

    build

    public void build(BaseConfiguration config,
                      Element elem)
               throws 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:
    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(Element elem,
                              OperationsConfig alc)
                       throws 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:
    Exception

    setInitParams

    public void setInitParams(Element elem,
                              OperationsConfig alc)
                       throws 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:
    Exception