|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jconfig.handler.AbstractHandler
org.jconfig.handler.BaseXMLHandler
org.jconfig.handler.XMLFileHandler
This class is nearly the same as the InputStreamHandler beside that it takes a file and not the filename.
Constructor Summary | |
XMLFileHandler()
|
|
XMLFileHandler(java.lang.String filename)
|
Method Summary | |
java.io.File |
getFile()
The File that should be "watched" for changes. |
Configuration |
load(java.io.File file,
java.lang.String configurationName)
|
Configuration |
load(java.io.File file,
java.lang.String configName,
ConfigurationParser parser)
|
Configuration |
load(java.lang.String configurationName)
This method loads a configuration and returns it |
Configuration |
load(java.lang.String configurationName,
ConfigurationParser parser)
This method loads a configuration using a specific parser and returns it |
void |
setFile(java.io.File file)
Sets the file that will be processed |
void |
setValidation(boolean validate)
This defines if the file will be vaidated using a DTD. |
void |
store(Configuration configuration)
This method should store all categories and properties. |
Methods inherited from class org.jconfig.handler.BaseXMLHandler |
getEncodingType, setEncoding, store |
Methods inherited from class org.jconfig.handler.AbstractHandler |
addFileListener, fileChanged, fireFireChangedEvent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XMLFileHandler()
public XMLFileHandler(java.lang.String filename)
Method Detail |
public void setFile(java.io.File file)
file
- the filepublic void setValidation(boolean validate)
validate
- defines the validationpublic Configuration load(java.lang.String configurationName) throws ConfigurationManagerException
ConfigurationHandler
load
in interface ConfigurationHandler
configurationName
- the name of the configuration
ConfigurationManagerException
public Configuration load(java.lang.String configurationName, ConfigurationParser parser) throws ConfigurationManagerException
ConfigurationHandler
load
in interface ConfigurationHandler
configurationName
- the name of the configurationparser
- the parser that should be used
ConfigurationManagerException
public Configuration load(java.io.File file, java.lang.String configurationName) throws ConfigurationManagerException
ConfigurationManagerException
public Configuration load(java.io.File file, java.lang.String configName, ConfigurationParser parser) throws ConfigurationManagerException
file
-
ConfigurationManagerException
public void store(Configuration configuration) throws ConfigurationManagerException
store
in interface ConfigurationHandler
configuration
- the Configuration that should be saved
ConfigurationManagerException
public java.io.File getFile()
AbstractHandler
getFile
in class AbstractHandler
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |