com.ibm.di.config.interfaces
Interface ContainerConfig

All Superinterfaces:
BaseConfiguration, Serializable
All Known Subinterfaces:
BranchingConfig, LoopConfig, SolutionInterface
All Known Implementing Classes:
BranchingConfigImpl, ContainerConfigImpl, LoopConfigImpl, SolutionInterfaceImpl

public interface ContainerConfig
extends BaseConfiguration


Field Summary
 
Fields inherited from interface com.ibm.di.config.interfaces.BaseConfiguration
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, SUBTREE
 
Method Summary
 int addConfig(BaseConfiguration config)
          This method adds a configuration object to the container
 boolean containsConfig(String name, boolean recursive)
          Returns true if there is a config having the provided name.
 BaseConfiguration getConfig(int index)
          This method returns the configuration object at index
 BaseConfiguration getConfig(String name)
          Returns the config with the specified name in this container.
 BaseConfiguration getConfig(String name, boolean recursive)
          Returns the config with the specified name traversing child objects of type ContainerConfig if recursive is true.
 List getConfigurations(List list)
          Returns a flattened list of the entire tree of config items.
 List getInheritedConfigurations(List list)
          Returns a list of config items from this object and inherited containers
 int indexOf(BaseConfiguration config)
          Returns the index of the config
 int indexOf(String name)
          Returns the index of the config
 int insertConfig(BaseConfiguration config, int position)
          This method inesrts a configuration object at the specified index
 boolean moveConfig(BaseConfiguration config, boolean up)
          Moves a config one position up or down
 int moveConfig(BaseConfiguration config, int position)
          Moves a config from one position to another
 boolean moveConfig(int position, boolean up)
          Moves a config one position up or down
 boolean removeConfig(BaseConfiguration config)
          Removes a component from the container
 BaseConfiguration removeConfig(int index)
          This method removes a configuration object from the container
 boolean removeConfig(String name, boolean recursive)
          This method removes a named configuration object from the container or its subcontainers
 int size()
          This method returns the number of config objects in the container
 
Methods inherited from interface com.ibm.di.config.interfaces.BaseConfiguration
addListener, flatten, fromEntry, getBooleanParameter, getChild, getChildForPath, getChildNames, getClone, getData, getDataIterator, getDebug, getDebug, getDebugBreak, getEnabled, getFlags, getInheritsFrom, getInheritsFromRef, getIntegerParameter, getKeys, getLogEnabled, getMetamergeConfig, getModified, getName, getNamespace, getNullBehavior, getNullBehaviorValue, getNullDefinition, getNullDefinitionValue, getParameter, getParameter, getParameter, getParameterPropertySource, getParameterRaw, getParent, getPath, getReferences, getScript, getScriptEngine, getShortName, getStringParameter, getSubstitutionMap, getUseListeners, getUserComment, hasParameter, init, isParameterLocal, nameForChild, notifyChange, notifyChange, removeListener, removeParameter, search, search, setBooleanParameter, setChild, setData, setDebug, setDebugBreak, setEnabled, setFlags, setInheritsFrom, setInheritsFromRef, setIntegerParameter, setLogEnabled, setMetamergeConfig, setModified, setName, setName, setNullBehavior, setNullBehaviorValue, setNullDefinition, setNullDefinitionValue, setParameter, setParameter, setParameterPropertySource, setParent, setProtectedParameter, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setupInheritanceChain, setUseListeners, setUserComment, toEntry, updateInheritsFrom, willFlatten
 

Method Detail

size

int size()
This method returns the number of config objects in the container

Specified by:
size in interface BaseConfiguration
Returns:
Number of config objects
Throws:
Exception

indexOf

int indexOf(BaseConfiguration config)
Returns the index of the config

Parameters:
config - component config

indexOf

int indexOf(String name)
Returns the index of the config

Parameters:
name - component config name to lookup

getInheritedConfigurations

List getInheritedConfigurations(List list)
Returns a list of config items from this object and inherited containers

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 inherited configurations

getConfigurations

List getConfigurations(List list)
Returns a flattened list of the entire tree of config items.

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

getConfig

BaseConfiguration getConfig(int index)
This method returns the configuration object at index

Parameters:
index - The configuration object
Throws:
Exception

getConfig

BaseConfiguration getConfig(String name,
                            boolean recursive)
Returns the config with the specified name traversing child objects of type ContainerConfig if recursive is true.

Parameters:
name - The config's name
recursive - Traverse child ContainerConfigs if true
Returns:
The configuration object or null if config wasn't found

getConfig

BaseConfiguration getConfig(String name)
Returns the config with the specified name in this container. This method does not traverse child containers.

Parameters:
name - The config's name
Returns:
The configuration object or null if config wasn't found

addConfig

int addConfig(BaseConfiguration config)
This method adds a configuration object to the container

Parameters:
config - The configuration object
Returns:
Index of the new configuration object
Throws:
Exception

insertConfig

int insertConfig(BaseConfiguration config,
                 int position)
This method inesrts a configuration object at the specified index

Parameters:
config - The configuration object
position - Position of the new object
Returns:
Index of the new configuration object
Throws:
Exception

removeConfig

BaseConfiguration removeConfig(int index)
This method removes a configuration object from the container

Parameters:
index - Index of the configuration object
Throws:
Exception

removeConfig

boolean removeConfig(BaseConfiguration config)
Removes a component from the container

Parameters:
config - component config

removeConfig

boolean removeConfig(String name,
                     boolean recursive)
This method removes a named configuration object from the container or its subcontainers

Parameters:
name - Name of the configuration object
recursive - True if child containers should be searched
Throws:
Exception

moveConfig

boolean moveConfig(int position,
                   boolean up)
Moves a config one position up or down

Parameters:
position - Current connector position
up - Up (true) or down (false)
Returns:
true if the operation succeeded

moveConfig

boolean moveConfig(BaseConfiguration config,
                   boolean up)
Moves a config one position up or down

Parameters:
config - Current connector position
up - Up (true) or down (false)
Returns:
true if the operation succeeded

moveConfig

int moveConfig(BaseConfiguration config,
               int position)
Moves a config from one position to another

Parameters:
config - Component config
position - New position
Returns:
The components new position

containsConfig

boolean containsConfig(String name,
                       boolean recursive)
Returns true if there is a config having the provided name.

Parameters:
name - The name of the config item
recursive - If true, a tree walk will be performed when checking for the name
Returns:
TRUE if there is an object with the provided name