Package com.ibm.di.config.base
Class ContainerConfigImpl
- java.lang.Object
-
- com.ibm.di.config.base.BaseConfigurationImpl
-
- com.ibm.di.config.base.ContainerConfigImpl
-
- All Implemented Interfaces:
BaseConfiguration,ContainerConfig,MetamergeConfigChangeListener,java.io.Serializable
- Direct Known Subclasses:
BranchingConfigImpl,SequenceConfigImpl,SolutionInterfaceImpl
public class ContainerConfigImpl extends BaseConfigurationImpl implements ContainerConfig
Implements a Container containing BaseConfiguration objects.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Vector<BaseConfiguration>itemsCollection of config objects in the container-
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 ContainerConfigImpl()Constructor for the ContainerConfigImpl objectContainerConfigImpl(java.lang.Object data)Constructor for the ContainerConfigImpl object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddConfig(BaseConfiguration config)This method adds a configuration object to the containerbooleancontainsConfig(java.lang.String name, boolean recursive)Returns true if there is a config having the provided name.BaseConfigurationgetChild(java.lang.Object name)java.util.List<java.lang.String>getChildNames()Returns a list of names for all child configuration objectjava.lang.ObjectgetClone()BaseConfigurationgetConfig(int index)This method returns the configuration object, which is at position indexBaseConfigurationgetConfig(java.lang.String name)Returns the config with the specified nameBaseConfigurationgetConfig(java.lang.String name, boolean recursive)Returns the config with the specified namejava.util.List<BaseConfiguration>getConfigurations(java.util.List<BaseConfiguration> list)Returns a flattened list of the entire tree of config items.java.util.List<BaseConfiguration>getInheritedConfigurations(java.util.List<BaseConfiguration> list)Returns a list of config items from this object and inherited containersintindexOf(BaseConfiguration config)Returns the position of a configuration object in a containerintindexOf(java.lang.String name)Returns the index of the configintinsertConfig(BaseConfiguration config, int position)This method inesrts a configuration object at the specified indexbooleanmoveConfig(int position, boolean up)Moves a connector one position up or downbooleanmoveConfig(BaseConfiguration config, boolean up)Moves a config one position up or downintmoveConfig(BaseConfiguration config, int position)Moves a config from one position to anotherBaseConfigurationremoveConfig(int index)This method removes a configuration object from the containerbooleanremoveConfig(BaseConfiguration config)This method removes a configuration object from the containerbooleanremoveConfig(java.lang.String name, boolean recursive)This method removes a configuration object from the containervoidsetupInheritanceChain()Established the inheritance chain for this object.intsize()This method returns the number of config objects in the container-
Methods inherited from class com.ibm.di.config.base.BaseConfigurationImpl
addListener, configurationChanged, deepClone, detachFromParent, expandPropertyValue, expandPropertyValue, flatten, fromEntry, getBooleanParameter, getChildForPath, 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, 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, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setUseConfigListeners, setUseListeners, setUserComment, 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, getChildForPath, 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, 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, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setUseListeners, setUserComment, toEntry, updateInheritsFrom, willFlatten
-
-
-
-
Field Detail
-
items
protected java.util.Vector<BaseConfiguration> items
Collection of config objects in the container
-
-
Method Detail
-
size
public int size()
This method returns the number of config objects in the container- Specified by:
sizein interfaceBaseConfiguration- Specified by:
sizein interfaceContainerConfig- Overrides:
sizein classBaseConfigurationImpl- Returns:
- Number of config objects
-
getInheritedConfigurations
public java.util.List<BaseConfiguration> getInheritedConfigurations(java.util.List<BaseConfiguration> list)
Returns a list of config items from this object and inherited containers- Specified by:
getInheritedConfigurationsin interfaceContainerConfig- Parameters:
list- If not null, BaseConfiguration items are added to this list- Returns:
- The provided List or a new List object with the contents of inherited configurations
-
getConfigurations
public java.util.List<BaseConfiguration> getConfigurations(java.util.List<BaseConfiguration> list)
Returns a flattened list of the entire tree of config items.- Specified by:
getConfigurationsin interfaceContainerConfig- Parameters:
list- If not null, config items are added to this list- Returns:
- The provided list or a new list object with the contents of this container and child containers
-
indexOf
public int indexOf(BaseConfiguration config)
Returns the position of a configuration object in a container- Specified by:
indexOfin interfaceContainerConfig- Parameters:
config- Configuration object in the container- Returns:
- The position of the Configuration object in the collection of configuration objects in the container
-
indexOf
public int indexOf(java.lang.String name)
Returns the index of the config- Specified by:
indexOfin interfaceContainerConfig- Parameters:
name- The name of the configuration object- Returns:
- The position of the configuration object in the collection of configuration objects
-
getConfig
public BaseConfiguration getConfig(int index)
This method returns the configuration object, which is at position index- Specified by:
getConfigin interfaceContainerConfig- Parameters:
index- The position of the configuration object- Returns:
- Class representing the configuration of the object
-
getConfig
public BaseConfiguration getConfig(java.lang.String name)
Returns the config with the specified name- Specified by:
getConfigin interfaceContainerConfig- Parameters:
name- The config's name- Returns:
- The connector configuration object or null if config wasn't found
-
getConfig
public BaseConfiguration getConfig(java.lang.String name, boolean recursive)
Returns the config with the specified name- Specified by:
getConfigin interfaceContainerConfig- Parameters:
name- The config's namerecursive- If true, searches through all the components in a container- Returns:
- The connector configuration object or null if config wasn't found
-
addConfig
public int addConfig(BaseConfiguration config)
This method adds a configuration object to the container- Specified by:
addConfigin interfaceContainerConfig- Parameters:
config- The configuration object- Returns:
- Index of the new configuration object
-
insertConfig
public int insertConfig(BaseConfiguration config, int position)
This method inesrts a configuration object at the specified index- Specified by:
insertConfigin interfaceContainerConfig- Parameters:
config- The configuration objectposition- Position of the new object- Returns:
- Index of the new configuration object
-
removeConfig
public BaseConfiguration removeConfig(int index)
This method removes a configuration object from the container- Specified by:
removeConfigin interfaceContainerConfig- Parameters:
index- Index of the configuration object- Returns:
- The configuration object that is removed
-
removeConfig
public boolean removeConfig(BaseConfiguration config)
This method removes a configuration object from the container- Specified by:
removeConfigin interfaceContainerConfig- Parameters:
config- The configuration object to remove- Returns:
- true if the remove operation is successful. Otherwise, returns false.
-
removeConfig
public boolean removeConfig(java.lang.String name, boolean recursive)This method removes a configuration object from the container- Specified by:
removeConfigin interfaceContainerConfig- Parameters:
name- The name of the configuration to removerecursive- If true, searches through all the components in a container- Returns:
- true, if the remove operation is successful. Otherwise returns false.
-
moveConfig
public boolean moveConfig(int position, boolean up)Moves a connector one position up or down- Specified by:
moveConfigin interfaceContainerConfig- Parameters:
position- Current connector positionup- Up (true) or down (false)- Returns:
- true if the operation succeeded
-
moveConfig
public boolean moveConfig(BaseConfiguration config, boolean up)
Moves a config one position up or down- Specified by:
moveConfigin interfaceContainerConfig- Parameters:
up- Up (true) or down (false)config- The configuration object to move.- Returns:
- true if the operation succeeded
-
moveConfig
public int moveConfig(BaseConfiguration config, int position)
Moves a config from one position to another- Specified by:
moveConfigin interfaceContainerConfig- Parameters:
position- New positionconfig- The configuration object to move- Returns:
- The current position of the configuration
-
containsConfig
public boolean containsConfig(java.lang.String name, boolean recursive)Returns true if there is a config having the provided name.- Specified by:
containsConfigin interfaceContainerConfig- Parameters:
name- The name of the config itemrecursive- If true, a tree walk will be performed when checking for the name- Returns:
- TRUE if there is an object with the provided name
-
getChild
public BaseConfiguration getChild(java.lang.Object name)
Description copied from class:BaseConfigurationImpl- Specified by:
getChildin interfaceBaseConfiguration- Overrides:
getChildin classBaseConfigurationImpl- Parameters:
name- The name of the configuration object- Returns:
- the configuration object named name.
-
getChildNames
public java.util.List<java.lang.String> getChildNames()
Description copied from class:BaseConfigurationImplReturns a list of names for all child configuration object- Specified by:
getChildNamesin interfaceBaseConfiguration- Overrides:
getChildNamesin classBaseConfigurationImpl- Returns:
- list of names
-
setupInheritanceChain
public void setupInheritanceChain() throws java.lang.ExceptionDescription copied from class:BaseConfigurationImplEstablished the inheritance chain for this object.- Specified by:
setupInheritanceChainin interfaceBaseConfiguration- Overrides:
setupInheritanceChainin classBaseConfigurationImpl- Throws:
java.lang.Exception- if the operation could not be performed
-
getClone
public java.lang.Object getClone() throws java.lang.ExceptionDescription copied from class:BaseConfigurationImpl- Specified by:
getClonein interfaceBaseConfiguration- Overrides:
getClonein classBaseConfigurationImpl- Returns:
- a cloned version of this object.
- Throws:
java.lang.Exception
-
-