Package com.ibm.di.config.base
Class FormConfigImpl
- java.lang.Object
-
- com.ibm.di.config.base.BaseConfigurationImpl
-
- com.ibm.di.config.base.FormConfigImpl
-
- All Implemented Interfaces:
BaseConfiguration,FormConfig,MetamergeConfigChangeListener,java.io.Serializable
public class FormConfigImpl extends BaseConfigurationImpl implements FormConfig
Implementation of the configuration of a Form that can be displayed by the Configuration Editor- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.ibm.di.config.base.BaseConfigurationImpl
NAME
-
Fields inherited from interface com.ibm.di.config.interfaces.BaseConfiguration
CHILD_PATH_SEPARATOR, DISABLE_EXTPROPS, DISABLE_INHERITANCE, INHERIT_NONE, INHERIT_PARENT, ONE_LEVEL, RECURSIVE, RECURSIVE_ONELEVEL, RECURSIVE_SUBTREE, SEARCH_EXACTCASE, SEARCH_ONELEVEL, SEARCH_PARAMNAME, SEARCH_PARAMNAME_RE, SEARCH_PROPERTY, SEARCH_REGEX, SEARCH_SUBSTRING, SUBTREE
-
-
Constructor Summary
Constructors Constructor Description FormConfigImpl()FormConfigImpl(java.lang.Object obj)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFormItem(FormItemConfig item)Add a FormItem definition to this FormConfigvoidaddSection(FormSection section)Add a FormSection definition to this FormConfigjava.lang.ObjectgetClone()Return self clonejava.lang.StringgetFormEventHandler()/** Get the script that handles events in this FormConfig.FormItemConfiggetFormItem(java.lang.String name)Get a FormItem defined by this FormConfig.java.util.List<java.lang.String>getFormItemNames()Returns a list of the names of all the FormItems in this FormConfig.java.lang.StringgetFormScript()Get the script that will be executed every time a button is pressed.intgetHeight(int h)Get the preferred height of this Form.java.util.Iterator<java.lang.String>getLocalFormItemNames()Returns an Iterator over names of FormItems defined in this FormConfig.FormSectiongetSection(java.lang.String name)Get the FormSection with the given name.java.util.List<java.lang.String>getSectionNames()Get a list of the names of all Sections used by this FormConfig, if defined.java.util.List<java.lang.String>getTabNames()Get names of tabs.java.lang.StringgetTabTitle(java.lang.String name)Get Title for one tab.java.lang.StringgetTabToolTip(java.lang.String name)Get Tooltip for one tab.java.lang.StringgetTitle()Get the title of this FormConfig.java.lang.ClassLoadergetTranslationClassLoader()java.lang.StringgetTranslationFile()Get the name of the translation file.java.lang.StringgetTranslationLocale()Returns Locale identifier (ISO lang code) to use when translating resources.java.lang.StringgetUIClass()Get the name of a UI class that will be used to display the form.booleangetUseHyperLabel()Return true if this FormConfig uses hyperlabelsbooleangetUseTabs()Return true if this form uses tabs.java.util.List<ValidatorConfig>getValidators()Return list of all available validators in the configuration.intgetWidth(int w)Get the preferred width of this Form.voidinit()Called after internal data structure is set.FormItemConfignewFormItem(java.lang.String name)Create a new FormItem with the given namevoidremoveFormItem(java.lang.String name)Remove the FormItem with the given namevoidrenameFormItem(java.lang.String oldName, java.lang.String newName)Rename a FormItem.voidsetTranslationClassLoader(java.lang.ClassLoader ldr)Sets the preferredClassLoaderable to resolve the translation file as a resource.voidsetTranslationFile(java.lang.String name)Set the name of the translation file.voidsetTranslationLocale(java.lang.String locale)Sets the preferred Locale to use when translating stringsjava.lang.Stringtranslate(java.lang.String str)Translate a String.-
Methods inherited from class com.ibm.di.config.base.BaseConfigurationImpl
addListener, configurationChanged, deepClone, detachFromParent, expandPropertyValue, expandPropertyValue, flatten, fromEntry, getBooleanParameter, getChild, getChildForPath, getChildNames, getData, getDataIterator, getDebug, getDebug, getDebugBreak, getEnabled, getFlags, getInheritsFrom, getInheritsFromRef, getIntegerParameter, getKeys, getLogEnabled, getLongName, getMetamergeConfig, getModified, getModTS, getName, getNamespace, getNullBehavior, getNullBehaviorValue, getNullDefinition, getNullDefinitionValue, getParameter, getParameter, getParameter, getParameterPropertySource, getParameterPropertySourceFromValue, getParameterRaw, getParent, getParentName, getPath, getReferences, getResHash, getScript, getScriptEngine, getShortName, getStringParameter, getSubstitutionMap, getUseConfigListeners, getUseListeners, getUserComment, hasParameter, isExpression, isParameterLocal, isProtectedParameter, nameForChild, notifyChange, notifyChange, notifyChange, performNotifyChange, reattachToParent, removeListener, removeParameter, search, search, setBooleanParameter, setChild, setData, setDebug, setDebugBreak, setEnabled, setFlags, setInheritsFrom, setInheritsFromRef, setIntegerParameter, setLogEnabled, setMetamergeConfig, setModified, setModTS, setName, setName, setNullBehavior, setNullBehaviorValue, setNullDefinition, setNullDefinitionValue, setParameter, setParameter, setParameterPropertySource, setParent, setProtectedParameter, setProtectedParameter, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setupInheritanceChain, setUseConfigListeners, setUseListeners, setUserComment, size, toEntry, toString, updateInheritsFrom, willExpandProps, willFlatten, willUseInherited
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.ibm.di.config.interfaces.BaseConfiguration
addListener, detachFromParent, flatten, fromEntry, getBooleanParameter, getChild, getChildForPath, getChildNames, getData, getDataIterator, getDebug, getDebug, getDebugBreak, getEnabled, getFlags, getInheritsFrom, getInheritsFromRef, getIntegerParameter, getKeys, getLogEnabled, getMetamergeConfig, getModified, getModTS, getName, getNamespace, getNullBehavior, getNullBehaviorValue, getNullDefinition, getNullDefinitionValue, getParameter, getParameter, getParameter, getParameterPropertySource, getParameterRaw, getParent, getPath, getReferences, getScript, getScriptEngine, getShortName, getStringParameter, getSubstitutionMap, getUseListeners, getUserComment, hasParameter, isExpression, isParameterLocal, isProtectedParameter, nameForChild, notifyChange, notifyChange, notifyChange, reattachToParent, removeListener, removeParameter, search, search, setBooleanParameter, setChild, setData, setDebug, setDebugBreak, setEnabled, setFlags, setInheritsFrom, setInheritsFromRef, setIntegerParameter, setLogEnabled, setMetamergeConfig, setModified, setModTS, setName, setName, setNullBehavior, setNullBehaviorValue, setNullDefinition, setNullDefinitionValue, setParameter, setParameter, setParameterPropertySource, setParent, setProtectedParameter, setProtectedParameter, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setupInheritanceChain, setUseListeners, setUserComment, size, toEntry, updateInheritsFrom, willFlatten
-
-
-
-
Method Detail
-
init
public void init()
Description copied from class:BaseConfigurationImplCalled after internal data structure is set.- Specified by:
initin interfaceBaseConfiguration- Overrides:
initin classBaseConfigurationImpl
-
getFormItemNames
public java.util.List<java.lang.String> getFormItemNames()
Description copied from interface:FormConfigReturns a list of the names of all the FormItems in this FormConfig. Some names may refer to global FormItems.- Specified by:
getFormItemNamesin interfaceFormConfig
-
getLocalFormItemNames
public java.util.Iterator<java.lang.String> getLocalFormItemNames()
Description copied from interface:FormConfigReturns an Iterator over names of FormItems defined in this FormConfig.- Specified by:
getLocalFormItemNamesin interfaceFormConfig
-
getFormItem
public FormItemConfig getFormItem(java.lang.String name)
Description copied from interface:FormConfigGet a FormItem defined by this FormConfig. May return null if the name is not defined in this FormConfig.- Specified by:
getFormItemin interfaceFormConfig- Parameters:
name- The name of the FormItem
-
newFormItem
public FormItemConfig newFormItem(java.lang.String name)
Description copied from interface:FormConfigCreate a new FormItem with the given name- Specified by:
newFormItemin interfaceFormConfig- Parameters:
name- The name of the FormItem
-
addFormItem
public void addFormItem(FormItemConfig item)
Description copied from interface:FormConfigAdd a FormItem definition to this FormConfig- Specified by:
addFormItemin interfaceFormConfig
-
addSection
public void addSection(FormSection section)
Description copied from interface:FormConfigAdd a FormSection definition to this FormConfig- Specified by:
addSectionin interfaceFormConfig
-
removeFormItem
public void removeFormItem(java.lang.String name)
Description copied from interface:FormConfigRemove the FormItem with the given name- Specified by:
removeFormItemin interfaceFormConfig- Parameters:
name- The name of the FormItem
-
renameFormItem
public void renameFormItem(java.lang.String oldName, java.lang.String newName)Description copied from interface:FormConfigRename a FormItem.- Specified by:
renameFormItemin interfaceFormConfig- Parameters:
oldName- The old name of the FormItemnewName- The new name of the FormItem
-
getSectionNames
public java.util.List<java.lang.String> getSectionNames()
Description copied from interface:FormConfigGet a list of the names of all Sections used by this FormConfig, if defined. The names would typically be FormSection names. A FormSection also contains names, which could either be FormSection names of FormItem names. FormSection names would refer to FormSections in this FormConfig, but FormItem names may refer to global FormItems.- Specified by:
getSectionNamesin interfaceFormConfig
-
getSection
public FormSection getSection(java.lang.String name)
Description copied from interface:FormConfigGet the FormSection with the given name.- Specified by:
getSectionin interfaceFormConfig- Parameters:
name- The name of the FormSection
-
getClone
public java.lang.Object getClone() throws java.lang.ExceptionReturn self clone- Specified by:
getClonein interfaceBaseConfiguration- Overrides:
getClonein classBaseConfigurationImpl- Returns:
- a cloned version of this object.
- Throws:
java.lang.Exception
-
getFormEventHandler
public java.lang.String getFormEventHandler()
Description copied from interface:FormConfig/** Get the script that handles events in this FormConfig. This script is executed at once when the Form is displayed. Could be null.- Specified by:
getFormEventHandlerin interfaceFormConfig
-
getFormScript
public java.lang.String getFormScript()
Description copied from interface:FormConfigGet the script that will be executed every time a button is pressed. Much like getFormEventHandler(), but this can be executed 0 or more times. Could be null.- Specified by:
getFormScriptin interfaceFormConfig
-
getTitle
public java.lang.String getTitle()
Description copied from interface:FormConfigGet the title of this FormConfig.- Specified by:
getTitlein interfaceFormConfig
-
getUIClass
public java.lang.String getUIClass()
Description copied from interface:FormConfigGet the name of a UI class that will be used to display the form. Most of the other parameters will be ignored. This could be null, indicating no UI class is defined.- Specified by:
getUIClassin interfaceFormConfig
-
getWidth
public int getWidth(int w)
Description copied from interface:FormConfigGet the preferred width of this Form.- Specified by:
getWidthin interfaceFormConfig- Parameters:
w- Use this width if no width defined
-
getHeight
public int getHeight(int h)
Description copied from interface:FormConfigGet the preferred height of this Form.- Specified by:
getHeightin interfaceFormConfig- Parameters:
h- Use this height if no height defined.
-
getUseHyperLabel
public boolean getUseHyperLabel()
Description copied from interface:FormConfigReturn true if this FormConfig uses hyperlabels- Specified by:
getUseHyperLabelin interfaceFormConfig
-
getUseTabs
public boolean getUseTabs()
Description copied from interface:FormConfigReturn true if this form uses tabs.- Specified by:
getUseTabsin interfaceFormConfig
-
getTabNames
public java.util.List<java.lang.String> getTabNames()
Description copied from interface:FormConfigGet names of tabs. These names refer to other FormConfig objects.- Specified by:
getTabNamesin interfaceFormConfig
-
getTabTitle
public java.lang.String getTabTitle(java.lang.String name)
Description copied from interface:FormConfigGet Title for one tab.- Specified by:
getTabTitlein interfaceFormConfig- Parameters:
name- Name of the tab
-
getTabToolTip
public java.lang.String getTabToolTip(java.lang.String name)
Description copied from interface:FormConfigGet Tooltip for one tab.- Specified by:
getTabToolTipin interfaceFormConfig- Parameters:
name- Name of the tab
-
getTranslationFile
public java.lang.String getTranslationFile()
Description copied from interface:FormConfigGet the name of the translation file. For internal use, to translate labels and so on.- Specified by:
getTranslationFilein interfaceFormConfig
-
setTranslationFile
public void setTranslationFile(java.lang.String name)
Description copied from interface:FormConfigSet the name of the translation file. For internal use with ResourceBundle.- Specified by:
setTranslationFilein interfaceFormConfig
-
translate
public java.lang.String translate(java.lang.String str)
Description copied from interface:FormConfigTranslate a String.- Specified by:
translatein interfaceFormConfig- Parameters:
str- The string to be translated- Returns:
- The translated String, or the original String if no translation was found.
-
getTranslationClassLoader
public java.lang.ClassLoader getTranslationClassLoader()
- Specified by:
getTranslationClassLoaderin interfaceFormConfig- Returns:
- the
ClassLoaderused to resolve the translation file as a resource. If not specifiednullis returned.
-
setTranslationClassLoader
public void setTranslationClassLoader(java.lang.ClassLoader ldr)
Description copied from interface:FormConfigSets the preferredClassLoaderable to resolve the translation file as a resource.- Specified by:
setTranslationClassLoaderin interfaceFormConfig
-
setTranslationLocale
public void setTranslationLocale(java.lang.String locale)
Sets the preferred Locale to use when translating strings- Specified by:
setTranslationLocalein interfaceFormConfig
-
getTranslationLocale
public java.lang.String getTranslationLocale()
Returns Locale identifier (ISO lang code) to use when translating resources.- Specified by:
getTranslationLocalein interfaceFormConfig
-
getValidators
public java.util.List<ValidatorConfig> getValidators()
Return list of all available validators in the configuration. In case of missing validators an empty list is returned.- Specified by:
getValidatorsin interfaceFormConfig- Returns:
- list of validators configuration.
-
-