Package com.ibm.di.config.base
Class HooksConfigImpl
- java.lang.Object
-
- com.ibm.di.config.base.BaseConfigurationImpl
-
- com.ibm.di.config.base.AttributeMapConfigImpl
-
- com.ibm.di.config.base.HooksConfigImpl
-
- All Implemented Interfaces:
AttributeMapConfig
,BaseConfiguration
,HooksConfig
,MetamergeConfigChangeListener
,java.io.Serializable
public class HooksConfigImpl extends AttributeMapConfigImpl implements HooksConfig
Implements the configuration for all the Hooks e.g. in a Connector or AssemblyLine.- 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 HooksConfigImpl()
HooksConfigImpl(java.lang.Object config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
couldInherit(java.lang.String name)
Could this hook inherit data, if it did not have local data?boolean
flatten(java.util.List<java.lang.String> excludedNS)
flatten - combines all values from this object and its inherited objects into one single config object.java.util.ArrayList<HookConfig>
getActiveHooks()
Returns a list of enabled hooks for this configuration.BaseConfiguration
getChild(java.lang.Object name)
HookConfig
getHook(java.lang.Object o)
HookConfig
getHook(java.lang.Object name, boolean create)
Returns a hook or optionally creates itjava.util.List<java.lang.String>
getKeys(int level)
Returns a list of keys in this object.void
removeHook(java.lang.Object name)
java.util.List<javax.naming.Binding>
search(java.lang.String text, int options, int sizelimit, java.util.List<javax.naming.Binding> results)
Searches a configuration object and optionally its children for a specific key or value.void
setHook(HookConfig hook)
void
setInheritsFrom(BaseConfiguration inheritFrom)
We override this method to change the inherited object if we inherit from a connector.-
Methods inherited from class com.ibm.di.config.base.AttributeMapConfigImpl
configurationChanged, getAttributeMapItem, getAttributeNames, getChildNames, hasAttributeMapItem, init, newAttributeMapItem, removeAttributeMapItem, renameAttributeMapItem, setAttributeMapItem, setupInheritanceChain
-
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, 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, 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.AttributeMapConfig
getAttributeMapItem, getAttributeNames, hasAttributeMapItem, newAttributeMapItem, removeAttributeMapItem, renameAttributeMapItem, setAttributeMapItem
-
Methods inherited from interface com.ibm.di.config.interfaces.BaseConfiguration
addListener, detachFromParent, fromEntry, getBooleanParameter, getChildForPath, getChildNames, getClone, getData, getDataIterator, getDebug, getDebug, getDebugBreak, getEnabled, getFlags, getInheritsFrom, getInheritsFromRef, getIntegerParameter, 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, 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, setupInheritanceChain, setUseListeners, setUserComment, size, toEntry, updateInheritsFrom, willFlatten
-
-
-
-
Method Detail
-
setInheritsFrom
public void setInheritsFrom(BaseConfiguration inheritFrom)
We override this method to change the inherited object if we inherit from a connector.- Specified by:
setInheritsFrom
in interfaceBaseConfiguration
- Overrides:
setInheritsFrom
in classAttributeMapConfigImpl
- Parameters:
inheritFrom
- if this isConnectorConfig
object we take his AttributeMap to inherit from else standard behavior.
-
getHook
public HookConfig getHook(java.lang.Object o)
- Specified by:
getHook
in interfaceHooksConfig
-
setHook
public void setHook(HookConfig hook)
- Specified by:
setHook
in interfaceHooksConfig
-
removeHook
public void removeHook(java.lang.Object name)
- Specified by:
removeHook
in interfaceHooksConfig
-
couldInherit
public boolean couldInherit(java.lang.String name)
Description copied from interface:HooksConfig
Could this hook inherit data, if it did not have local data?- Specified by:
couldInherit
in interfaceHooksConfig
- Parameters:
name
- Name of Hook- Returns:
- true if there is data that could be inherited
-
flatten
public boolean flatten(java.util.List<java.lang.String> excludedNS) throws java.lang.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 interfaceBaseConfiguration
- Overrides:
flatten
in classAttributeMapConfigImpl
- 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:
java.lang.Exception
-
search
public java.util.List<javax.naming.Binding> search(java.lang.String text, int options, int sizelimit, java.util.List<javax.naming.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 interfaceBaseConfiguration
- Overrides:
search
in classBaseConfigurationImpl
- Parameters:
text
- The search textoptions
- Search options (oneLevel=1, exactCase=2, regExp=4, paramName=8)sizelimit
- Max number of hits returnedresults
- A list of results.- Returns:
- the results from the performed search added into the provided
results
parameter.
-
getActiveHooks
public java.util.ArrayList<HookConfig> getActiveHooks()
Returns a list of enabled hooks for this configuration.- Specified by:
getActiveHooks
in interfaceHooksConfig
- Since:
- 7.0
-
getHook
public HookConfig getHook(java.lang.Object name, boolean create)
Returns a hook or optionally creates it- Specified by:
getHook
in interfaceHooksConfig
- Since:
- 7.0
-
getChild
public BaseConfiguration getChild(java.lang.Object name)
- Specified by:
getChild
in interfaceBaseConfiguration
- Overrides:
getChild
in classAttributeMapConfigImpl
- Parameters:
name
- The name of the configuration object- Returns:
- the configuration object named name.
-
getKeys
public java.util.List<java.lang.String> getKeys(int level)
Description copied from class:BaseConfigurationImpl
Returns a list of keys in this object.- Specified by:
getKeys
in interfaceBaseConfiguration
- Overrides:
getKeys
in classBaseConfigurationImpl
- Parameters:
level
- can have these values:- ONE_LEVEL - only simple key/value items are returned.
- SUBTREE - all keys are returned regardless of whether they are complex (TreeMap) or simple (String, Boolean, Integer, Vector ).
- RECURSIVE - inherited keys are returned as well.
- Returns:
- The list of keys.
-
-