Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.chat
Class ChatMessage

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.main.chat.ChatMessage

public class ChatMessage
extends Object

The ChatMessage class encapsulates message information in order to provide a single object containing all data needed to display a chat message.

Author:
Yana Stamcheva

Constructor Summary
ChatMessage(String contactName, long date, String messageType, String message, String contentType)
          Creates a ChatMessage by specifying all parameters of the message.
ChatMessage(String contactName, long date, String messageType, String messageTitle, String message, String contentType)
          Creates a ChatMessage by specifying all parameters of the message.
ChatMessage(String contactName, String contactDisplayName, long date, String messageType, String message, String contentType)
          Creates a ChatMessage by specifying all parameters of the message.
ChatMessage(String contactName, String contactDisplayName, long date, String messageType, String messageTitle, String message, String contentType)
          Creates a ChatMessage by specifying all parameters of the message.
 
Method Summary
 String getContactDisplayName()
          Returns the display name of the contact sending the message.
 String getContactName()
          Returns the name of the contact sending the message.
 String getContentType()
          Returns the content type (e.g.
 long getDate()
          Returns the date and time of the message.
 String getMessage()
          Returns the content of the message.
 String getMessageTitle()
          Returns the title of the message.
 String getMessageType()
          Returns the type of the message.
 void setMessage(String message)
          Sets the content of the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatMessage

public ChatMessage(String contactName,
                   long date,
                   String messageType,
                   String message,
                   String contentType)
Creates a ChatMessage by specifying all parameters of the message.

Parameters:
contactName - the name of the contact
date - the date and time
messageType - the type (INCOMING or OUTGOING)
message - the content
contentType - the content type (e.g. "text", "text/html", etc.)

ChatMessage

public ChatMessage(String contactName,
                   long date,
                   String messageType,
                   String messageTitle,
                   String message,
                   String contentType)
Creates a ChatMessage by specifying all parameters of the message.

Parameters:
contactName - the name of the contact
contactDisplayName - the contact display name
date - the date and time
messageType - the type (INCOMING or OUTGOING)
message - the content
contentType - the content type (e.g. "text", "text/html", etc.)

ChatMessage

public ChatMessage(String contactName,
                   String contactDisplayName,
                   long date,
                   String messageType,
                   String message,
                   String contentType)
Creates a ChatMessage by specifying all parameters of the message.

Parameters:
contactName - the name of the contact
contactDisplayName - the contact display name
date - the date and time
messageType - the type (INCOMING or OUTGOING)
message - the content
contentType - the content type (e.g. "text", "text/html", etc.)

ChatMessage

public ChatMessage(String contactName,
                   String contactDisplayName,
                   long date,
                   String messageType,
                   String messageTitle,
                   String message,
                   String contentType)
Creates a ChatMessage by specifying all parameters of the message.

Parameters:
contactName - the name of the contact
contactDisplayName - the contact display name
date - the date and time
messageType - the type (INCOMING or OUTGOING)
message - the content
contentType - the content type (e.g. "text", "text/html", etc.)
Method Detail

getContactName

public String getContactName()
Returns the name of the contact sending the message.

Returns:
the name of the contact sending the message.

getContactDisplayName

public String getContactDisplayName()
Returns the display name of the contact sending the message.

Returns:
the display name of the contact sending the message

getDate

public long getDate()
Returns the date and time of the message.

Returns:
the date and time of the message.

getMessageType

public String getMessageType()
Returns the type of the message.

Returns:
the type of the message.

getMessageTitle

public String getMessageTitle()
Returns the title of the message.

Returns:
the title of the message.

getMessage

public String getMessage()
Returns the content of the message.

Returns:
the content of the message.

setMessage

public void setMessage(String message)
Sets the content of the message.

Parameters:
message - the new content

getContentType

public String getContentType()
Returns the content type (e.g. "text", "text/html", etc.).

Returns:
the content type

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.