model
Class LogFile

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

public class LogFile
extends java.io.File

Class LogFile is used to store change events of the tournament (name changes, new entries etc.) in a simple text file.

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 LogFile(java.lang.String pathname)
          Creates a log file in the public data folder specified in Settings.
 
Method Summary
protected  java.lang.String getLogData()
          Returns the contents of the log file
protected  void writeMessage(java.lang.String message)
          Method writes a new text row in the log 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

LogFile

protected LogFile(java.lang.String pathname)
Creates a log file in the public data folder specified in Settings.

Parameters:
pathname - name of the log file
Method Detail

writeMessage

protected void writeMessage(java.lang.String message)
Method writes a new text row in the log file.

Parameters:
message - the string to be written

getLogData

protected java.lang.String getLogData()
                               throws GoException
Returns the contents of the log file

Returns:
a String representation of the log file contents
Throws:
GoException - thrown if the log file cannot be read