|
|||||||||||
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.PropertiesFileHandler
The PropertiesFileHandler can read a java-properties file and store all entries inside the default category (general) with the given property name and value. It is meant to be a helper to convert property files into the structure of jConfig. After you have read a property you can use for example the XMLFileHandler to save it in XML form.
Constructor Summary | |
PropertiesFileHandler()
Default constructor |
|
PropertiesFileHandler(java.io.File file)
Constructor with File |
|
PropertiesFileHandler(java.lang.String filename)
Constructor with filename |
Method Summary | |
java.io.File |
getFile()
The File that should be "watched" for changes. |
Configuration |
load(java.lang.String configName)
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)
This method sets the file that will be processed |
void |
store(Configuration configuration)
This method should store all categories and properties. |
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 PropertiesFileHandler()
public PropertiesFileHandler(java.lang.String filename)
filename
- public PropertiesFileHandler(java.io.File file)
file
- Method Detail |
public void setFile(java.io.File file)
file
- the filepublic Configuration load(java.lang.String configName) throws ConfigurationManagerException
ConfigurationHandler
configName
- the name of the configuration
ConfigurationManagerException
public void store(Configuration configuration) throws ConfigurationManagerException
configuration
- the Configuration that should be saved
ConfigurationManagerException
public java.io.File getFile()
AbstractHandler
getFile
in class AbstractHandler
AbstractHandler.getFile()
public Configuration load(java.lang.String configurationName, ConfigurationParser parser) throws ConfigurationManagerException
ConfigurationHandler
configurationName
- the name of the configurationparser
- the parser that should be used
ConfigurationManagerException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |