com.ibm.di.config.base
Class BranchingConfigImpl

java.lang.Object
  extended by com.ibm.di.config.base.BaseConfigurationImpl
      extended by com.ibm.di.config.base.ContainerConfigImpl
          extended by com.ibm.di.config.base.BranchingConfigImpl
All Implemented Interfaces:
BaseConfiguration, BranchingConfig, ContainerConfig, MetamergeConfigChangeListener, Serializable
Direct Known Subclasses:
LoopConfigImpl

public class BranchingConfigImpl
extends ContainerConfigImpl
implements BranchingConfig

Implements the configuration of a component used to branch the business logic

See Also:
Serialized Form

Field Summary
protected  ContainerConfig conditions
          A container with the conditions of the branch component.
 
Fields inherited from class com.ibm.di.config.base.ContainerConfigImpl
items
 
Fields inherited from class com.ibm.di.config.base.BaseConfigurationImpl
NAME
 
Fields inherited from interface com.ibm.di.config.interfaces.BranchingConfig
BRANCH_CASE, BRANCH_ELSE, BRANCH_ELSEIF, BRANCH_IF, BRANCH_SWITCH
 
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
BranchingConfigImpl()
          Constructs a BranchingConfigImpl object
BranchingConfigImpl(Object data)
          Constructs a BranchingConfigImpl object
 
Method Summary
 int getBranchType()
          
 Object getClone()
          
 ContainerConfig getConditions()
          
 boolean getEnabled()
          Gets the enabled attribute of this object.
 boolean getMatchAny()
          
 void init()
          Called after internal data structure is set.
 BranchCondition newCondition()
          
 int numberLoops()
          
 void setBranchType(int type)
          Sets the branch type (e.g.
 void setConditions(ContainerConfig conditions)
          Set the conditions of the branch component.
 void setMatchAny(boolean matchAny)
          Sets the match any flag.
 int totalSize()
          Returns the total number of components in this Branch.
 
Methods inherited from class com.ibm.di.config.base.ContainerConfigImpl
addConfig, containsConfig, getChild, getChildNames, getConfig, getConfig, getConfig, getConfigurations, getInheritedConfigurations, indexOf, indexOf, insertConfig, moveConfig, moveConfig, moveConfig, removeConfig, removeConfig, removeConfig, setupInheritanceChain, size
 
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, getFlags, getInheritsFrom, getInheritsFromRef, getIntegerParameter, getKeys, getLogEnabled, getLongName, getMetamergeConfig, getModified, 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, nameForChild, notifyChange, notifyChange, notifyChange, performNotifyChange, reattachToParent, 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, 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.ContainerConfig
addConfig, containsConfig, getConfig, getConfig, getConfig, getConfigurations, getInheritedConfigurations, indexOf, indexOf, insertConfig, moveConfig, moveConfig, moveConfig, removeConfig, removeConfig, removeConfig, size
 
Methods inherited from interface com.ibm.di.config.interfaces.BaseConfiguration
addListener, detachFromParent, flatten, fromEntry, getBooleanParameter, getChild, getChildForPath, getChildNames, getData, getDataIterator, getDebug, getDebug, getDebugBreak, 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, isExpression, isParameterLocal, nameForChild, notifyChange, notifyChange, notifyChange, reattachToParent, 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
 

Field Detail

conditions

protected ContainerConfig conditions
A container with the conditions of the branch component.

Constructor Detail

BranchingConfigImpl

public BranchingConfigImpl()
Constructs a BranchingConfigImpl object


BranchingConfigImpl

public BranchingConfigImpl(Object data)
Constructs a BranchingConfigImpl object

Parameters:
data - TreeMap with config data
Method Detail

getEnabled

public boolean getEnabled()
Gets the enabled attribute of this object.

Specified by:
getEnabled in interface BaseConfiguration
Overrides:
getEnabled in class BaseConfigurationImpl
Returns:
The nullBehaviorValue value.

totalSize

public int totalSize()
Returns the total number of components in this Branch. This includes all components plus components in sub branches.

Specified by:
totalSize in interface BranchingConfig
Returns:
total number of components in this Branch

numberLoops

public int numberLoops()

Specified by:
numberLoops in interface BranchingConfig
Returns:
The total number of LoopConfig items in this Branch and its child branches/loops. Since BranchingConfig also add an extra invisible EndBranch component we also count these.

init

public void init()
Called after internal data structure is set.

Specified by:
init in interface BaseConfiguration
Overrides:
init in class BaseConfigurationImpl

getConditions

public ContainerConfig getConditions()

Specified by:
getConditions in interface BranchingConfig
Returns:
The conditions container.

setConditions

public void setConditions(ContainerConfig conditions)
Set the conditions of the branch component.

Parameters:
conditions - A container with BranchCondition configurations.

newCondition

public BranchCondition newCondition()

Specified by:
newCondition in interface BranchingConfig
Returns:
A new populated condition config.

getMatchAny

public boolean getMatchAny()

Specified by:
getMatchAny in interface BranchingConfig
Returns:
The match any flag.

setMatchAny

public void setMatchAny(boolean matchAny)
Sets the match any flag.

Specified by:
setMatchAny in interface BranchingConfig
Parameters:
matchAny - The value of the match any flag.

getBranchType

public int getBranchType()

Specified by:
getBranchType in interface BranchingConfig
Returns:
The branch type (e.g. BRANCH_IF, BRANCH_ELSEIF, BRANCH_ELSE, BRANCH_SWITCH, BRANCH_CASE) Returns BRANCH_IF if the parameter is not set.

setBranchType

public void setBranchType(int type)
Sets the branch type (e.g. BRANCH_IF, BRANCH_ELSEIF, BRANCH_ELSE, BRANCH_SWITCH, BRANCH_CASE).

Specified by:
setBranchType in interface BranchingConfig
Parameters:
type - The type of the branch component.

getClone

public Object getClone()
                throws Exception

Specified by:
getClone in interface BaseConfiguration
Overrides:
getClone in class ContainerConfigImpl
Returns:
a cloned version of this object.
Throws:
Exception