com.ibm.di.config.base
Class FileNamespace

java.lang.Object
  extended by com.ibm.di.config.base.BaseConfigurationImpl
      extended by com.ibm.di.config.base.MetamergeConfigImpl
          extended by com.ibm.di.config.base.FileNamespace
All Implemented Interfaces:
BaseConfiguration, MetamergeConfig, MetamergeConfigChangeListener, MetamergeFolder, Serializable

public class FileNamespace
extends MetamergeConfigImpl

This implementation provides access via the file system. Only property style attribute map files are supported by this driver.

If the file extension is ".attributemap" it is interpreted as a property style attribute map. The property style attribute map is a simple file with a one liner for each mapping, where the left hand is the attribute name and the right hand is the assignment.

                attrname=
                attrname=attrname
                attrname=java script
 
If the value of an attribute is either blank or equals the attribute name a simple map is created. In all other cases an advanced map is created using the value as the javascript expression. You can also use expressions in both the name and value:
                {propname}={another-prop}
 
This will replace propname and another-prop with corresponding values from a property.

All other files are reported as NameNotFoundException even though they may exist.

See Also:
Serialized Form

Field Summary
static String EXTERNAL_ATTRIBUTE_MAP_EXTENSION
           
 
Fields inherited from class com.ibm.di.config.base.MetamergeConfigImpl
classMap, DEFAULT_FOLDER_IMPL, DEFAULT_FOLDER_NAMES, env, externalPropertiesDelegator, logger
 
Fields inherited from class com.ibm.di.config.base.BaseConfigurationImpl
NAME
 
Fields inherited from interface com.ibm.di.config.interfaces.MetamergeConfig
ASSEMBLYLINE_FOLDER, ATTRIBUTEMAP_FOLDER, CONFIG_FOLDER, CONNECTOR_FOLDER, DEFAULT_ASSEMBLYLINE_FOLDER, DEFAULT_ATTRIBUTEMAP_FOLDER, DEFAULT_CONFIG_FOLDER, DEFAULT_CONNECTOR_FOLDER, DEFAULT_EXTPROP_FOLDER, DEFAULT_EXTPROP_NAME, DEFAULT_FORM_FOLDER, DEFAULT_FUNCTION_FOLDER, DEFAULT_LIBRARY_FOLDER, DEFAULT_LIBS_FOLDER, DEFAULT_LOGGER_FOLDER, DEFAULT_NAMESPACE_FOLDER, DEFAULT_PARSER_FOLDER, DEFAULT_PROPERTY_FOLDER, DEFAULT_PROPSTORE_FOLDER, DEFAULT_SCHEDULER_FOLDER, DEFAULT_SCRIPT_FOLDER, DEFAULT_SEQUENCE_FOLDER, DEFAULT_SERVER_AUTOSTART, DEFAULT_SERVER_FOLDER, DEFAULT_SERVER_INSTANCE_PROPERTIES, DEFAULT_SERVER_LOG, DEFAULT_SERVER_TOMBSTONES, DEFAULT_SOLUTION_INTERFACE, EXTPROP_FOLDER, FORM_FOLDER, FUNCTION_FOLDER, LIBRARY_FOLDER, LIBS_FOLDER, LOGGER_FOLDER, LOGGING_FOLDER, NAMESPACE_FOLDER, PARSER_FOLDER, PROPERTY_FOLDER, PROPSTORE_FOLDER, SCHEDULER_FOLDER, SCRIPT_FOLDER, SEQUENCE_FOLDER
 
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
FileNamespace()
           
 
Method Summary
 AttributeMapConfig loadAttributeMapFromFile(File file)
          Reads a property-style attribute map configuration from the specified file.
 Object lookup(Object name)
          Searches this configuration for a named node.
 
Methods inherited from class com.ibm.di.config.base.MetamergeConfigImpl
addDefaultFolders, addNameComponent, bind, closeConfig, commitChanges, commitChanges, copy, createFolder, getAssemblyLine, getAttributeMap, getConfigVersion, getConnector, getDefaultFolder, getDirectory, getDriverParameter, getDriverParameters, getExternalProperties, getExternalProperties, getFileConfig, getFunction, getNames, getNamespace, getParser, getPassword, getScript, getSequence, getSolutionInterface, getTDIProperties, getTreeMap, getVector, hasPassword, initializeClassMap, initializeConfig, instantiateAllObjects, instantiateAllObjects, internalLookup, isCommittable, isModTSEnabled, isReadOnly, isRemote, list, list, logmsg, lookupInFolder, newInstanceOf, newInstanceOf, newInstanceOf, rebind, rename, setDriverParameter, setDriverParameters, setFileConfig, setModTSEnabled, setOutput, toString, unbind, useEncryption
 
Methods inherited from class com.ibm.di.config.base.BaseConfigurationImpl
addListener, configurationChanged, deepClone, detachFromParent, expandPropertyValue, expandPropertyValue, flatten, fromEntry, getBooleanParameter, getChild, getChildForPath, getChildNames, 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, getUserComment, hasParameter, init, isExpression, isParameterLocal, nameForChild, notifyChange, notifyChange, notifyChange, performNotifyChange, reattachToParent, removeListener, removeParameter, search, search, setBooleanParameter, setChild, setData, setDebug, setDebugBreak, setEnabled, setFlags, setInheritsFrom, setInheritsFromRef, setIntegerParameter, setLogEnabled, setMetamergeConfig, setModified, setModTS, setName, setName, setNullBehavior, setNullBehaviorValue, setNullDefinition, setNullDefinitionValue, setParameter, setParameter, setParameterPropertySource, setParent, setProtectedParameter, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setupInheritanceChain, setUseConfigListeners, setUseListeners, setUserComment, size, toEntry, 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, flatten, fromEntry, getBooleanParameter, getChild, getChildForPath, getChildNames, 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, getUserComment, hasParameter, init, isExpression, isParameterLocal, nameForChild, notifyChange, notifyChange, notifyChange, reattachToParent, removeListener, removeParameter, search, search, setBooleanParameter, setChild, setData, setDebug, setDebugBreak, setEnabled, setFlags, setInheritsFrom, setInheritsFromRef, setIntegerParameter, setLogEnabled, setMetamergeConfig, setModified, setModTS, setName, setName, setNullBehavior, setNullBehaviorValue, setNullDefinition, setNullDefinitionValue, setParameter, setParameter, setParameterPropertySource, setParent, setProtectedParameter, setScript, setScriptEngine, setStringParameter, setSubstitutionMap, setupInheritanceChain, setUseListeners, setUserComment, size, toEntry, updateInheritsFrom, willFlatten
 

Field Detail

EXTERNAL_ATTRIBUTE_MAP_EXTENSION

public static final String EXTERNAL_ATTRIBUTE_MAP_EXTENSION
See Also:
Constant Field Values
Constructor Detail

FileNamespace

public FileNamespace()
Method Detail

lookup

public Object lookup(Object name)
              throws Exception
Description copied from interface: MetamergeConfig
Searches this configuration for a named node.

Specified by:
lookup in interface MetamergeConfig
Overrides:
lookup in class MetamergeConfigImpl
Parameters:
name - The name to lookup
Returns:
The configuration object found
Throws:
Exception

loadAttributeMapFromFile

public AttributeMapConfig loadAttributeMapFromFile(File file)
                                            throws Exception
Reads a property-style attribute map configuration from the specified file.

Parameters:
file - The input file
Returns:
The attribute map config object
Throws:
Exception