|
Hilbert II - Version 0.03.04 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.qedeq.kernel.config.ConfigAccess
This class reads entries from property files. This class should not be used outside this package.
Constructor Summary | |
ConfigAccess(File configDirectory,
String configFileName,
String description)
Get access for a config file. |
Method Summary | |
String |
getConfigDescription()
Get description for config file. |
File |
getConfigDirectory()
Get config directory. |
File |
getConfigFile()
Get config file. |
String |
getFileName()
Get config file name. |
int |
getInteger(String name)
Get int property. |
int |
getInteger(String name,
int defaultValue)
Return int property. |
String |
getString(String name)
Return String property. |
String |
getString(String name,
String defaultValue)
Return String property. |
String[] |
getStringProperties(String namePrefix)
Get list of String properties with certain prefix. |
void |
removeProperties(String namePrefix)
Remove properties with certain prefix. |
void |
removeProperty(String name)
Remove property. |
void |
setInteger(String name,
int value)
Set int property. |
void |
setString(String name,
String value)
Set String property. |
void |
store()
Store properties in config. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConfigAccess(File configDirectory, String configFileName, String description) throws IOException
configDirectory
- Directory location of config file.configFileName
- Name of config file.description
- Config file description
IOException
- Config file couldn't be loaded.Method Detail |
public final File getConfigDirectory()
public final String getFileName()
public final File getConfigFile()
public final String getConfigDescription()
public final void store() throws IOException
IOException
- Saving failed.public final String getString(String name)
name
- Get this property.
null
, if property is missing.public final String getString(String name, String defaultValue)
name
- Look for this String propertydefaultValue
- Return this value if property doesn't exist.
public final void setString(String name, String value)
name
- Set this property.value
- Set property to this value.public final String[] getStringProperties(String namePrefix)
namePrefix
- Prefix of seeked property name.
public final void setInteger(String name, int value)
name
- Set this property.value
- Set property to this value.public final int getInteger(String name)
name
- look for this property
IllegalArgumentException
- Property is no valid int value
NullPointerException
- Property doesn't existpublic final int getInteger(String name, int defaultValue)
name
- Look for this integer property.defaultValue
- Return this value if property doesn't exist.
IllegalArgumentException
- Property is no valid int value.public final void removeProperty(String name)
name
- Property to delete.public final void removeProperties(String namePrefix)
module
deletes all.
namePrefix
- Prefix of seeked property name.
|
Hilbert II - Version 0.03.04 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
©left GNU General Public Licence All Rights Reserved. |