com.ibm.di.config.base
Class SchemaConfigImpl

java.lang.Object
  extended by com.ibm.di.config.base.BaseConfigurationImpl
      extended by com.ibm.di.config.base.SchemaConfigImpl
All Implemented Interfaces:
BaseConfiguration, MetamergeConfigChangeListener, SchemaConfig, Serializable

public class SchemaConfigImpl
extends BaseConfigurationImpl
implements SchemaConfig

Implements SchemaConfig

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
SchemaConfigImpl()
           
SchemaConfigImpl(Object config)
           
 
Method Summary
 void attachSchema(SchemaConfig schema)
          Attach a Schema.
 void detachSchema(SchemaConfig schema)
          Detach a Schema.
 boolean flatten(List<String> excludedNS)
          This method combines all values from this object and its inherited objects into one single config object.
 BaseConfiguration getChild(Object name)
          
 List<String> getChildNames()
          Returns a list of names for all child configuration object
 SchemaItemConfig getItem(Object name)
          Returns a named SchemItemConfig
 List<String> getItemNames()
          Gets a List of all of the names.
 String getUserComment()
          Override since the user comment may be a schema item
 SchemaItemConfig newItem(Object name)
          Constructs a new SchemaItemConfig object.
 void removeItem(Object name)
          Removes an item attribute from the schema
 void setInheritsFrom(BaseConfiguration inheritFrom)
          We override this method to change the inherited object if we inherit from a connector.
 void setItem(Object name, SchemaItemConfig item)
          Sets the item attribute of the SchemaConfig object
 void setUserComment(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, 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, 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, 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, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setupInheritanceChain, setUseListeners, size, toEntry, updateInheritsFrom, willFlatten
 

Constructor Detail

SchemaConfigImpl

public SchemaConfigImpl()

SchemaConfigImpl

public SchemaConfigImpl(Object config)
Method Detail

getUserComment

public String getUserComment()
Override since the user comment may be a schema item

Specified by:
getUserComment in interface BaseConfiguration
Overrides:
getUserComment in class BaseConfigurationImpl
Returns:
the user defined comment string.

setUserComment

public void setUserComment(String comment)
Override, we cannot set any user comment

Specified by:
setUserComment in interface BaseConfiguration
Overrides:
setUserComment in class BaseConfigurationImpl
Parameters:
comment - new value for user comment

getItemNames

public List<String> getItemNames()
Description copied from interface: SchemaConfig
Gets a List of all of the names.

Specified by:
getItemNames in interface SchemaConfig
Returns:
The List of item names

getItem

public SchemaItemConfig getItem(Object name)
Returns a named SchemItemConfig

Specified by:
getItem in interface SchemaConfig
Parameters:
name - The name of the schema item
Returns:
The item value

removeItem

public void removeItem(Object name)
Removes an item attribute from the schema

Specified by:
removeItem in interface SchemaConfig
Parameters:
name - The name of the item to remove

setItem

public void setItem(Object name,
                    SchemaItemConfig item)
Sets the item attribute of the SchemaConfig object

Specified by:
setItem in interface SchemaConfig
Parameters:
name - The name of the new item
item - The SchemaConfig object to put in

newItem

public SchemaItemConfig newItem(Object name)
                         throws Exception
Constructs a new SchemaItemConfig object. The object contains an item attribute with name

Specified by:
newItem in interface SchemaConfig
Parameters:
name - The name of the item attribute
Returns:
New or existing SchemaItemConfig object
Throws:
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 interface BaseConfiguration
Overrides:
setInheritsFrom in class BaseConfigurationImpl
Parameters:
inheritFrom - The new inheritsFrom value.

flatten

public boolean flatten(List<String> excludedNS)
                throws 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 interface BaseConfiguration
Overrides:
flatten in class BaseConfigurationImpl
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:
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(Object name)

Specified by:
getChild in interface BaseConfiguration
Overrides:
getChild in class BaseConfigurationImpl
Parameters:
name - The name of the configuration object
Returns:
the configuration object named name.

getChildNames

public List<String> getChildNames()
Returns a list of names for all child configuration object

Specified by:
getChildNames in interface BaseConfiguration
Overrides:
getChildNames in class BaseConfigurationImpl
Returns:
list of names