Package com.ibm.di.config.base
Class SchemaConfigImpl
- java.lang.Object
-
- com.ibm.di.config.base.BaseConfigurationImpl
-
- com.ibm.di.config.base.SchemaConfigImpl
-
- All Implemented Interfaces:
BaseConfiguration
,MetamergeConfigChangeListener
,SchemaConfig
,java.io.Serializable
public class SchemaConfigImpl extends BaseConfigurationImpl implements SchemaConfig
ImplementsSchemaConfig
- 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 SchemaConfigImpl()
SchemaConfigImpl(java.lang.Object config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attachSchema(SchemaConfig schema)
Attach a Schema.void
detachSchema(SchemaConfig schema)
Detach a Schema.boolean
flatten(java.util.List<java.lang.String> excludedNS)
This method combines all values from this object and its inherited objects into one single config object.BaseConfiguration
getChild(java.lang.Object name)
java.util.List<java.lang.String>
getChildNames()
Returns a list of names for all child configuration objectSchemaItemConfig
getItem(java.lang.Object name)
Returns a named SchemItemConfigjava.util.List<java.lang.String>
getItemNames()
Gets a List of all of the names.java.lang.String
getUserComment()
Override since the user comment may be a schema itemSchemaItemConfig
newItem(java.lang.Object name)
Constructs a new SchemaItemConfig object.void
removeItem(java.lang.Object name)
Removes an item attribute from the schemavoid
setInheritsFrom(BaseConfiguration inheritFrom)
We override this method to change the inherited object if we inherit from a connector.void
setItem(java.lang.Object name, SchemaItemConfig item)
Sets the item attribute of the SchemaConfig objectvoid
setUserComment(java.lang.String comment)
Override, we cannot set any user comment-
Methods inherited from class com.ibm.di.config.base.BaseConfigurationImpl
addListener, configurationChanged, 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, hasParameter, init, 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, setupInheritanceChain, setUseConfigListeners, setUseListeners, 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, hasParameter, init, 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, setupInheritanceChain, setUseListeners, size, toEntry, updateInheritsFrom, willFlatten
-
-
-
-
Method Detail
-
getUserComment
public java.lang.String getUserComment()
Override since the user comment may be a schema item- Specified by:
getUserComment
in interfaceBaseConfiguration
- Overrides:
getUserComment
in classBaseConfigurationImpl
- Returns:
- the user defined comment string.
-
setUserComment
public void setUserComment(java.lang.String comment)
Override, we cannot set any user comment- Specified by:
setUserComment
in interfaceBaseConfiguration
- Overrides:
setUserComment
in classBaseConfigurationImpl
- Parameters:
comment
- new value for user comment
-
getItemNames
public java.util.List<java.lang.String> getItemNames()
Description copied from interface:SchemaConfig
Gets a List of all of the names.- Specified by:
getItemNames
in interfaceSchemaConfig
- Returns:
- The List of item names
-
getItem
public SchemaItemConfig getItem(java.lang.Object name)
Returns a named SchemItemConfig- Specified by:
getItem
in interfaceSchemaConfig
- Parameters:
name
- The name of the schema item- Returns:
- The item value
-
removeItem
public void removeItem(java.lang.Object name)
Removes an item attribute from the schema- Specified by:
removeItem
in interfaceSchemaConfig
- Parameters:
name
- The name of the item to remove
-
setItem
public void setItem(java.lang.Object name, SchemaItemConfig item)
Sets the item attribute of the SchemaConfig object- Specified by:
setItem
in interfaceSchemaConfig
- Parameters:
name
- The name of the new itemitem
- The SchemaConfig object to put in
-
newItem
public SchemaItemConfig newItem(java.lang.Object name) throws java.lang.Exception
Constructs a new SchemaItemConfig object. The object contains an item attribute with name- Specified by:
newItem
in interfaceSchemaConfig
- Parameters:
name
- The name of the item attribute- Returns:
- New or existing SchemaItemConfig object
- Throws:
java.lang.Exception
- if the construction does not succeed
-
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 classBaseConfigurationImpl
- Parameters:
inheritFrom
- The new inheritsFrom value.
-
flatten
public boolean flatten(java.util.List<java.lang.String> excludedNS) throws java.lang.Exception
Description copied from class:BaseConfigurationImpl
This 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:
flatten
in interfaceBaseConfiguration
- Overrides:
flatten
in classBaseConfigurationImpl
- 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
-
attachSchema
public void attachSchema(SchemaConfig schema)
Attach a Schema. The attributes of the attached schema will be listed as part of the current object. Attached schemas are perceived as read-only - attributes will not be removed nor added to them. The attachment relationship is runtime only - it will not be persisted.- Parameters:
schema
- Schema to attach- Since:
- 7.0
-
detachSchema
public void detachSchema(SchemaConfig schema)
Detach a Schema. If the specified Schema is not attached to the current one, the method will have no effect.- Parameters:
schema
- Schema to detach- Since:
- 7.0
-
getChild
public BaseConfiguration getChild(java.lang.Object name)
- Specified by:
getChild
in interfaceBaseConfiguration
- Overrides:
getChild
in 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:
getChildNames
in interfaceBaseConfiguration
- Overrides:
getChildNames
in classBaseConfigurationImpl
- Returns:
- list of names
-
-