org.enhydra.util
Class XMLConfigFile
java.lang.Object
org.enhydra.util.AbsConfigFile
org.enhydra.util.XMLConfigFile
- All Implemented Interfaces:
- org.enhydra.util.ConfigFileInterface
public class XMLConfigFile
- extends org.enhydra.util.AbsConfigFile
XMLConfigFile is used to manipulate application's web.xml file to read its
configuration parameters.
- Version:
- 1.0
- Author:
- Tanja Jovanovic
- See Also:
Config, ConfigFileInterface, AbsConfigFile
Fields inherited from class org.enhydra.util.AbsConfigFile |
comments, config, file, jndiAdapt, jndiParameterNames, order |
Fields inherited from interface org.enhydra.util.ConfigFileInterface |
TRAILING_COMMENT |
Method Summary |
protected void |
readJndi()
Reads application configuration parameters by using JNDI Context. |
void |
write(java.io.OutputStream outputStream)
Writes out a xml file to the OutputStream specified. |
Methods inherited from class org.enhydra.util.AbsConfigFile |
addEntry, addEntry, getComment, getConfig, getFile, removeEntry, setFile, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLConfigFile
public XMLConfigFile()
- Default constructor for an empty config file.
XMLConfigFile
public XMLConfigFile(java.io.File file)
throws com.lutris.util.ConfigException,
java.io.IOException
- Constructor from a File. Allows to later write back the configuration to the
same file.
- Parameters:
file
- The local file to parse.
- Throws:
java.io.IOException
com.lutris.util.ConfigException
XMLConfigFile
public XMLConfigFile(KeywordValueTable kvt)
throws com.lutris.util.ConfigException
- Constructor from a KeywordValueTable.
- Parameters:
kvt
- A KeywordValueTable from which to populate the xml file.
- Throws:
com.lutris.util.ConfigException
readJndi
protected void readJndi()
throws com.lutris.util.ConfigException
- Reads application configuration parameters by using JNDI Context.
- Overrides:
readJndi
in class org.enhydra.util.AbsConfigFile
- Throws:
com.lutris.util.ConfigException
write
public void write(java.io.OutputStream outputStream)
- Writes out a xml file to the OutputStream specified. Note that Objects
other than String or String[] will be converted into a String.
- Specified by:
write
in interface org.enhydra.util.ConfigFileInterface
- Specified by:
write
in class org.enhydra.util.AbsConfigFile
- Parameters:
outputStream
- The output stream on which to write the config file.