freeforums
Class MessageCollection

java.lang.Object
  |
  +--freeforums.MessageCollection
All Implemented Interfaces:
java.io.Serializable

public class MessageCollection
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  java.lang.String configurationFile
           
protected  int depth
           
protected  java.lang.String filename
           
protected  java.util.Vector messages
           
protected  java.lang.String readmessagesFile
           
protected  java.lang.String UserName
           
 
Constructor Summary
MessageCollection(java.lang.String conf)
           
MessageCollection(java.lang.String in_filename, java.lang.String confFile)
           
 
Method Summary
 boolean deleteMessage(int inMessageId)
           
 java.lang.String getFilename()
           
 Message getMessage(int inMessageId)
           
 Message getMessageByIndex(int index)
           
 int getNumMessages()
           
 java.lang.String listAll()
           
 void newFile()
           
 void open(java.lang.String file_name)
           
 void putMessage(java.lang.String inSubject, java.lang.String inMessageText, java.lang.String inUsername, int inReplyto, java.util.Date inDate)
           
 void save()
           
 void saveAs(java.lang.String new_filename)
           
 java.lang.String toHTML(java.lang.String readFile, java.lang.String inUserName)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

messages

protected java.util.Vector messages

filename

protected java.lang.String filename

configurationFile

protected java.lang.String configurationFile

readmessagesFile

protected java.lang.String readmessagesFile

UserName

protected java.lang.String UserName

depth

protected int depth
Constructor Detail

MessageCollection

public MessageCollection(java.lang.String conf)

MessageCollection

public MessageCollection(java.lang.String in_filename,
                         java.lang.String confFile)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Method Detail

open

public void open(java.lang.String file_name)

newFile

public void newFile()
             throws java.io.IOException,
                    java.lang.ClassNotFoundException

getFilename

public java.lang.String getFilename()

getNumMessages

public int getNumMessages()

getMessage

public Message getMessage(int inMessageId)

getMessageByIndex

public Message getMessageByIndex(int index)

putMessage

public void putMessage(java.lang.String inSubject,
                       java.lang.String inMessageText,
                       java.lang.String inUsername,
                       int inReplyto,
                       java.util.Date inDate)

deleteMessage

public boolean deleteMessage(int inMessageId)

save

public void save()

saveAs

public void saveAs(java.lang.String new_filename)

listAll

public java.lang.String listAll()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toHTML

public java.lang.String toHTML(java.lang.String readFile,
                               java.lang.String inUserName)