Package com.ibm.di.config.base
Class FormItemConfigImpl
- java.lang.Object
-
- com.ibm.di.config.base.BaseConfigurationImpl
-
- com.ibm.di.config.base.FormItemConfigImpl
-
- All Implemented Interfaces:
BaseConfiguration
,FormItemConfig
,MetamergeConfigChangeListener
,java.io.Serializable
public class FormItemConfigImpl extends BaseConfigurationImpl implements FormItemConfig
Implementation of one item in aFormConfigImpl
- 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 FormItemConfigImpl()
FormItemConfigImpl(java.lang.Object config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
get(java.lang.String name)
Generic getjava.lang.String
getComponentClass()
Return the name of the Component class that should be used for this formitem.java.lang.String
getDefaultValue()
Get the default value for this FormItem.boolean
getDontProtect()
Return true if this FormItem should not be protected.FormConfig
getForm()
Returns the FormConfig this FormItem is part of.java.lang.String
getLabel()
Get the label for this FormItemjava.lang.String
getLeadText()
Return the lead-in text, to be used in addition to the labeljava.util.List<java.lang.String>
getLocalizedValues()
Get the localized values for this FormItem.int
getMaxValue()
Return the maximun value for this FormItem.int
getMinValue()
Return the minimun value for this FormItem.java.lang.String
getReflect()
Return the name of the method to set/get this FormItem.java.lang.String
getScript()
Gets the script attribute of this object.java.lang.String
getScript2()
Get script to be executed for a 2nd button in this FormItemjava.lang.String
getScriptLabel()
Get label for a button in this FormItemjava.lang.String
getScriptLabel2()
Get label for a 2nd button in this FormItemjava.lang.String
getScriptToolTip()
Get tooltip for a button in this FormItemjava.lang.String
getScriptToolTip2()
Get tooltip for a 2nd button in this FormItemint
getSize()
Return the size of this FormItem, as number of characters If nothing specified, return 0.java.lang.String
getSyntax()
Get the syntax of this FormItemjava.lang.String
getToolTip()
Get the ToolTip for this FormItemjava.util.List<java.lang.String>
getValues()
Get the possible values for this FormItem.boolean
isExpression()
Return true if this FormItem is an expressionboolean
isHelp()
Return true if this is a help itemboolean
isIndexBased()
Is this FormItem indexBased?boolean
isReadOnly()
Is this FormItem readOnly?boolean
isRequired()
Return true if this FormItem is a required parameterboolean
isValidForMode(java.lang.String mode)
Returns whether this FormItem is valid for a particular mode.void
setDefaultValue(java.lang.String str)
Set the default value for this FormItem.void
setForm(FormConfig form)
Set the FormConfig this FormItem is part of.void
setIndexBased(boolean value)
Set whether this FormItem should be indexbased.void
setLabel(java.lang.String str)
Set the label for this FormItemvoid
setLeadText(java.lang.String text)
Set the lead-in text, to be used in addition to the labelvoid
setLocalizedValues(java.util.Map map)
Set the localized values for this FormItem.void
setRequired(boolean value)
Set whether this FormItem is a required parametervoid
setScript(java.lang.String str)
Sets the script attribute of this object.void
setScript2(java.lang.String str)
void
setScriptLabel(java.lang.String str)
void
setScriptLabel2(java.lang.String str)
void
setScriptToolTip(java.lang.String str)
void
setScriptToolTip2(java.lang.String str)
void
setSyntax(java.lang.String str)
Set the syntax of this FormItemvoid
setToolTip(java.lang.String str)
Set the ToolTip for this FormItem.void
setValues(java.util.Vector values)
Set the possible values for this FormItem.-
Methods inherited from class com.ibm.di.config.base.BaseConfigurationImpl
addListener, configurationChanged, deepClone, detachFromParent, expandPropertyValue, expandPropertyValue, flatten, fromEntry, getBooleanParameter, getChild, getChildForPath, getChildNames, getClone, 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, getScriptEngine, getShortName, getStringParameter, getSubstitutionMap, getUseConfigListeners, getUseListeners, getUserComment, hasParameter, init, 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, 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, getClone, 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, getScriptEngine, getShortName, getStringParameter, getSubstitutionMap, getUseListeners, getUserComment, hasParameter, init, 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, setScriptEngine, setStringParameter, setSubstitutionMap, setupInheritanceChain, setUseListeners, setUserComment, size, toEntry, updateInheritsFrom, willFlatten
-
-
-
-
Method Detail
-
setForm
public void setForm(FormConfig form)
Description copied from interface:FormItemConfig
Set the FormConfig this FormItem is part of.- Specified by:
setForm
in interfaceFormItemConfig
- Parameters:
form
- The FormConfig
-
getForm
public FormConfig getForm()
Description copied from interface:FormItemConfig
Returns the FormConfig this FormItem is part of.- Specified by:
getForm
in interfaceFormItemConfig
-
getValues
public java.util.List<java.lang.String> getValues()
Description copied from interface:FormItemConfig
Get the possible values for this FormItem.- Specified by:
getValues
in interfaceFormItemConfig
-
getLocalizedValues
public java.util.List<java.lang.String> getLocalizedValues()
Description copied from interface:FormItemConfig
Get the localized values for this FormItem. The values are the same length, and have the same order as getValues(). This is only useful for a droplist- Specified by:
getLocalizedValues
in interfaceFormItemConfig
-
setLocalizedValues
public void setLocalizedValues(java.util.Map map)
Description copied from interface:FormItemConfig
Set the localized values for this FormItem.- Specified by:
setLocalizedValues
in interfaceFormItemConfig
- Parameters:
map
- maps from real values to localized Values.
-
setValues
public void setValues(java.util.Vector values)
Description copied from interface:FormItemConfig
Set the possible values for this FormItem.- Specified by:
setValues
in interfaceFormItemConfig
- Parameters:
values
- The new values
-
getSyntax
public java.lang.String getSyntax()
Description copied from interface:FormItemConfig
Get the syntax of this FormItem- Specified by:
getSyntax
in interfaceFormItemConfig
-
setSyntax
public void setSyntax(java.lang.String str)
Description copied from interface:FormItemConfig
Set the syntax of this FormItem- Specified by:
setSyntax
in interfaceFormItemConfig
- Parameters:
str
- The new syntax
-
getLabel
public java.lang.String getLabel()
Description copied from interface:FormItemConfig
Get the label for this FormItem- Specified by:
getLabel
in interfaceFormItemConfig
-
setLabel
public void setLabel(java.lang.String str)
Description copied from interface:FormItemConfig
Set the label for this FormItem- Specified by:
setLabel
in interfaceFormItemConfig
- Parameters:
str
- The new label
-
getToolTip
public java.lang.String getToolTip()
Description copied from interface:FormItemConfig
Get the ToolTip for this FormItem- Specified by:
getToolTip
in interfaceFormItemConfig
-
setToolTip
public void setToolTip(java.lang.String str)
Description copied from interface:FormItemConfig
Set the ToolTip for this FormItem.- Specified by:
setToolTip
in interfaceFormItemConfig
- Parameters:
str
- The new ToolTip
-
getDefaultValue
public java.lang.String getDefaultValue()
Description copied from interface:FormItemConfig
Get the default value for this FormItem. null means no default.- Specified by:
getDefaultValue
in interfaceFormItemConfig
-
setDefaultValue
public void setDefaultValue(java.lang.String str)
Description copied from interface:FormItemConfig
Set the default value for this FormItem.- Specified by:
setDefaultValue
in interfaceFormItemConfig
- Parameters:
str
- The new default value
-
getScript
public java.lang.String getScript()
Description copied from class:BaseConfigurationImpl
Gets the script attribute of this object.- Specified by:
getScript
in interfaceBaseConfiguration
- Specified by:
getScript
in interfaceFormItemConfig
- Overrides:
getScript
in classBaseConfigurationImpl
- Returns:
- The script value.
-
setScript
public void setScript(java.lang.String str)
Description copied from class:BaseConfigurationImpl
Sets the script attribute of this object.- Specified by:
setScript
in interfaceBaseConfiguration
- Overrides:
setScript
in classBaseConfigurationImpl
- Parameters:
str
- The new script value
-
getScriptLabel
public java.lang.String getScriptLabel()
Description copied from interface:FormItemConfig
Get label for a button in this FormItem- Specified by:
getScriptLabel
in interfaceFormItemConfig
-
setScriptLabel
public void setScriptLabel(java.lang.String str)
-
getScriptToolTip
public java.lang.String getScriptToolTip()
Description copied from interface:FormItemConfig
Get tooltip for a button in this FormItem- Specified by:
getScriptToolTip
in interfaceFormItemConfig
-
setScriptToolTip
public void setScriptToolTip(java.lang.String str)
-
getScript2
public java.lang.String getScript2()
Description copied from interface:FormItemConfig
Get script to be executed for a 2nd button in this FormItem- Specified by:
getScript2
in interfaceFormItemConfig
-
setScript2
public void setScript2(java.lang.String str)
-
getScriptLabel2
public java.lang.String getScriptLabel2()
Description copied from interface:FormItemConfig
Get label for a 2nd button in this FormItem- Specified by:
getScriptLabel2
in interfaceFormItemConfig
-
setScriptLabel2
public void setScriptLabel2(java.lang.String str)
-
getScriptToolTip2
public java.lang.String getScriptToolTip2()
Description copied from interface:FormItemConfig
Get tooltip for a 2nd button in this FormItem- Specified by:
getScriptToolTip2
in interfaceFormItemConfig
-
setScriptToolTip2
public void setScriptToolTip2(java.lang.String str)
-
isExpression
public boolean isExpression()
Description copied from interface:FormItemConfig
Return true if this FormItem is an expression- Specified by:
isExpression
in interfaceFormItemConfig
-
isReadOnly
public boolean isReadOnly()
Description copied from interface:FormItemConfig
Is this FormItem readOnly?- Specified by:
isReadOnly
in interfaceFormItemConfig
-
isIndexBased
public boolean isIndexBased()
Description copied from interface:FormItemConfig
Is this FormItem indexBased?- Specified by:
isIndexBased
in interfaceFormItemConfig
-
setIndexBased
public void setIndexBased(boolean value)
Description copied from interface:FormItemConfig
Set whether this FormItem should be indexbased.- Specified by:
setIndexBased
in interfaceFormItemConfig
- Parameters:
value
- True if this FormItem should be indexbased.
-
getDontProtect
public boolean getDontProtect()
Description copied from interface:FormItemConfig
Return true if this FormItem should not be protected. That means that the value should be stored in cleartext in the config file, even if the syntax is "Password". The default value is false, that is, protect the value of passwords.- Specified by:
getDontProtect
in interfaceFormItemConfig
-
getComponentClass
public java.lang.String getComponentClass()
Description copied from interface:FormItemConfig
Return the name of the Component class that should be used for this formitem. Used if syntax = "COMPONENT"- Specified by:
getComponentClass
in interfaceFormItemConfig
-
getReflect
public java.lang.String getReflect()
Description copied from interface:FormItemConfig
Return the name of the method to set/get this FormItem. set/get is supposed to be prefixed to the String to get the method.- Specified by:
getReflect
in interfaceFormItemConfig
-
getMinValue
public int getMinValue()
Description copied from interface:FormItemConfig
Return the minimun value for this FormItem. default is Integer.MIN_VALUE;- Specified by:
getMinValue
in interfaceFormItemConfig
-
getMaxValue
public int getMaxValue()
Description copied from interface:FormItemConfig
Return the maximun value for this FormItem. default is Integer.MAX_VALUE;- Specified by:
getMaxValue
in interfaceFormItemConfig
-
get
public java.lang.Object get(java.lang.String name)
Description copied from interface:FormItemConfig
Generic get- Specified by:
get
in interfaceFormItemConfig
-
getSize
public int getSize()
Description copied from interface:FormItemConfig
Return the size of this FormItem, as number of characters If nothing specified, return 0.- Specified by:
getSize
in interfaceFormItemConfig
-
isHelp
public boolean isHelp()
Description copied from interface:FormItemConfig
Return true if this is a help item- Specified by:
isHelp
in interfaceFormItemConfig
-
isRequired
public boolean isRequired()
Description copied from interface:FormItemConfig
Return true if this FormItem is a required parameter- Specified by:
isRequired
in interfaceFormItemConfig
-
setRequired
public void setRequired(boolean value)
Description copied from interface:FormItemConfig
Set whether this FormItem is a required parameter- Specified by:
setRequired
in interfaceFormItemConfig
- Parameters:
value
- True if this FormItem is a required parameter
-
getLeadText
public java.lang.String getLeadText()
Description copied from interface:FormItemConfig
Return the lead-in text, to be used in addition to the label- Specified by:
getLeadText
in interfaceFormItemConfig
-
setLeadText
public void setLeadText(java.lang.String text)
Description copied from interface:FormItemConfig
Set the lead-in text, to be used in addition to the label- Specified by:
setLeadText
in interfaceFormItemConfig
- Parameters:
text
- The new lead-in text
-
isValidForMode
public boolean isValidForMode(java.lang.String mode)
Description copied from interface:FormItemConfig
Returns whether this FormItem is valid for a particular mode.- Specified by:
isValidForMode
in interfaceFormItemConfig
- Parameters:
mode
- The mode- Returns:
- true if the FormItem is valid for the mode.
-
-