com.zion.jbuddy.bots
Class BotMessage

java.lang.Object
  extended by com.zion.jbuddy.bots.BotMessage
All Implemented Interfaces:
BotCall

public class BotMessage
extends Object
implements BotCall

Sends a message to a user.


Constructor Summary
BotMessage(String type, RichContent body)
          Creates a message.
BotMessage(String type, String xhtml)
          Creates a message, using the specified type and XHTML body.
 
Method Summary
 Object clone()
          Returns an exact copy of this message.
 RichContent getBody()
          Returns this message's body.
 String getRecipients()
          Returns the message's recipients.
 String getType()
          Returns this message's type.
 void setBody(RichContent body)
          Sets this message's body.
 void setBody(String xhtml)
          Sets this message's body, using the specified XHTML.
 void setRecipients(String recipients)
          Sets the message's recipients.
 void setType(String type)
          Sets this message's type.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BotMessage

public BotMessage(String type,
                  RichContent body)
Creates a message.


BotMessage

public BotMessage(String type,
                  String xhtml)
Creates a message, using the specified type and XHTML body.

For more information on the XHTML's format, consult the XML documentation included with the framework.

Method Detail

getType

public String getType()
Returns this message's type.

Note that the engine does not interpret message types, with the following exception: incoming type IM or null messages from a user are treated as commands. Applications using the framework may add and interpret any other message types. The Run utility included with the framework uses the JBuddy SDK and its included message types.


setType

public void setType(String type)
Sets this message's type.

This value can contain content variables.


getBody

public RichContent getBody()
Returns this message's body.


setBody

public void setBody(RichContent body)
Sets this message's body.


setBody

public void setBody(String xhtml)
Sets this message's body, using the specified XHTML.

For more information on the XHTML's format, consult the XML documentation included with the framework.


getRecipients

public String getRecipients()
Returns the message's recipients.

This is a comma-delimited list of user names.

Returns:
the recipients, or null

setRecipients

public void setRecipients(String recipients)
Sets the message's recipients.

This is a comma-delimited list of user names. If no recipients are specified, the message will be sent to the user associated with the event that triggered the message.

This value can contain content variables.


clone

public Object clone()
Returns an exact copy of this message.

Overrides:
clone in class Object

toString

public String toString()
Overrides:
toString in class Object


JBuddy is a trademark of Zion Software, LLC in the US and other countries.
Copyright 2000-2008 Zion Software, LLC All Rights Reserved.