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 voidattachSchema(SchemaConfig schema)Attach a Schema.voiddetachSchema(SchemaConfig schema)Detach a Schema.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.BaseConfigurationgetChild(java.lang.Object name)java.util.List<java.lang.String>getChildNames()Returns a list of names for all child configuration objectSchemaItemConfiggetItem(java.lang.Object name)Returns a named SchemItemConfigjava.util.List<java.lang.String>getItemNames()Gets a List of all of the names.java.lang.StringgetUserComment()Override since the user comment may be a schema itemSchemaItemConfignewItem(java.lang.Object name)Constructs a new SchemaItemConfig object.voidremoveItem(java.lang.Object name)Removes an item attribute from the schemavoidsetInheritsFrom(BaseConfiguration inheritFrom)We override this method to change the inherited object if we inherit from a connector.voidsetItem(java.lang.Object name, SchemaItemConfig item)Sets the item attribute of the SchemaConfig objectvoidsetUserComment(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:
getUserCommentin interfaceBaseConfiguration- Overrides:
getUserCommentin classBaseConfigurationImpl- Returns:
- the user defined comment string.
-
setUserComment
public void setUserComment(java.lang.String comment)
Override, we cannot set any user comment- Specified by:
setUserCommentin interfaceBaseConfiguration- Overrides:
setUserCommentin classBaseConfigurationImpl- Parameters:
comment- new value for user comment
-
getItemNames
public java.util.List<java.lang.String> getItemNames()
Description copied from interface:SchemaConfigGets a List of all of the names.- Specified by:
getItemNamesin interfaceSchemaConfig- Returns:
- The List of item names
-
getItem
public SchemaItemConfig getItem(java.lang.Object name)
Returns a named SchemItemConfig- Specified by:
getItemin 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:
removeItemin 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:
setItemin 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:
newItemin 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:
setInheritsFromin interfaceBaseConfiguration- Overrides:
setInheritsFromin classBaseConfigurationImpl- Parameters:
inheritFrom- The new inheritsFrom value.
-
flatten
public boolean flatten(java.util.List<java.lang.String> excludedNS) throws java.lang.ExceptionDescription copied from class:BaseConfigurationImplThis 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
-
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:
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
-
-