com.ibm.di.config.base
Class LoopConfigImpl

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
              extended by com.ibm.di.config.base.LoopConfigImpl
All Implemented Interfaces:
BaseConfiguration, BranchingConfig, ContainerConfig, LoopConfig, MetamergeConfigChangeListener, Serializable

public class LoopConfigImpl
extends BranchingConfigImpl
implements LoopConfig

Implements the configuration for a Loop Component in an AssemblyLine.

See Also:
Serialized Form

Field Summary
protected  ConnectorConfig loopConnector
           
 
Fields inherited from class com.ibm.di.config.base.BranchingConfigImpl
conditions
 
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.LoopConfig
LOOP_COLLECTION, LOOP_CONDITIONS, LOOP_CONNECTOR_FC, OPTION_INITIALIZE, OPTION_NONE, OPTION_SELECT
 
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
LoopConfigImpl()
          Constructor for the loopConnectorImpl object
LoopConfigImpl(Object data)
          Constructor for the loopConnectorImpl object
 
Method Summary
 boolean flatten(List<String> excludedNS)
          flatten - combines all values from this object and its inherited objects into one single config object.
 Object getClone()
          Return self clone
 int getInitConnectorOption()
          Returns the type of loop we are doing
 String getLoopAttributeName()
          Returns the name of the loop attribute that has one value from the work attribute for each loop
 ConnectorConfig getLoopConnector()
          Returns the Loop connector configuration
 int getLoopType()
          Returns the type of loop we are doing
 List<String> getReferences(List<String> list)
          
 String getWorkAttributeName()
          Returns the name of the work attribute whose values to loop over
 void notifyChange(Object source, Object key, int operation, Object userObject)
          Notifies listeners for a change event.
 List<Binding> search(String text, int options, int sizelimit, List<Binding> results)
          Searches a configuration object and optionally its children for a specific key or value.
 void setInitConnectorOption(int option)
          Sets the loop type
 void setLoopAttributeName(String name)
          Sets the name of the work attribute whose values to loop over
 void setLoopConnector(ConnectorConfig cc)
           
 void setLoopType(int type)
          Sets the loop type
 void setWorkAttributeName(String name)
          Sets the name of the work attribute whose values to loop over
 
Methods inherited from class com.ibm.di.config.base.BranchingConfigImpl
getBranchType, getConditions, getEnabled, getMatchAny, init, newCondition, numberLoops, setBranchType, setConditions, setMatchAny, totalSize
 
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, fromEntry, getBooleanParameter, getChildForPath, getData, getDataIterator, getDebug, getDebug, getDebugBreak, 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, getResHash, getScript, getScriptEngine, getShortName, getStringParameter, getSubstitutionMap, getUseConfigListeners, getUseListeners, getUserComment, hasParameter, isExpression, isParameterLocal, nameForChild, notifyChange, notifyChange, performNotifyChange, reattachToParent, removeListener, removeParameter, 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, 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.BranchingConfig
getBranchType, getConditions, getMatchAny, newCondition, numberLoops, setBranchType, setMatchAny, totalSize
 
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, 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, getScript, getScriptEngine, getShortName, getStringParameter, getSubstitutionMap, getUseListeners, getUserComment, hasParameter, init, isExpression, isParameterLocal, nameForChild, notifyChange, notifyChange, reattachToParent, removeListener, removeParameter, 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, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setupInheritanceChain, setUseListeners, setUserComment, toEntry, updateInheritsFrom, willFlatten
 

Field Detail

loopConnector

protected ConnectorConfig loopConnector
Constructor Detail

LoopConfigImpl

public LoopConfigImpl()
Constructor for the loopConnectorImpl object


LoopConfigImpl

public LoopConfigImpl(Object data)
Constructor for the loopConnectorImpl object

Parameters:
data - TreeMap with config data
Method Detail

getLoopConnector

public ConnectorConfig getLoopConnector()
                                 throws Exception
Returns the Loop connector configuration

Specified by:
getLoopConnector in interface LoopConfig
Throws:
Exception

setLoopConnector

public void setLoopConnector(ConnectorConfig cc)

getLoopType

public int getLoopType()
Returns the type of loop we are doing

Specified by:
getLoopType in interface LoopConfig

setLoopType

public void setLoopType(int type)
Sets the loop type

Specified by:
setLoopType in interface LoopConfig

getInitConnectorOption

public int getInitConnectorOption()
Returns the type of loop we are doing

Specified by:
getInitConnectorOption in interface LoopConfig

setInitConnectorOption

public void setInitConnectorOption(int option)
Sets the loop type

Specified by:
setInitConnectorOption in interface LoopConfig

getWorkAttributeName

public String getWorkAttributeName()
Returns the name of the work attribute whose values to loop over

Specified by:
getWorkAttributeName in interface LoopConfig

setWorkAttributeName

public void setWorkAttributeName(String name)
Sets the name of the work attribute whose values to loop over

Specified by:
setWorkAttributeName in interface LoopConfig

getLoopAttributeName

public String getLoopAttributeName()
Returns the name of the loop attribute that has one value from the work attribute for each loop

Specified by:
getLoopAttributeName in interface LoopConfig

setLoopAttributeName

public void setLoopAttributeName(String name)
Sets the name of the work attribute whose values to loop over

Specified by:
setLoopAttributeName in interface LoopConfig

notifyChange

public void notifyChange(Object source,
                         Object key,
                         int operation,
                         Object userObject)
Description copied from class: BaseConfigurationImpl
Notifies listeners for a change event.

Note: This method is typically called by setParameter method but not from user code.

Specified by:
notifyChange in interface BaseConfiguration
Overrides:
notifyChange in class BaseConfigurationImpl
Parameters:
source - The caller initiating the change event
key - The key that changed
operation - The operation performed on key
userObject - Arbitrary object provided by caller

getClone

public Object getClone()
                throws Exception
Return self clone

Specified by:
getClone in interface BaseConfiguration
Overrides:
getClone in class BranchingConfigImpl
Returns:
A cloned object of this
Throws:
Exception

flatten

public boolean flatten(List<String> excludedNS)
                throws Exception
flatten - combines all values from this object and its inherited objects into one single config object. After flattening, the object is a complete object with no inherited values except those from the excludedNS list.

Specified by:
flatten in interface BaseConfiguration
Overrides:
flatten in class BaseConfigurationImpl
Parameters:
excludedNS - List of namespaces to exclude from flattening
Returns:
true if object attempted flattening, FALSE is this object inherits from an excluded namespace or has no inheritance
Throws:
Exception

getReferences

public List<String> getReferences(List<String> list)
Description copied from class: BaseConfigurationImpl

Specified by:
getReferences in interface BaseConfiguration
Overrides:
getReferences in class BaseConfigurationImpl
Parameters:
list - If non-null, the object must use the provided list rather than creating its own
Returns:
a list of all references to other object from which this object or its children inherit from.

search

public List<Binding> search(String text,
                            int options,
                            int sizelimit,
                            List<Binding> results)
Description copied from class: BaseConfigurationImpl
Searches a configuration object and optionally its children for a specific key or value.

Specified by:
search in interface BaseConfiguration
Overrides:
search in class BaseConfigurationImpl
Parameters:
text - The search text
options - Search options (oneLevel=1, exactCase=2, regExp=4, paramName=8)
sizelimit - Max number of hits returned
results - A list of results.
Returns:
the results from the performed search added into the provided results parameter.