|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.koala.KConfigBackEnd
public class KConfigBackEnd
Abstract base class for KDE configuration file loading/saving. This class forms the base for all classes that implement some manner of loading/saving to configuration files. It is an abstract base class, meaning that you cannot directly instantiate objects of this class. As of right now, the only back end available is one to read/write to INI-style files, but in the future, other formats may be available, such as XML or a database.
Constructor Summary | |
---|---|
protected |
KConfigBackEnd(java.lang.Class dummy)
|
Method Summary | |
---|---|
void |
changeFileName(java.lang.String _fileName,
java.lang.String _resType,
boolean _useKDEGlobals)
Changes the filenames associated with this back end. |
boolean |
checkConfigFilesWritable(boolean warnUser)
Check whether the config files are writable. |
java.lang.String |
fileName()
Returns the filename as passed to the constructor. |
int |
getConfigState()
Returns the state of the app-config object. |
boolean |
parseConfigFiles()
Parses all configuration files for a configuration object. |
java.lang.String |
resource()
Returns the resource type as passed to the constructor. |
void |
setFileWriteMode(int mode)
Set the file mode for newly created files. |
void |
setLocaleString(java.lang.String _localeString)
Set the locale string that defines the current language. |
void |
sync()
|
void |
sync(boolean bMerge)
Writes configuration data to file(s). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected KConfigBackEnd(java.lang.Class dummy)
Method Detail |
---|
public boolean parseConfigFiles()
public void sync(boolean bMerge)
bMerge
- Specifies whether the old config file already
on disk should be merged in with the data in memory. If true,
data is read off the disk and merged. If false, the on-disk
file is removed and only in-memory data is written out.public void sync()
public void changeFileName(java.lang.String _fileName, java.lang.String _resType, boolean _useKDEGlobals)
_fileName
- the new filename to use_resType
- the resource type of the fileName specified, _if_
it is not an absolute path (otherwise this parameter is ignored)._useKDEGlobals
- specifies whether or not to also parse the
global KDE configuration files.public int getConfigState()
KConfigBase.getConfigState()
public java.lang.String fileName()
public java.lang.String resource()
public void setLocaleString(java.lang.String _localeString)
_localeString
- the identifier of the languageKLocale
public void setFileWriteMode(int mode)
mode
- the filemode (as in chmod)public boolean checkConfigFilesWritable(boolean warnUser)
warnUser
- Warn the user if the configuration files are not writable.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |