Package com.ibm.di.config.xml
Class AssemblyLineFactory
- java.lang.Object
-
- com.ibm.di.config.xml.Factories
-
- com.ibm.di.config.xml.AssemblyLineFactory
-
public class AssemblyLineFactory extends Factories
This class implements the reading and writing of aAssemblyLineConfigin XML format.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringASSEMBLYLINE_TAGXML tag - "AssemblyLine"static java.lang.StringCALLPARAM_TAGXML tag - "CallParam"static java.lang.StringCALLRETURN_TAGIO setting - "CallReturn"static java.lang.StringCONNECTORS_TAGXML tag - "Connectors"static java.lang.StringEPILOG_TAGXML tag - "Epilog"static java.lang.StringEPILOG2_TAGXML tag - "Epilog2"static java.lang.StringINIT_PARAMS_TAGXML tag - "InitParams"static java.lang.StringIOSETTINGS_DEFAULTIO setting - "DefaultValue"static java.lang.StringIOSETTINGS_INPUTIO setting - "InputParameters"static java.lang.StringIOSETTINGS_NULLBEHAVIORIO setting - "NullBehavior"static java.lang.StringIOSETTINGS_NULLBEHAVIORVALUEIO setting - "NullBehaviorValue"static java.lang.StringIOSETTINGS_OUTPUTIO setting - "OutputParameters"static java.lang.StringIOSETTINGS_REQUIREDIO setting - "Syntax"static java.lang.StringIOSETTINGS_SYNTAXIO setting - "Syntax"static java.lang.StringIOSETTINGS_TAGXML tag - "IOSettings"static java.lang.StringIOSETTINGS_TARGETATTRIO setting - "TargetAttribute"static java.lang.StringLOG_ENABLED_TAGXML tag - "LogEnabled"static java.lang.StringLOG_SETTINGS_TAGIO setting - "Logging"static java.lang.StringONFAILURE_TAGXML tag - "OnFailure"static java.lang.StringONSUCCESS_TAGXML tag - "OnSuccess"static java.lang.StringOPERATION_PUBLIC_TAGXML tag - "Public"static java.lang.StringOPERATION_TAGXML tag - "Operation"static java.lang.StringOPERATIONS_TAGXML tag - "Operations"static java.lang.StringOPTIONS_TAGXML tag - "ThreadOptions"static java.lang.StringPROLOG_TAGXML tag - "Prolog"static java.lang.StringPROLOGINIT_TAGXML tag - "PrologInit"static java.lang.StringSETTINGS_TAGXML tag - "Settings"static java.lang.StringSHUTDOWN_TAGXML tag - "Shutdown"static java.lang.StringSTARTCYCLE_TAGXML 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
Constructors Constructor Description AssemblyLineFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuild(BaseConfiguration config, org.w3c.dom.Element elem)Generate a XML element from a configuration object.voidgetAttributeMaps(org.w3c.dom.Element elem, AssemblyLineConfig config)This method parses all AttributeMap elements in the XML file into configuration objects.voidgetCallParam(CallConfig config, org.w3c.dom.Element elem)voidgetInitParams(org.w3c.dom.Element elem, OperationsConfig al)This method converts old style and reads the new style initialization parameters.voidgetOperation(org.w3c.dom.Element elem, OperationsConfig alc, java.lang.String forceName)voidgetOperations(org.w3c.dom.Element elem, OperationsConfig alc)Get operations.voidgetSchemas(org.w3c.dom.Element elem, AssemblyLineConfig config)This method parses all Schema elements in the XML file into configuration objects.voidmigrateCallParam(AssemblyLineConfig assemblyLine, org.w3c.dom.Element elem, boolean input)Reads and converts the old style call parameters to the new style.voidparse(BaseConfiguration config, org.w3c.dom.Element elem)Parse a XML element into a configuration object.voidsetInitParams(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.voidsetOperations(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
-
-
-
-
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
-
-
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:
parsein classFactories- Parameters:
config- an instance of theBaseConfigurationclass 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 theBaseConfigurationobject.- 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.ExceptionGet operations. Calls getOperation for every Operation element in the config.- Parameters:
elem- this is a part of the XML tree that represents theBaseConfigurationobject.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 theBaseConfigurationobject.alc- OperationsConfig objectforceName- if notnullsets 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.ExceptionThis method converts old style and reads the new style initialization parameters.- Parameters:
elem- Element objectal- 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.
- if could not locate single Element from
-
getSchemas
public void getSchemas(org.w3c.dom.Element elem, AssemblyLineConfig config) throws java.lang.ExceptionThis method parses all Schema elements in the XML file into configuration objects.- Parameters:
elem- this is a part of the XML tree that represents theAssemblyLineConfigobject.config- an instance of theAssemblyLineConfigclass 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.ExceptionThis method parses all AttributeMap elements in the XML file into configuration objects.- Parameters:
elem- this is a part of the XML tree that represents theAssemblyLineConfigobject.config- an instance of theAssemblyLineConfigclass 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 theAssemblyLineConfigclass 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 theAssemblyLineConfigobject.input- iftrueadd 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 theAssemblyLineConfigobject.config- an instance of theAssemblyLineConfigclass 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:
buildin classFactories- Parameters:
config- an instance of theBaseConfigurationclass 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.ExceptionGenerates 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 theOperationsConfigclass to set- Throws:
java.lang.Exception
-
setInitParams
public void setInitParams(org.w3c.dom.Element elem, OperationsConfig alc) throws java.lang.ExceptionGenerates 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 theOperationsConfigclass which internal parameters will get set based on the information from the provided XML Element.- Throws:
java.lang.Exception
-
-