|
|||||||||||
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 FormField 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 MetamergeConfig
Exception
public void addDefaultFolders() throws Exception
Exception
public void closeConfig() throws Exception
MetamergeConfig
closeConfig
in interface MetamergeConfig
Exception
protected void initializeClassMap()
protected Object internalLookup(Object name) throws Exception
Exception
public void commitChanges(Object output) throws Exception
MetamergeConfig
commitChanges
in interface MetamergeConfig
output
- Null or any object supported by the underlying driver.
Exception
public void commitChanges(Object output, boolean isSave) throws Exception
MetamergeConfig
commitChanges
in interface MetamergeConfig
output
- 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.
Exception
public boolean isCommittable()
MetamergeConfig
isCommittable
in interface MetamergeConfig
public boolean isReadOnly()
MetamergeConfig
isReadOnly
in interface MetamergeConfig
public void copy(BaseConfiguration input, Object destination, boolean copyRefs) throws Exception
MetamergeConfig
copy
in interface MetamergeConfig
input
- 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 MetamergeFolder
name
- Name of sub-folder
Exception
public void setOutput(Object output) throws Exception
MetamergeConfig
setOutput
in interface MetamergeConfig
output
- The new output value
Exception
public MetamergeFolder getDefaultFolder(int folder) throws Exception
MetamergeConfig
getDefaultFolder
in interface MetamergeConfig
folder
- 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 MetamergeConfig
name
- The name to lookup
Exception
public Enumeration list(Object name) throws Exception
MetamergeConfig
list
in interface MetamergeConfig
name
- The folder name to list
Exception
public Enumeration list() throws Exception
MetamergeFolder
list
in interface MetamergeFolder
Exception
public String[] getNames() throws Exception
MetamergeFolder
getNames
in interface MetamergeFolder
Exception
public void unbind(Object name) throws Exception
MetamergeConfig
unbind
in interface MetamergeConfig
name
- The object name to remove
Exception
public void bind(Object name, Object obj) throws Exception
MetamergeConfig
bind
in interface MetamergeConfig
name
- Nameobj
- Configuration Object
Exception
public void rebind(Object name, Object obj) throws Exception
MetamergeConfig
rebind
in interface MetamergeConfig
name
- Nameobj
- Configuration Object
Exception
public void rename(Object name, Object newname) throws Exception
MetamergeConfig
rename
in interface MetamergeConfig
name
- Current Namenewname
- New name
Exception
public Object addNameComponent(Object name, String component, boolean prefix)
MetamergeConfig
addNameComponent
in interface MetamergeConfig
name
- 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 MetamergeConfig
name
- Name
Exception
public ConnectorConfig getConnector(Object name) throws Exception
MetamergeConfig
getConnector
in interface MetamergeConfig
name
- Name
Exception
public ParserConfig getParser(Object name) throws Exception
MetamergeConfig
getParser
in interface MetamergeConfig
name
- Name
Exception
public ScriptConfig getScript(Object name) throws Exception
MetamergeConfig
getScript
in interface MetamergeConfig
name
- Name
Exception
public FunctionConfig getFunction(Object name) throws Exception
MetamergeConfig
getFunction
in interface MetamergeConfig
name
- Name
Exception
public NamespaceConfig getNamespace(Object name) throws Exception
MetamergeConfig
getNamespace
in interface MetamergeConfig
name
- Name
Exception
public BaseConfiguration newInstanceOf(int type) throws Exception
newInstanceOf
in interface MetamergeConfig
type
- The object type to create
Exception
public BaseConfiguration newInstanceOf(Object typeName) throws Exception
MetamergeConfig
newInstanceOf
in interface MetamergeConfig
typeName
- The object type to create.
Exception
public String toString()
BaseConfigurationImpl
toString
in class BaseConfigurationImpl
public ExternalPropertiesConfig getExternalProperties() throws Exception
getExternalProperties
in interface MetamergeConfig
Exception
public ExternalPropertiesConfig getExternalProperties(Object name) throws Exception
getExternalProperties
in interface MetamergeConfig
name
- The external property object name
Exception
public void logmsg(String msg)
public BaseConfiguration getDriverParameters() throws Exception
getDriverParameters
in interface MetamergeConfig
Exception
public void setDriverParameters(BaseConfiguration driverParams) throws Exception
setDriverParameters
in interface MetamergeConfig
driverParams
- The driver parameters
Exception
public Object getDriverParameter(Object name) throws Exception
getDriverParameter
in interface MetamergeConfig
name
- The name of the driver parameter to retrieve.
Exception
public void setDriverParameter(Object name, Object value) throws Exception
setDriverParameter
in interface MetamergeConfig
name
- The driver parameter namevalue
- The driver parameter value
Exception
public void setFileConfig(FileConfig aFileConfig)
public FileConfig getFileConfig()
public boolean isRemote()
isRemote
in interface MetamergeConfig
public void instantiateAllObjects() throws Exception
instantiateAllObjects
in interface MetamergeConfig
Exception
public void instantiateAllObjects(MetamergeFolder folder) throws Exception
Exception
public TDIProperties getTDIProperties() throws Exception
getTDIProperties
in interface MetamergeConfig
Exception
public SolutionInterface getSolutionInterface()
MetamergeConfig
getSolutionInterface
in interface MetamergeConfig
public String getConfigVersion()
getConfigVersion
in interface MetamergeConfig
public String getDirectory()
MetamergeConfig
getDirectory
in interface MetamergeConfig
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |