org.jlog2.util
Class ConfigHandler

java.lang.Object
  extended by org.jlog2.util.ConfigHandler

public class ConfigHandler
extends java.lang.Object

Manages initial config settings.


Constructor Summary
ConfigHandler()
           
 
Method Summary
protected static java.io.File getConfigFile()
          Determine what the correct path to the config file is and return.
static int getDefaultFileSize()
          Get the default log file size in terms of line number.
protected static java.lang.String getLogFolder()
          Get the logging folder path.
static boolean setConfigFolderPath(java.lang.String configFolderPath)
          Set the folder path to read the config file from.
static boolean setLogFolderPath(java.lang.String thisLogFolderPath)
          Set the folder path to write the log files to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigHandler

public ConfigHandler()
Method Detail

setConfigFolderPath

public static boolean setConfigFolderPath(java.lang.String configFolderPath)
Set the folder path to read the config file from. Just the path and not the file name. This can only be set once.

Parameters:
configFolderPath - the folder path to the config file.
Returns:
true if the config file exists in the folder, false otherwise.

setLogFolderPath

public static boolean setLogFolderPath(java.lang.String thisLogFolderPath)
Set the folder path to write the log files to. Just the path and not the file name. This can only be set once.

Parameters:
thisLogFolderPath - the folder path to write log files to.
Returns:
true if the log file path exists, false otherwise.

getDefaultFileSize

public static int getDefaultFileSize()
Get the default log file size in terms of line number.

Returns:
the value of DEFAULTFILESIZE.

getConfigFile

protected static java.io.File getConfigFile()
Determine what the correct path to the config file is and return.

Returns:
the most suitable file path for the config file.

getLogFolder

protected static java.lang.String getLogFolder()
Get the logging folder path.

Returns:
the value of logFolderPath.