Package com.ibm.di.config.base
Class HookConfigImpl
- java.lang.Object
-
- com.ibm.di.config.base.BaseConfigurationImpl
-
- com.ibm.di.config.base.HookConfigImpl
-
- All Implemented Interfaces:
BaseConfiguration,HookConfig,MetamergeConfigChangeListener,java.io.Serializable
public class HookConfigImpl extends BaseConfigurationImpl implements HookConfig
This is the implementation class for the configuration of a single Hook.- 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 HookConfigImpl()ConstructorHookConfigImpl(java.lang.Object config)Constructor providing a TreeMap of attribute/value pairs.HookConfigImpl(java.lang.Object name, java.lang.String script)Constructor providing hook name and script.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancouldInherit()Could this hook inherit data from some other place, if it did not have local data?booleandetachFromParent()This method removes this objects from its parent container.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.booleangetEnabled()Gets the enabled attribute of this object.java.lang.ObjectgetHookName()java.lang.StringgetScript()Gets the script attribute of this object.java.lang.StringgetShortName()Gets the shortName attribute of the BaseConfiguration object.booleanreattachToParent(int position)This method reattaches this object to its former parent.voidsetEnabled(boolean enabled)Sets the enabled attribute of this object.voidsetHookName(java.lang.Object name)Sets hook name.voidsetInheritsFrom(BaseConfiguration inheritFrom)Sets the object from which this object inherits data.voidsetScript(java.lang.String script)Sets the hook script.voidsetupInheritanceChain()Established the inheritance chain for this object.-
Methods inherited from class com.ibm.di.config.base.BaseConfigurationImpl
addListener, configurationChanged, deepClone, expandPropertyValue, expandPropertyValue, fromEntry, getBooleanParameter, getChild, getChildForPath, getChildNames, getClone, 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, getReferences, getResHash, getScriptEngine, getStringParameter, getSubstitutionMap, getUseConfigListeners, getUseListeners, getUserComment, hasParameter, init, isExpression, isParameterLocal, isProtectedParameter, nameForChild, notifyChange, notifyChange, notifyChange, performNotifyChange, removeListener, removeParameter, search, search, setBooleanParameter, setChild, setData, setDebug, setDebugBreak, setFlags, setInheritsFromRef, setIntegerParameter, setLogEnabled, setMetamergeConfig, setModified, setModTS, setName, setName, setNullBehavior, setNullBehaviorValue, setNullDefinition, setNullDefinitionValue, setParameter, setParameter, setParameterPropertySource, setParent, setProtectedParameter, setProtectedParameter, 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, fromEntry, getBooleanParameter, getChild, getChildForPath, getChildNames, getClone, getData, getDataIterator, getDebug, getDebug, getDebugBreak, getFlags, getInheritsFrom, getInheritsFromRef, getIntegerParameter, getKeys, getLogEnabled, getMetamergeConfig, getModified, getModTS, getName, getNamespace, getNullBehavior, getNullBehaviorValue, getNullDefinition, getNullDefinitionValue, getParameter, getParameter, getParameter, getParameterPropertySource, getParameterRaw, getParent, getPath, getReferences, getScriptEngine, getStringParameter, getSubstitutionMap, getUseListeners, getUserComment, hasParameter, init, isExpression, isParameterLocal, isProtectedParameter, nameForChild, notifyChange, notifyChange, notifyChange, removeListener, removeParameter, search, search, setBooleanParameter, setChild, setData, setDebug, setDebugBreak, setFlags, setInheritsFromRef, setIntegerParameter, setLogEnabled, setMetamergeConfig, setModified, setModTS, setName, setName, setNullBehavior, setNullBehaviorValue, setNullDefinition, setNullDefinitionValue, setParameter, setParameter, setParameterPropertySource, setParent, setProtectedParameter, setProtectedParameter, setScriptEngine, setStringParameter, setSubstitutionMap, setUseListeners, setUserComment, size, toEntry, updateInheritsFrom, willFlatten
-
-
-
-
Constructor Detail
-
HookConfigImpl
public HookConfigImpl()
Constructor
-
HookConfigImpl
public HookConfigImpl(java.lang.Object config)
Constructor providing a TreeMap of attribute/value pairs.- Parameters:
config- initial config
-
HookConfigImpl
public HookConfigImpl(java.lang.Object name, java.lang.String script)Constructor providing hook name and script. Creates enabled hook.- Parameters:
name-script-
-
-
Method Detail
-
getHookName
public java.lang.Object getHookName()
- Specified by:
getHookNamein interfaceHookConfig- Returns:
- Hook name
-
setHookName
public void setHookName(java.lang.Object name)
Sets hook name.- Specified by:
setHookNamein interfaceHookConfig- Parameters:
name-
-
getEnabled
public boolean getEnabled()
Gets the enabled attribute of this object.- Specified by:
getEnabledin interfaceBaseConfiguration- Specified by:
getEnabledin interfaceHookConfig- Overrides:
getEnabledin classBaseConfigurationImpl- Returns:
- The nullBehaviorValue value.
-
setEnabled
public void setEnabled(boolean enabled)
Sets the enabled attribute of this object.- Specified by:
setEnabledin interfaceBaseConfiguration- Specified by:
setEnabledin interfaceHookConfig- Overrides:
setEnabledin classBaseConfigurationImpl- Parameters:
enabled-truefor enabling;falseotherwise.
-
getScript
public java.lang.String getScript()
Gets the script attribute of this object.- Specified by:
getScriptin interfaceBaseConfiguration- Overrides:
getScriptin classBaseConfigurationImpl- Returns:
- The script value.
-
setScript
public void setScript(java.lang.String script)
Sets the hook script.- Specified by:
setScriptin interfaceBaseConfiguration- Overrides:
setScriptin classBaseConfigurationImpl- Parameters:
script-
-
couldInherit
public boolean couldInherit()
Could this hook inherit data from some other place, if it did not have local data?- Specified by:
couldInheritin interfaceHookConfig- Returns:
- true if there is data that could be inherited
-
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
-
detachFromParent
public boolean detachFromParent()
This method removes this objects from its parent container. If this cannot be removed from the parent the contents should be cleared (default implementation) and true be returned as if it were removed. If the object cannot be cleared or removed it should return false.- Specified by:
detachFromParentin interfaceBaseConfiguration- Overrides:
detachFromParentin classBaseConfigurationImpl- Returns:
trueif this object was removed;falseif it could not be removed.
-
reattachToParent
public boolean reattachToParent(int position)
This method reattaches this object to its former parent.- Specified by:
reattachToParentin interfaceBaseConfiguration- Overrides:
reattachToParentin classBaseConfigurationImpl- Returns:
trueif this object was reattached;falseif not;
-
setInheritsFrom
public void setInheritsFrom(BaseConfiguration inheritFrom)
Sets the object from which this object inherits data.Note: Call this method to setup a temporary (non persistent) object for inheritance.
- Specified by:
setInheritsFromin interfaceBaseConfiguration- Overrides:
setInheritsFromin classBaseConfigurationImpl- Parameters:
inheritFrom- The new inheritsFrom value.
-
setupInheritanceChain
public void setupInheritanceChain() throws java.lang.ExceptionDescription copied from class:BaseConfigurationImplEstablished the inheritance chain for this object.- Specified by:
setupInheritanceChainin interfaceBaseConfiguration- Overrides:
setupInheritanceChainin classBaseConfigurationImpl- Throws:
java.lang.Exception- if the operation could not be performed
-
getShortName
public java.lang.String getShortName()
Description copied from class:BaseConfigurationImplGets the shortName attribute of the BaseConfiguration object. The short name is the last component in a multi component name. E.g.: AssemblyLines/MyName --> "MyName"- Specified by:
getShortNamein interfaceBaseConfiguration- Overrides:
getShortNamein classBaseConfigurationImpl- Returns:
- The shortName value
-
-