com.ondelette.servlet.webforum
Class Message

java.lang.Object
  |
  +--com.ondelette.servlet.webforum.Message
All Implemented Interfaces:
AutorizationConstants, FixedNumericalConstants, java.io.Serializable

public final class Message
extends java.lang.Object
implements AutorizationConstants, java.io.Serializable, FixedNumericalConstants

Message (post) object

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.ondelette.servlet.webforum.AutorizationConstants
ACCOUNTINACTIVE, ADMIN, DELETED, EXECUTIVEMEMBER, IDENTIFIEDGUEST, ILLEGAL, MEMBER, NORMAL, VIPMEMBER
 
Fields inherited from interface com.ondelette.servlet.webforum.FixedNumericalConstants
DEFAULT_NUMBER_OF_RECENT_MESSAGES, MAX_MESSAGE_SIZE_IN_BYTES, MAX_NUMBER_OF_MESSAGES_PER_FORUM, MAX_TEXTFIELD_SIZE, NUMBER_OF_CHARS_TO_COMPARE
 
Constructor Summary
Message(java.lang.String authorString, java.lang.String authorEmail, java.lang.String subjectString, java.lang.String messageString, java.lang.String optionalURLString, java.lang.String urlLinkString)
          Constructor for the Message object
 
Method Summary
 void addReply(MessageReference mr)
          Adds a feature to the Reply attribute of the Message object
 boolean contains(MessageReference mr)
           
 boolean fastCompare(Message m)
           
 java.lang.String getAuthor()
          Gets the author attribute of the Message object
 java.lang.String getAuthorEmail()
          Gets the authorEmail attribute of the Message object
 int getAutorizationLevel()
          Gets the autorizationLevel attribute of the Message object
 java.util.Date getDate()
          Gets the date attribute of the Message object
 java.lang.String getFormattedMessage()
          Gets the formattedMessage attribute of the Message object
 int getInReplyTo()
          Gets the inReplyTo attribute of the Message object
 java.lang.String getMessage()
          Gets the message attribute of the Message object
 int getNumberOfBytes()
          Gets the numberOfBytes attribute of the Message object
 int getNumberOfLines()
          Gets the numberOfLines attribute of the Message object
 java.lang.String getOptionalURL()
          Gets the optional URL (if any)
 java.util.Enumeration getReplies()
          Gets the replies attribute of the Message object
 java.lang.String getSubject()
          Gets the subject attribute of the Message object
 java.lang.String getURLLinkTitle()
          Gets the title for the optional URL (if any)
 boolean hasBeenDeleted()
           
static Message read(java.io.InputStreamReader in)
          Read a message for XML-like file
 boolean removeReply(MessageReference mr)
           
 void setAuthor(java.lang.String author)
          Sets the author attribute of the Message object
 void setAuthorEmail(java.lang.String authorEmail)
          Sets the authorEmail attribute of the Message object
 void setAutorizationLevel(int level)
          Sets the autorizationLevel attribute of the Message object
 void setDate(java.util.Date date)
          Sets the date attribute of the Message object
 void setInReplyTo(int ID)
          Sets the inReplyTo attribute of the Message object
 void setMessage(java.lang.String message)
          Sets the message attribute of the Message object
 void setOptionalURL(java.lang.String url)
          Sets the optional URL (if any)
 void setSubject(java.lang.String subject)
          Sets the subject attribute of the Message object
 void setURLLinkTitle(java.lang.String title)
          Sets the title for the optional URL (if any)
 java.lang.String toString()
           
 void write(java.io.OutputStreamWriter out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message(java.lang.String authorString,
               java.lang.String authorEmail,
               java.lang.String subjectString,
               java.lang.String messageString,
               java.lang.String optionalURLString,
               java.lang.String urlLinkString)
Constructor for the Message object

Parameters:
authorString -
authorEmail -
subjectString -
messageString -
optionalURLString -
urlLinkString -
Since:
0.30
Method Detail

read

public static Message read(java.io.InputStreamReader in)
                    throws java.io.IOException
Read a message for XML-like file

Parameters:
in -
Returns:
Throws:
java.io.IOException
Since:
0.30

setInReplyTo

public void setInReplyTo(int ID)
Sets the inReplyTo attribute of the Message object

Parameters:
ID - The new inReplyTo value
Since:
0.30

setDate

public void setDate(java.util.Date date)
Sets the date attribute of the Message object

Parameters:
date - The new date value
Since:
0.30

setAutorizationLevel

public void setAutorizationLevel(int level)
Sets the autorizationLevel attribute of the Message object

Parameters:
level - The new autorizationLevel value
Since:
0.30

setSubject

public void setSubject(java.lang.String subject)
Sets the subject attribute of the Message object

Since:
0.30

setMessage

public void setMessage(java.lang.String message)
Sets the message attribute of the Message object

Parameters:
message - The new message value
Since:
0.30

setAuthor

public void setAuthor(java.lang.String author)
Sets the author attribute of the Message object

Since:
0.30

setAuthorEmail

public void setAuthorEmail(java.lang.String authorEmail)
Sets the authorEmail attribute of the Message object

Since:
0.30

setOptionalURL

public void setOptionalURL(java.lang.String url)
Sets the optional URL (if any)

Parameters:
url - the URL to set
Since:
0.35

setURLLinkTitle

public void setURLLinkTitle(java.lang.String title)
Sets the title for the optional URL (if any)

Parameters:
title - the title for the URL
Since:
0.35

getReplies

public java.util.Enumeration getReplies()
Gets the replies attribute of the Message object

Returns:
The replies value
Since:
0.30

getInReplyTo

public int getInReplyTo()
Gets the inReplyTo attribute of the Message object

Returns:
The inReplyTo value
Since:
0.30

getDate

public java.util.Date getDate()
Gets the date attribute of the Message object

Returns:
The date value
Since:
0.30

getAutorizationLevel

public int getAutorizationLevel()
Gets the autorizationLevel attribute of the Message object

Returns:
The autorizationLevel value
Since:
0.30

getNumberOfLines

public int getNumberOfLines()
Gets the numberOfLines attribute of the Message object

Returns:
The numberOfLines value
Since:
0.30

getNumberOfBytes

public int getNumberOfBytes()
Gets the numberOfBytes attribute of the Message object

Returns:
The numberOfBytes value
Since:
0.30

getSubject

public java.lang.String getSubject()
Gets the subject attribute of the Message object

Returns:
The subject value
Since:
0.30

getMessage

public java.lang.String getMessage()
Gets the message attribute of the Message object

Returns:
The message value
Since:
0.30

getFormattedMessage

public java.lang.String getFormattedMessage()
Gets the formattedMessage attribute of the Message object

Returns:
The formattedMessage value
Since:
0.30

getAuthor

public java.lang.String getAuthor()
Gets the author attribute of the Message object

Returns:
The author value
Since:
0.30

getAuthorEmail

public java.lang.String getAuthorEmail()
Gets the authorEmail attribute of the Message object

Returns:
The authorEmail value
Since:
0.30

getOptionalURL

public java.lang.String getOptionalURL()
Gets the optional URL (if any)

Returns:
The optional URL that goes with this message
Since:
0.35

getURLLinkTitle

public java.lang.String getURLLinkTitle()
Gets the title for the optional URL (if any)

Returns:
The title for the optional URL that goes with this message
Since:
0.35

contains

public boolean contains(MessageReference mr)
Parameters:
mr -
Returns:
Since:
0.30

hasBeenDeleted

public boolean hasBeenDeleted()
Returns:
Since:
0.30

addReply

public void addReply(MessageReference mr)
Adds a feature to the Reply attribute of the Message object

Parameters:
mr - The feature to be added to the Reply attribute
Since:
0.30

removeReply

public boolean removeReply(MessageReference mr)
Parameters:
mr -
Returns:
Since:
0.30

write

public void write(java.io.OutputStreamWriter out)
           throws java.io.IOException
Parameters:
out -
Throws:
java.io.IOException
Since:
0.30

toString

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

fastCompare

public boolean fastCompare(Message m)