|
|||||||||||
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
com.ibm.di.config.xml.MetamergeConfigXML
public class MetamergeConfigXML
MetamergeConfigXML is a class that provides support for TDI XML configuration files. It can create new configurations, load and store existing ones. This class provides access to the structure of a TDI configuration as well to its current status.
Field Summary | |
---|---|
static String |
IDI_CREATED
|
static String |
IDI_VERSION
|
static String |
METAMERGE_CONFIG_TAG
|
static String |
METAMERGE_CREATED_TAG
|
static String |
METAMERGE_CREATEDBY_TAG
|
static String |
METAMERGE_MODIFIED_TAG
|
static String |
METAMERGE_MODIFIEDBY_TAG
|
static String |
METAMERGE_VERSION_ID
|
static String |
METAMERGE_VERSION_TAG
|
static String |
SERVER_ENCRYPTED_SIGNATURE
|
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.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 | |
---|---|
MetamergeConfigXML()
|
|
MetamergeConfigXML(Hashtable<String,Object> env)
|
Method Summary | |
---|---|
void |
bind(Object name,
Object obj)
Adds a new object to the configuration at the location specified by name |
void |
commitChanges(Object output,
boolean isSave)
Save XML tree to output stream. |
MetamergeFolder |
createFolder(Object name)
This method creates a folder |
void |
debug(String msg)
|
Element |
findByName(Element root,
Object name)
This method traverses the document tree searching for an element with an attribute (name) equal to name. |
Element |
findOneByName(Element root,
String name)
This method searches the children of an element for an element with an attribute (name) equal to name. |
protected ConfigCache |
getCache()
|
String |
getConfigVersion()
|
String |
getDirectory()
Returns the directory this config is placed in. |
Document |
getDocument()
Returns the XML document object. |
boolean |
getModified()
XML Doc needs to be saved if we have dirty objects in our cache or if there has been any successful bind/rebind/unbind calls. |
OutputStream |
getOutputStream(Object out)
Returns the output stream to which the XML document is written. |
Element |
getRootElement()
Returns the root element of the XML document. |
String |
getShortName()
Gets the shortName attribute of the BaseConfiguration object. |
void |
initializeConfig()
Initializes the XML configuration, including the reading and parsing of the XML file. |
protected Object |
internalLookup(Object namex)
Called by super's lookup |
boolean |
isCommittable()
Returns true if the configuration driver implements the commitChanges method and the current value for PROVIDER_URL is writable. |
boolean |
isDebugMode()
|
boolean |
isOldVersion()
|
boolean |
isReadOnly()
Returns true if this configuration cannot be modified. |
boolean |
isRemote()
|
Enumeration<Binding> |
list()
This method returns an enumeration with the names in the given folder. |
Enumeration<Binding> |
list(Object name)
Returns an enumeration of the immediate children of this node |
void |
logmsg(String msg)
|
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. |
protected void |
removeElement(Object name)
|
void |
rename(Object name,
Object newname)
Renames an object. |
void |
setOutput(Object output)
Changes the output to wich the configuration driver writes its configuration. |
void |
unbind(Object name)
Removes a named object from this configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SERVER_ENCRYPTED_SIGNATURE
public static final String METAMERGE_CONFIG_TAG
public static final String METAMERGE_VERSION_TAG
public static final String METAMERGE_CREATED_TAG
public static final String METAMERGE_CREATEDBY_TAG
public static final String METAMERGE_MODIFIED_TAG
public static final String METAMERGE_MODIFIEDBY_TAG
public static final String METAMERGE_VERSION_ID
public static final String IDI_VERSION
public static final String IDI_CREATED
Constructor Detail |
---|
public MetamergeConfigXML()
public MetamergeConfigXML(Hashtable<String,Object> env) throws Exception
Exception
Method Detail |
---|
public String getConfigVersion()
getConfigVersion
in interface MetamergeConfig
getConfigVersion
in class MetamergeConfigImpl
public boolean isOldVersion()
public void logmsg(String msg)
logmsg
in class MetamergeConfigImpl
public void debug(String msg)
public boolean isDebugMode()
public void initializeConfig() throws Exception
initializeConfig
in interface MetamergeConfig
initializeConfig
in class MetamergeConfigImpl
Exception
protected Object internalLookup(Object namex) throws Exception
internalLookup
in class MetamergeConfigImpl
Exception
public Enumeration<Binding> list() throws Exception
list
in interface MetamergeFolder
list
in class MetamergeConfigImpl
Exception
public Enumeration<Binding> list(Object name) throws Exception
MetamergeConfig
list
in interface MetamergeConfig
list
in class MetamergeConfigImpl
name
- The folder name to list
Exception
public MetamergeFolder createFolder(Object name) throws Exception
createFolder
in interface MetamergeFolder
createFolder
in class MetamergeConfigImpl
name
- Name of sub-folder
Exception
public Element findByName(Element root, Object name) throws Exception
Exception
public Element findOneByName(Element root, String name)
public Element getRootElement()
public Document getDocument()
public void bind(Object name, Object obj) throws Exception
MetamergeConfig
bind
in interface MetamergeConfig
bind
in class MetamergeConfigImpl
name
- Nameobj
- Configuration Object
Exception
public void rebind(Object name, Object obj) throws Exception
MetamergeConfig
rebind
in interface MetamergeConfig
rebind
in class MetamergeConfigImpl
name
- Nameobj
- Configuration Object
Exception
public void rename(Object name, Object newname) throws Exception
MetamergeConfig
rename
in interface MetamergeConfig
rename
in class MetamergeConfigImpl
name
- Current Namenewname
- New name
Exception
public void unbind(Object name) throws Exception
MetamergeConfig
unbind
in interface MetamergeConfig
unbind
in class MetamergeConfigImpl
name
- The object name to remove
Exception
protected void removeElement(Object name) throws Exception
Exception
public void commitChanges(Object output, boolean isSave) throws Exception
commitChanges
in interface MetamergeConfig
commitChanges
in class MetamergeConfigImpl
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 void setOutput(Object output) throws Exception
MetamergeConfig
setOutput
in interface MetamergeConfig
setOutput
in class MetamergeConfigImpl
output
- The new output value
Exception
public boolean isCommittable()
MetamergeConfig
isCommittable
in interface MetamergeConfig
isCommittable
in class MetamergeConfigImpl
public boolean isReadOnly()
MetamergeConfig
isReadOnly
in interface MetamergeConfig
isReadOnly
in class MetamergeConfigImpl
public boolean getModified()
getModified
in interface BaseConfiguration
getModified
in class BaseConfigurationImpl
public BaseConfiguration newInstanceOf(Object typeName) throws Exception
MetamergeConfig
newInstanceOf
in interface MetamergeConfig
newInstanceOf
in class MetamergeConfigImpl
typeName
- The object type to create.
Exception
public OutputStream getOutputStream(Object out) throws Exception
Exception
public boolean isRemote()
isRemote
in interface MetamergeConfig
isRemote
in class MetamergeConfigImpl
public String getShortName()
BaseConfigurationImpl
getShortName
in interface BaseConfiguration
getShortName
in class BaseConfigurationImpl
protected ConfigCache getCache()
public String getDirectory()
MetamergeConfig
getDirectory
in interface MetamergeConfig
getDirectory
in class MetamergeConfigImpl
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |