|
|||||||||||
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.SimpleScriptHandler
The SimpleScriptHandler will read in a text file. The file should
be anntotated where every line containing properties should start
with either spaces or tabs. Every other line is considered as
category.
Example:
basic: prop1: hello prop2: world more: simple_one: 1
Constructor Summary | |
SimpleScriptHandler()
Constructs a SimpleScriptHandler. |
Method Summary | |
java.io.File |
getFile()
The File that should be "watched" for changes. |
protected java.util.SortedMap |
getSortedProperties(java.lang.String categoryName,
Configuration configuration)
|
Configuration |
load(java.lang.String configurationName)
This method loads all files that are found ending with "_config.script". |
Configuration |
load(java.lang.String configurationName,
ConfigurationParser parser)
This method loads a configuration using a specific parser and returns it |
Configuration |
load(java.lang.String configurationName,
java.io.InputStream is)
|
Configuration |
load(java.lang.String configurationName,
java.lang.String fileName)
|
void |
store(Configuration configuration)
This method is not yet implemented! |
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 SimpleScriptHandler()
Method Detail |
public Configuration load(java.lang.String configurationName) throws ConfigurationManagerException
configurationName
- The name of the file to be found.
ConfigurationManagerException
- thrown if the "_config.script" isn't foundpublic Configuration load(java.lang.String configurationName, java.lang.String fileName) throws ConfigurationManagerException
ConfigurationManagerException
public Configuration load(java.lang.String configurationName, java.io.InputStream is) throws ConfigurationManagerException
ConfigurationManagerException
public void store(Configuration configuration) throws ConfigurationManagerException
configuration
-
ConfigurationManagerException
protected java.util.SortedMap getSortedProperties(java.lang.String categoryName, Configuration configuration)
public java.io.File getFile()
AbstractHandler
getFile
in class AbstractHandler
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 |