settings
Class ConfFile

java.lang.Object
  extended by java.io.File
      extended by settings.ConfFile
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<java.io.File>

public class ConfFile
extends java.io.File

ConfFile is used to read application settings from a file in the file system. At this point the only parameters are the administration password and the tournament ID counter. The counter is also incremented every time a new tournament ID is requested.

See Also:
Serialized Form

Field Summary
private static long serialVersionUID
          UID for serialization
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
protected ConfFile()
          Creates a new ConfFile instance that points to a file in folder Settings.getDataFolder with the filename Settings.CONF_FILE_NAME
 
Method Summary
private  java.lang.String getConfParameter(java.lang.String param_name)
          Returns a given parameter value as a string from the configuration file.
protected  ID getNextTournamentId()
          Increments the tournament ID counter and returns an ID instance created with the old value.
protected  java.lang.String getPassword()
           
private  void setConfParameter(java.lang.String param_name, java.lang.String param_value)
          Sets a given parameter value in the configuration file.
 
Methods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
UID for serialization

See Also:
Constant Field Values
Constructor Detail

ConfFile

protected ConfFile()
Creates a new ConfFile instance that points to a file in folder Settings.getDataFolder with the filename Settings.CONF_FILE_NAME

Method Detail

getPassword

protected java.lang.String getPassword()
                                throws GoException
Throws:
GoException

getNextTournamentId

protected ID getNextTournamentId()
                          throws GoException
Increments the tournament ID counter and returns an ID instance created with the old value.

Throws:
GoException

getConfParameter

private java.lang.String getConfParameter(java.lang.String param_name)
                                   throws GoException
Returns a given parameter value as a string from the configuration file.

Throws:
GoException

setConfParameter

private void setConfParameter(java.lang.String param_name,
                              java.lang.String param_value)
                       throws GoException
Sets a given parameter value in the configuration file.

Throws:
GoException