Hilbert II - Version 0.03.04

org.qedeq.kernel.config
Class QedeqConfig

java.lang.Object
  extended byorg.qedeq.kernel.config.QedeqConfig

public final class QedeqConfig
extends Object

This class gives a type save access to properties of the application. FIXME mime 20070328: for directory files are different methods used: 1. look relative to getStartDirectory 2. try absolute path Only one way should be used for all.

Version:
$Revision: 1.2 $

Constructor Summary
QedeqConfig(File configDirectory, String configFileName, String description)
          Constructor.
 
Method Summary
 String getBufferDirectory()
          Get local file directory for module buffering.
 String getGenerationDirectory()
          Get local file directory to save generated files in.
 String getLocalModulesDirectory()
          Get directory for newly created QEDEQ module files.
 String getLogFilePath()
          Get local file location for log file.
 String[] getModuleHistory()
          Get history of modules, which were tried to load.
 String[] getPreviouslyCheckedModules()
          Get list of previously checked modules.
 File getStartDirectory()
          Get start directory of this application.
 boolean isAutoReloadLastSessionChecked()
          Get auto reload of last session successfully loaded modules.
 boolean isAutoStartHtmlBrowser()
          Get autostart html mode.
 boolean isDirectResponse()
          Get direct response mode.
 boolean isOldHtml()
          Should old html code be generated?
 void saveModuleHistory(List modules)
          Save history of modules, which were tried to load.
 void setAutoReloadLastSessionChecked(boolean mode)
          Set auto reload checked modules of last session mode.
 void setAutoStartHtmlBrowser(boolean mode)
          Set auto start HTML browser.
 void setBufferDirectory(String location)
          Set local file directory for module buffering.
 void setDirectResponse(boolean mode)
          Set direct response mode.
 void setGenerationDirectory(String location)
          Set local file directory for generated files.
 void setLoadedModules(String[] moduleAddresses)
          Set successfully list of successfully loaded QEDEQ modules.
 void setLocalModulesDirectory(String location)
          Set directory for newly created module files.
 void setOldHtml(boolean mode)
          Set old html code generation flag.
 void store()
          Store properties in config file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QedeqConfig

public QedeqConfig(File configDirectory,
                   String configFileName,
                   String description)
            throws IOException
Constructor.

Parameters:
configDirectory - Directory location of config file.
configFileName - Name of config file.
description - Config file description
Throws:
IOException - Config file couldn't be loaded.
Method Detail

store

public final void store()
                 throws IOException
Store properties in config file.

Throws:
IOException

getGenerationDirectory

public final String getGenerationDirectory()
Get local file directory to save generated files in.

Returns:
Generation directory.

setGenerationDirectory

public final void setGenerationDirectory(String location)
Set local file directory for generated files.

Parameters:
location - generation directory.

getBufferDirectory

public final String getBufferDirectory()
Get local file directory for module buffering.

Returns:
Buffer directory.

setBufferDirectory

public final void setBufferDirectory(String location)
Set local file directory for module buffering. After changing this location the buffer should eventually be cleared.

Parameters:
location - buffer directory.

getLogFilePath

public final String getLogFilePath()
Get local file location for log file.

Returns:
Log file path.

getModuleHistory

public final String[] getModuleHistory()
Get history of modules, which were tried to load.

Returns:
list of modules.

saveModuleHistory

public final void saveModuleHistory(List modules)
Save history of modules, which were tried to load.

Parameters:
modules - list of modules.

getPreviouslyCheckedModules

public final String[] getPreviouslyCheckedModules()
Get list of previously checked modules.

Returns:
list of modules.

setLoadedModules

public final void setLoadedModules(String[] moduleAddresses)
Set successfully list of successfully loaded QEDEQ modules.

Parameters:
moduleAddresses - This modules were successfully checked.

getStartDirectory

public final File getStartDirectory()
Get start directory of this application. TODO mime 20070326: ok?

Returns:
Start directory.

isAutoStartHtmlBrowser

public final boolean isAutoStartHtmlBrowser()
Get autostart html mode.

Returns:
list of modules.

setAutoStartHtmlBrowser

public final void setAutoStartHtmlBrowser(boolean mode)
Set auto start HTML browser.

Parameters:
mode - Auto start?

isDirectResponse

public final boolean isDirectResponse()
Get direct response mode.

Returns:
Direct response mode.

setDirectResponse

public final void setDirectResponse(boolean mode)
Set direct response mode.

Parameters:
mode - enable direct response?

isAutoReloadLastSessionChecked

public boolean isAutoReloadLastSessionChecked()
Get auto reload of last session successfully loaded modules.

Returns:
auto reload enabled?

setAutoReloadLastSessionChecked

public final void setAutoReloadLastSessionChecked(boolean mode)
Set auto reload checked modules of last session mode.

Parameters:
mode - enable auto reload?

isOldHtml

public final boolean isOldHtml()
Should old html code be generated?

Returns:
old html code?

setOldHtml

public final void setOldHtml(boolean mode)
Set old html code generation flag.

Parameters:
mode - set old html code generation?

getLocalModulesDirectory

public final String getLocalModulesDirectory()
Get directory for newly created QEDEQ module files.

Returns:
Directory for newly created QEDEQ modules.

setLocalModulesDirectory

public final void setLocalModulesDirectory(String location)
Set directory for newly created module files. After changing this location the buffer should eventually be cleared.

Parameters:
location - Buffer directory.

Hilbert II - Version 0.03.04

©left GNU General Public Licence
All Rights Reserved.