Package com.ibm.di.config.base
Class AttributeMapConfigImpl
- java.lang.Object
-
- com.ibm.di.config.base.BaseConfigurationImpl
-
- com.ibm.di.config.base.AttributeMapConfigImpl
-
- All Implemented Interfaces:
AttributeMapConfig,BaseConfiguration,MetamergeConfigChangeListener,java.io.Serializable
- Direct Known Subclasses:
HooksConfigImpl
public class AttributeMapConfigImpl extends BaseConfigurationImpl implements AttributeMapConfig, MetamergeConfigChangeListener
The implementation class for the configuration of an AttributeMap- 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 AttributeMapConfigImpl()ConstructorAttributeMapConfigImpl(java.lang.Object config)Constructor providing a TreeMap of attribute/value pairs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigurationChanged(MetamergeConfigChange mcc)booleanflatten(java.util.List<java.lang.String> excludedNS)This method combines all values from this object and its inherited objects into one single config object.AttributeMapItemgetAttributeMapItem(java.lang.Object attrName)Returns the AttributeMapItem for attributejava.util.List<java.lang.String>getAttributeNames()Returns a list of attribute names in this object.BaseConfigurationgetChild(java.lang.Object name)java.util.List<java.lang.String>getChildNames()Returns a list of names for all child configuration objectbooleanhasAttributeMapItem(java.lang.Object attribute)Checks if a named attribute is local (not inherited or null) to this object.voidinit()Called after internal data structure is set.AttributeMapItemnewAttributeMapItem(java.lang.Object name)Creates and adds a new attribute map item to this object.voidremoveAttributeMapItem(java.lang.Object attribute)Removes a named attribute from this map.voidrenameAttributeMapItem(java.lang.Object newName, AttributeMapItem map)Changes the name of an existing attributemapitemvoidsetAttributeMapItem(AttributeMapItem map)Sets a attributeMapItem attribute of the AttributeMapConfig objectvoidsetInheritsFrom(BaseConfiguration inheritFrom)We override this method to change the inherited object if we inherit from a connector.voidsetupInheritanceChain()Established the inheritance chain for this object.-
Methods inherited from class com.ibm.di.config.base.BaseConfigurationImpl
addListener, deepClone, detachFromParent, expandPropertyValue, expandPropertyValue, fromEntry, getBooleanParameter, getChildForPath, 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, getScript, getScriptEngine, getShortName, getStringParameter, getSubstitutionMap, getUseConfigListeners, getUseListeners, getUserComment, hasParameter, isExpression, isParameterLocal, isProtectedParameter, nameForChild, notifyChange, notifyChange, notifyChange, performNotifyChange, reattachToParent, removeListener, removeParameter, search, search, setBooleanParameter, setChild, setData, setDebug, setDebugBreak, setEnabled, setFlags, 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, 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, fromEntry, getBooleanParameter, getChildForPath, 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, getScript, getScriptEngine, getShortName, getStringParameter, getSubstitutionMap, getUseListeners, getUserComment, hasParameter, isExpression, isParameterLocal, isProtectedParameter, nameForChild, notifyChange, notifyChange, notifyChange, reattachToParent, removeListener, removeParameter, search, search, setBooleanParameter, setChild, setData, setDebug, setDebugBreak, setEnabled, setFlags, setInheritsFromRef, setIntegerParameter, setLogEnabled, setMetamergeConfig, setModified, setModTS, setName, setName, setNullBehavior, setNullBehaviorValue, setNullDefinition, setNullDefinitionValue, setParameter, setParameter, setParameterPropertySource, setParent, setProtectedParameter, setProtectedParameter, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setUseListeners, setUserComment, size, toEntry, updateInheritsFrom, willFlatten
-
-
-
-
Method Detail
-
init
public void init() throws java.lang.ExceptionCalled after internal data structure is set.- Specified by:
initin interfaceBaseConfiguration- Overrides:
initin classBaseConfigurationImpl- Throws:
java.lang.Exception- if the initialization fails.
-
setupInheritanceChain
public void setupInheritanceChain() throws java.lang.ExceptionEstablished the inheritance chain for this object.- Specified by:
setupInheritanceChainin interfaceBaseConfiguration- Overrides:
setupInheritanceChainin classBaseConfigurationImpl- Throws:
java.lang.Exception- if the operation could not be performed
-
setInheritsFrom
public void setInheritsFrom(BaseConfiguration inheritFrom)
We override this method to change the inherited object if we inherit from a connector. Also we need to set up inheritance for all the attribute map items.- Specified by:
setInheritsFromin interfaceBaseConfiguration- Overrides:
setInheritsFromin classBaseConfigurationImpl- Parameters:
inheritFrom- if this isConnectorConfigobject we take his AttributeMap to inherit from else standard behavior.
-
configurationChanged
public void configurationChanged(MetamergeConfigChange mcc)
- Specified by:
configurationChangedin interfaceMetamergeConfigChangeListener- Overrides:
configurationChangedin classBaseConfigurationImpl
-
newAttributeMapItem
public AttributeMapItem newAttributeMapItem(java.lang.Object name) throws java.lang.Exception
Creates and adds a new attribute map item to this object.- Specified by:
newAttributeMapItemin interfaceAttributeMapConfig- Parameters:
name- The attribute name- Returns:
- The newly created AttributeMapItem
- Throws:
java.lang.Exception- Any errors encountered by the underlying driver
-
setAttributeMapItem
public void setAttributeMapItem(AttributeMapItem map)
Sets a attributeMapItem attribute of the AttributeMapConfig object- Specified by:
setAttributeMapItemin interfaceAttributeMapConfig- Parameters:
map- The new AttributeMapItem
-
removeAttributeMapItem
public void removeAttributeMapItem(java.lang.Object attribute)
Removes a named attribute from this map.- Specified by:
removeAttributeMapItemin interfaceAttributeMapConfig- Parameters:
attribute- The attribute name
-
renameAttributeMapItem
public void renameAttributeMapItem(java.lang.Object newName, AttributeMapItem map) throws java.lang.ExceptionChanges the name of an existing attributemapitem- Specified by:
renameAttributeMapItemin interfaceAttributeMapConfig- Parameters:
newName- The new namemap- The existing AttributeMapItem- Throws:
java.lang.Exception- Any errors encountered by the underlying driver
-
getAttributeMapItem
public AttributeMapItem getAttributeMapItem(java.lang.Object attrName)
Returns the AttributeMapItem for attribute- Specified by:
getAttributeMapItemin interfaceAttributeMapConfig- Parameters:
attrName- The attribute name- Returns:
- The attributeMapItem value
-
hasAttributeMapItem
public boolean hasAttributeMapItem(java.lang.Object attribute)
Checks if a named attribute is local (not inherited or null) to this object.- Specified by:
hasAttributeMapItemin interfaceAttributeMapConfig- Parameters:
attribute- The attribute name- Returns:
- True if this object contains the attribute
-
getAttributeNames
public java.util.List<java.lang.String> getAttributeNames()
Returns a list of attribute names in this object.- Specified by:
getAttributeNamesin interfaceAttributeMapConfig- Returns:
- The list of attribute names including inherited attributes
-
flatten
public boolean flatten(java.util.List<java.lang.String> excludedNS) throws java.lang.ExceptionThis method 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:
flattenin interfaceBaseConfiguration- Overrides:
flattenin classBaseConfigurationImpl- Parameters:
excludedNS- List of namespaces to exclude from flattening- Returns:
trueif object attempted flattening, FALSE is this object inherits from an excluded namespace or has no inheritance- Throws:
java.lang.Exception
-
getChild
public BaseConfiguration getChild(java.lang.Object name)
- 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()
Returns a list of names for all child configuration object- Specified by:
getChildNamesin interfaceBaseConfiguration- Overrides:
getChildNamesin classBaseConfigurationImpl- Returns:
- list of names
-
-