Package com.ibm.di.config.xml
Class FormFactory
- java.lang.Object
-
- com.ibm.di.config.xml.Factories
-
- com.ibm.di.config.xml.FormFactory
-
public class FormFactory extends Factories
Read/writeFormConfigelements in XML format.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTRIBUTE_NAMEAttribute name.static java.lang.StringATTRIBUTE_TYPEAttribute type.static java.lang.StringFORM_ITEM_LOCAL_VALUESstatic java.lang.StringFORM_ITEM_NAMESstatic java.lang.StringFORM_ITEM_TAGstatic java.lang.StringFORM_ITEM_VALUESstatic java.lang.StringFORM_SECTIONstatic java.lang.StringFORM_SECTION_NAMESstatic java.lang.StringFORM_TAGstatic java.lang.StringITEMstatic java.lang.StringKEYstatic java.lang.StringLIST_ITEMstatic java.lang.StringTRANSLATIONstatic java.lang.StringVALIDATORS_TAGValidator tag.static java.lang.StringVALUE-
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 FormFactory()
-
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.voidgetList(org.w3c.dom.Element p, java.util.List<java.lang.String> list, java.lang.String tag)java.util.Map<java.lang.String,java.lang.String>getMap(org.w3c.dom.Element p, java.lang.String tag)FormSectiongetSection(org.w3c.dom.Element elem)voidparse(BaseConfiguration config, org.w3c.dom.Element elem)Parse a XML element into a configuration object.voidsetList(org.w3c.dom.Element p, java.util.List<java.lang.String> list, java.lang.String tag)voidsetMap(org.w3c.dom.Element p, java.util.Map<java.lang.String,java.lang.String> map, java.lang.String tag)voidsetSection(org.w3c.dom.Element p, FormSection section)-
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
-
FORM_TAG
public static final java.lang.String FORM_TAG
- See Also:
- Constant Field Values
-
FORM_ITEM_NAMES
public static final java.lang.String FORM_ITEM_NAMES
- See Also:
- Constant Field Values
-
FORM_ITEM_TAG
public static final java.lang.String FORM_ITEM_TAG
- See Also:
- Constant Field Values
-
FORM_ITEM_VALUES
public static final java.lang.String FORM_ITEM_VALUES
- See Also:
- Constant Field Values
-
FORM_ITEM_LOCAL_VALUES
public static final java.lang.String FORM_ITEM_LOCAL_VALUES
- See Also:
- Constant Field Values
-
FORM_SECTION_NAMES
public static final java.lang.String FORM_SECTION_NAMES
- See Also:
- Constant Field Values
-
FORM_SECTION
public static final java.lang.String FORM_SECTION
- See Also:
- Constant Field Values
-
LIST_ITEM
public static final java.lang.String LIST_ITEM
- See Also:
- Constant Field Values
-
ITEM
public static final java.lang.String ITEM
- See Also:
- Constant Field Values
-
KEY
public static final java.lang.String KEY
- See Also:
- Constant Field Values
-
VALUE
public static final java.lang.String VALUE
- See Also:
- Constant Field Values
-
TRANSLATION
public static final java.lang.String TRANSLATION
- See Also:
- Constant Field Values
-
VALIDATORS_TAG
public static final java.lang.String VALIDATORS_TAG
Validator tag.- See Also:
- Constant Field Values
-
ATTRIBUTE_TYPE
public static final java.lang.String ATTRIBUTE_TYPE
Attribute type.- See Also:
- Constant Field Values
-
ATTRIBUTE_NAME
public static final java.lang.String ATTRIBUTE_NAME
Attribute name.- 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.
-
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.
-
getList
public void getList(org.w3c.dom.Element p, java.util.List<java.lang.String> list, java.lang.String tag) throws java.lang.Exception- Throws:
java.lang.Exception
-
setList
public void setList(org.w3c.dom.Element p, java.util.List<java.lang.String> list, java.lang.String tag) throws java.lang.Exception- Throws:
java.lang.Exception
-
getMap
public java.util.Map<java.lang.String,java.lang.String> getMap(org.w3c.dom.Element p, java.lang.String tag) throws java.lang.Exception- Throws:
java.lang.Exception
-
setMap
public void setMap(org.w3c.dom.Element p, java.util.Map<java.lang.String,java.lang.String> map, java.lang.String tag) throws java.lang.Exception- Throws:
java.lang.Exception
-
getSection
public FormSection getSection(org.w3c.dom.Element elem) throws java.lang.Exception
- Throws:
java.lang.Exception
-
setSection
public void setSection(org.w3c.dom.Element p, FormSection section) throws java.lang.Exception- Throws:
java.lang.Exception
-
-