|
|||||||||||
| 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.
| Nested Class Summary | |
|---|---|
static class |
MetamergeConfigXML.LazyConfig
|
| Field Summary | |
|---|---|
static java.lang.String |
IDI_CREATED
|
static java.lang.String |
IDI_VERSION
|
static java.lang.String |
METAMERGE_CONFIG_TAG
|
static java.lang.String |
METAMERGE_CREATED_TAG
|
static java.lang.String |
METAMERGE_CREATEDBY_TAG
|
static java.lang.String |
METAMERGE_MODIFIED_TAG
|
static java.lang.String |
METAMERGE_MODIFIEDBY_TAG
|
static java.lang.String |
METAMERGE_VERSION_ID
|
static java.lang.String |
METAMERGE_VERSION_TAG
|
static java.lang.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(java.util.Hashtable<java.lang.String,java.lang.Object> env)
|
|
| Method Summary | |
|---|---|
void |
bind(java.lang.Object name,
java.lang.Object obj)
Adds a new object to the configuration at the location specified by name |
void |
commitChanges(java.lang.Object output,
boolean isSave)
Save XML tree to output stream. |
MetamergeFolder |
createFolder(java.lang.Object name)
This method creates a folder |
void |
debug(java.lang.String msg)
|
org.w3c.dom.Element |
findByName(org.w3c.dom.Element root,
java.lang.Object name)
This method traverses the document tree searching for an element with an attribute (name) equal to name. |
org.w3c.dom.Element |
findOneByName(org.w3c.dom.Element root,
java.lang.String name)
This method searches the children of an element for an element with an attribute (name) equal to name. |
protected ConfigCache |
getCache()
|
java.lang.String |
getConfigVersion()
|
java.lang.String |
getDirectory()
Returns the directory this config is placed in. |
org.w3c.dom.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. |
java.io.OutputStream |
getOutputStream(java.lang.Object out)
Returns the output stream to which the XML document is written. |
org.w3c.dom.Element |
getRootElement()
Returns the root element of the XML document. |
java.lang.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 java.lang.Object |
internalLookup(java.lang.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()
|
java.util.Enumeration<javax.naming.Binding> |
list()
This method returns an enumeration with the names in the given folder. |
java.util.Enumeration<javax.naming.Binding> |
list(java.lang.Object name)
Returns an enumeration of the immediate children of this node |
void |
logmsg(java.lang.String msg)
|
BaseConfiguration |
newInstanceOf(java.lang.Object typeName)
This method returns a new instance of the object type specified by typeName. |
void |
rebind(java.lang.Object name,
java.lang.Object obj)
Adds or replaces a new object to the configuration. |
protected void |
removeElement(java.lang.Object name)
|
void |
rename(java.lang.Object name,
java.lang.Object newname)
Renames an object. |
void |
setNoBackupOfOldVersion()
Sets a flag to prevent an old version of the file to be used as backup. |
void |
setOutput(java.lang.Object output)
Changes the output to wich the configuration driver writes its configuration. |
void |
unbind(java.lang.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 java.lang.String SERVER_ENCRYPTED_SIGNATURE
public static final java.lang.String METAMERGE_CONFIG_TAG
public static final java.lang.String METAMERGE_VERSION_TAG
public static final java.lang.String METAMERGE_CREATED_TAG
public static final java.lang.String METAMERGE_CREATEDBY_TAG
public static final java.lang.String METAMERGE_MODIFIED_TAG
public static final java.lang.String METAMERGE_MODIFIEDBY_TAG
public static final java.lang.String METAMERGE_VERSION_ID
public static final java.lang.String IDI_VERSION
public static final java.lang.String IDI_CREATED
| Constructor Detail |
|---|
public MetamergeConfigXML()
public MetamergeConfigXML(java.util.Hashtable<java.lang.String,java.lang.Object> env)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
public java.lang.String getConfigVersion()
getConfigVersion in interface MetamergeConfiggetConfigVersion in class MetamergeConfigImplpublic boolean isOldVersion()
public void logmsg(java.lang.String msg)
logmsg in class MetamergeConfigImplpublic void debug(java.lang.String msg)
public boolean isDebugMode()
public void initializeConfig()
throws java.lang.Exception
initializeConfig in interface MetamergeConfiginitializeConfig in class MetamergeConfigImpljava.lang.Exception
protected java.lang.Object internalLookup(java.lang.Object namex)
throws java.lang.Exception
internalLookup in class MetamergeConfigImpljava.lang.Exception
public java.util.Enumeration<javax.naming.Binding> list()
throws java.lang.Exception
list in interface MetamergeFolderlist in class MetamergeConfigImpljava.lang.Exception
public java.util.Enumeration<javax.naming.Binding> list(java.lang.Object name)
throws java.lang.Exception
MetamergeConfig
list in interface MetamergeConfiglist in class MetamergeConfigImplname - The folder name to list
java.lang.Exception
public MetamergeFolder createFolder(java.lang.Object name)
throws java.lang.Exception
createFolder in interface MetamergeFoldercreateFolder in class MetamergeConfigImplname - Name of sub-folder
java.lang.Exception
public org.w3c.dom.Element findByName(org.w3c.dom.Element root,
java.lang.Object name)
throws java.lang.Exception
java.lang.Exception
public org.w3c.dom.Element findOneByName(org.w3c.dom.Element root,
java.lang.String name)
public org.w3c.dom.Element getRootElement()
public org.w3c.dom.Document getDocument()
public void bind(java.lang.Object name,
java.lang.Object obj)
throws java.lang.Exception
MetamergeConfig
bind in interface MetamergeConfigbind in class MetamergeConfigImplname - Nameobj - Configuration Object
java.lang.Exception
public void rebind(java.lang.Object name,
java.lang.Object obj)
throws java.lang.Exception
MetamergeConfig
rebind in interface MetamergeConfigrebind in class MetamergeConfigImplname - Nameobj - Configuration Object
java.lang.Exception
public void rename(java.lang.Object name,
java.lang.Object newname)
throws java.lang.Exception
MetamergeConfig
rename in interface MetamergeConfigrename in class MetamergeConfigImplname - Current Namenewname - New name
java.lang.Exception
public void unbind(java.lang.Object name)
throws java.lang.Exception
MetamergeConfig
unbind in interface MetamergeConfigunbind in class MetamergeConfigImplname - The object name to remove
java.lang.Exception
protected void removeElement(java.lang.Object name)
throws java.lang.Exception
java.lang.Exception
public void commitChanges(java.lang.Object output,
boolean isSave)
throws java.lang.Exception
commitChanges in interface MetamergeConfigcommitChanges in class MetamergeConfigImploutput - 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.
java.lang.Exception
public void setOutput(java.lang.Object output)
throws java.lang.Exception
MetamergeConfig
setOutput in interface MetamergeConfigsetOutput in class MetamergeConfigImploutput - The new output value
java.lang.Exceptionpublic boolean isCommittable()
MetamergeConfig
isCommittable in interface MetamergeConfigisCommittable in class MetamergeConfigImplpublic boolean isReadOnly()
MetamergeConfig
isReadOnly in interface MetamergeConfigisReadOnly in class MetamergeConfigImplpublic boolean getModified()
getModified in interface BaseConfigurationgetModified in class BaseConfigurationImpl
public BaseConfiguration newInstanceOf(java.lang.Object typeName)
throws java.lang.Exception
MetamergeConfig
newInstanceOf in interface MetamergeConfignewInstanceOf in class MetamergeConfigImpltypeName - The object type to create.
java.lang.Exception
public java.io.OutputStream getOutputStream(java.lang.Object out)
throws java.lang.Exception
java.lang.Exceptionpublic boolean isRemote()
isRemote in interface MetamergeConfigisRemote in class MetamergeConfigImplpublic java.lang.String getShortName()
BaseConfigurationImpl
getShortName in interface BaseConfigurationgetShortName in class BaseConfigurationImplprotected ConfigCache getCache()
public java.lang.String getDirectory()
MetamergeConfig
getDirectory in interface MetamergeConfiggetDirectory in class MetamergeConfigImplpublic void setNoBackupOfOldVersion()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||