|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.config.base.BaseConfigurationImpl
com.ibm.di.config.base.MetamergeConfigImpl
public class MetamergeConfigImpl
Implements MetamergeConfig.
This implementation stores the configuration objects in a file using a private format.
MetamergeConfig,
Serialized Form| Field Summary | |
|---|---|
protected Hashtable<String,String> |
classMap
|
static String |
DEFAULT_FOLDER_IMPL
|
static String[] |
DEFAULT_FOLDER_NAMES
|
protected Hashtable |
env
|
protected ExternalPropertiesDelegator |
externalPropertiesDelegator
|
static Log |
logger
|
| 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 | |
|---|---|
MetamergeConfigImpl()
|
|
MetamergeConfigImpl(Hashtable<String,Object> env)
|
|
| Method Summary | |
|---|---|
void |
addDefaultFolders()
|
Object |
addNameComponent(Object name,
String component,
boolean prefix)
Adds a name component to the NameComponent attribute of the MetamergeConfig object |
void |
bind(Object name,
Object obj)
Adds a new object to the configuration at the location specified by name |
void |
closeConfig()
Close the driver |
void |
commitChanges(Object output)
Tells the configuration driver to save all modified objects. |
void |
commitChanges(Object output,
boolean isSave)
Tells the configuration driver to save all modified objects. |
void |
copy(BaseConfiguration input,
Object destination,
boolean copyRefs)
Copies a configuration object into this configuration. |
MetamergeFolder |
createFolder(Object name)
This method creates a sub-folder in this folder with the given name. |
AssemblyLineConfig |
getAssemblyLine(Object name)
Returns the AssemblyLineConfig object for the named assemblyline. |
String |
getConfigVersion()
|
ConnectorConfig |
getConnector(Object name)
Returns the ConnectorConfig object for the named connector. |
MetamergeFolder |
getDefaultFolder(int folder)
Returns the MetamergeFolder object for the default folder named by folder. |
String |
getDirectory()
Returns the directory this config is placed in. |
Object |
getDriverParameter(Object name)
This method returns the value for a given driver parameter. |
BaseConfiguration |
getDriverParameters()
This method returns the driver parameters as a BaseConfiguration object. |
ExternalPropertiesConfig |
getExternalProperties()
Returns the external properties delegator object for this configuration. |
ExternalPropertiesConfig |
getExternalProperties(Object name)
Returns the ExternalPropertiesConfig object for the named external properties object. |
FileConfig |
getFileConfig()
|
FunctionConfig |
getFunction(Object name)
Returns the FunctionConfig object for the named function. |
String[] |
getNames()
This method returns an array of names contained in this folder. |
NamespaceConfig |
getNamespace(Object name)
Returns the NamespaceConfig object for the named namespace. |
ParserConfig |
getParser(Object name)
Returns the ParserConfig object for the named parser. |
protected String |
getPassword()
|
ScriptConfig |
getScript(Object name)
Returns the ScriptConfig object for the named script. |
SolutionInterface |
getSolutionInterface()
This method returns the SolutionInterface object for this configuration. |
TDIProperties |
getTDIProperties()
This method returns the associated TDIProperties object |
static TreeMap |
getTreeMap(BaseConfiguration base,
Object key)
|
static Vector |
getVector(BaseConfiguration base,
Object key)
|
boolean |
hasPassword()
|
protected void |
initializeClassMap()
|
void |
initializeConfig()
Initialize the driver |
void |
instantiateAllObjects()
This method iterates the entire configuration to create java objects from the config drivers underlying store. |
void |
instantiateAllObjects(MetamergeFolder folder)
|
protected Object |
internalLookup(Object name)
|
boolean |
isCommittable()
Returns true if the configuration driver implements the commitChanges method and the current value for PROVIDER_URL is writable. |
boolean |
isReadOnly()
Returns true if this configuration cannot be modified. |
boolean |
isRemote()
|
Enumeration |
list()
Returns a list of javax.naming.Binding objects for each of this folders child entries. |
Enumeration |
list(Object name)
Returns an enumeration of the immediate children of this node |
void |
logmsg(String msg)
|
Object |
lookup(Object name)
Searches this configuration for a named node. |
Object |
lookupInFolder(String folder,
Object name)
|
BaseConfiguration |
newInstanceOf(int type)
Create new instance of object |
BaseConfiguration |
newInstanceOf(Object typeName)
This method returns a new instance of the object type specified by typeName. |
void |
rebind(Object name,
Object obj)
Adds or replaces a new object to the configuration. |
void |
rename(Object name,
Object newname)
Renames an object. |
void |
setDriverParameter(Object name,
Object value)
This method sets a driver parameter. |
void |
setDriverParameters(BaseConfiguration driverParams)
This method sets the driver parameters from a BaseConfiguration object. |
void |
setFileConfig(FileConfig aFileConfig)
|
void |
setOutput(Object output)
Changes the output to wich the configuration driver writes its configuration. |
String |
toString()
Answers a string containing the name of the config. |
void |
unbind(Object name)
Removes a named object from this configuration. |
boolean |
useEncryption()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Log logger
protected Hashtable env
protected Hashtable<String,String> classMap
protected ExternalPropertiesDelegator externalPropertiesDelegator
public static final String[] DEFAULT_FOLDER_NAMES
public static final String DEFAULT_FOLDER_IMPL
| Constructor Detail |
|---|
public MetamergeConfigImpl()
public MetamergeConfigImpl(Hashtable<String,Object> env)
throws Exception
Exception| Method Detail |
|---|
public boolean useEncryption()
public boolean hasPassword()
protected String getPassword()
public void initializeConfig()
throws Exception
MetamergeConfig
initializeConfig in interface MetamergeConfigException
public void addDefaultFolders()
throws Exception
Exception
public void closeConfig()
throws Exception
MetamergeConfig
closeConfig in interface MetamergeConfigExceptionprotected void initializeClassMap()
protected Object internalLookup(Object name)
throws Exception
Exception
public void commitChanges(Object output)
throws Exception
MetamergeConfig
commitChanges in interface MetamergeConfigoutput - Null or any object supported by the underlying driver.
Exception
public void commitChanges(Object output,
boolean isSave)
throws Exception
MetamergeConfig
commitChanges in interface MetamergeConfigoutput - Null or any object supported by the underlying driver.isSave - true if this is a permanent save, false if this just saves to
e.g. a command window.
Exceptionpublic boolean isCommittable()
MetamergeConfig
isCommittable in interface MetamergeConfigpublic boolean isReadOnly()
MetamergeConfig
isReadOnly in interface MetamergeConfig
public void copy(BaseConfiguration input,
Object destination,
boolean copyRefs)
throws Exception
MetamergeConfig
copy in interface MetamergeConfiginput - Configuration object to be copieddestination - The name of the destination object (javax.naming.Name or
String)copyRefs - If true, copy referenced objects as well (e.g. all inherited
objects)
Exception
public MetamergeFolder createFolder(Object name)
throws Exception
MetamergeFolder
createFolder in interface MetamergeFoldername - Name of sub-folder
Exception
public void setOutput(Object output)
throws Exception
MetamergeConfig
setOutput in interface MetamergeConfigoutput - The new output value
Exception
public MetamergeFolder getDefaultFolder(int folder)
throws Exception
MetamergeConfig
getDefaultFolder in interface MetamergeConfigfolder - The default folder constant
Exception
public Object lookupInFolder(String folder,
Object name)
throws Exception
Exception
public Object lookup(Object name)
throws Exception
MetamergeConfig
lookup in interface MetamergeConfigname - The name to lookup
Exception
public Enumeration list(Object name)
throws Exception
MetamergeConfig
list in interface MetamergeConfigname - The folder name to list
Exception
public Enumeration list()
throws Exception
MetamergeFolder
list in interface MetamergeFolderException
public String[] getNames()
throws Exception
MetamergeFolder
getNames in interface MetamergeFolderException
public void unbind(Object name)
throws Exception
MetamergeConfig
unbind in interface MetamergeConfigname - The object name to remove
Exception
public void bind(Object name,
Object obj)
throws Exception
MetamergeConfig
bind in interface MetamergeConfigname - Nameobj - Configuration Object
Exception
public void rebind(Object name,
Object obj)
throws Exception
MetamergeConfig
rebind in interface MetamergeConfigname - Nameobj - Configuration Object
Exception
public void rename(Object name,
Object newname)
throws Exception
MetamergeConfig
rename in interface MetamergeConfigname - Current Namenewname - New name
Exception
public Object addNameComponent(Object name,
String component,
boolean prefix)
MetamergeConfig
addNameComponent in interface MetamergeConfigname - Null or existing javax.naming.Name objectcomponent - The component to add to nameprefix - If true, component is inserted at beginning of name
public static Vector getVector(BaseConfiguration base,
Object key)
public static TreeMap getTreeMap(BaseConfiguration base,
Object key)
public AssemblyLineConfig getAssemblyLine(Object name)
throws Exception
MetamergeConfig
getAssemblyLine in interface MetamergeConfigname - Name
Exception
public ConnectorConfig getConnector(Object name)
throws Exception
MetamergeConfig
getConnector in interface MetamergeConfigname - Name
Exception
public ParserConfig getParser(Object name)
throws Exception
MetamergeConfig
getParser in interface MetamergeConfigname - Name
Exception
public ScriptConfig getScript(Object name)
throws Exception
MetamergeConfig
getScript in interface MetamergeConfigname - Name
Exception
public FunctionConfig getFunction(Object name)
throws Exception
MetamergeConfig
getFunction in interface MetamergeConfigname - Name
Exception
public NamespaceConfig getNamespace(Object name)
throws Exception
MetamergeConfig
getNamespace in interface MetamergeConfigname - Name
Exception
public BaseConfiguration newInstanceOf(int type)
throws Exception
newInstanceOf in interface MetamergeConfigtype - The object type to create
Exception
public BaseConfiguration newInstanceOf(Object typeName)
throws Exception
MetamergeConfig
newInstanceOf in interface MetamergeConfigtypeName - The object type to create.
Exceptionpublic String toString()
BaseConfigurationImpl
toString in class BaseConfigurationImpl
public ExternalPropertiesConfig getExternalProperties()
throws Exception
getExternalProperties in interface MetamergeConfigException
public ExternalPropertiesConfig getExternalProperties(Object name)
throws Exception
getExternalProperties in interface MetamergeConfigname - The external property object name
Exceptionpublic void logmsg(String msg)
public BaseConfiguration getDriverParameters()
throws Exception
getDriverParameters in interface MetamergeConfigException
public void setDriverParameters(BaseConfiguration driverParams)
throws Exception
setDriverParameters in interface MetamergeConfigdriverParams - The driver parameters
Exception
public Object getDriverParameter(Object name)
throws Exception
getDriverParameter in interface MetamergeConfigname - The name of the driver parameter to retrieve.
Exception
public void setDriverParameter(Object name,
Object value)
throws Exception
setDriverParameter in interface MetamergeConfigname - The driver parameter namevalue - The driver parameter value
Exceptionpublic void setFileConfig(FileConfig aFileConfig)
public FileConfig getFileConfig()
public boolean isRemote()
isRemote in interface MetamergeConfig
public void instantiateAllObjects()
throws Exception
instantiateAllObjects in interface MetamergeConfigException
public void instantiateAllObjects(MetamergeFolder folder)
throws Exception
Exception
public TDIProperties getTDIProperties()
throws Exception
getTDIProperties in interface MetamergeConfigExceptionpublic SolutionInterface getSolutionInterface()
MetamergeConfig
getSolutionInterface in interface MetamergeConfigpublic String getConfigVersion()
getConfigVersion in interface MetamergeConfigpublic String getDirectory()
MetamergeConfig
getDirectory in interface MetamergeConfig
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||