com.incesoft.botplatform.sdk
Interface RobotMessage

All Known Implementing Classes:
DefaultRobotMessage

public interface RobotMessage

This class represents a msn chat message.

Author:
LiBo

Field Summary
static int STYLE_ALL
          Font style - bold + italic + strikeout + underline
static int STYLE_BOLD
          Font style - bold
static int STYLE_BOLD_ITALIC
          Font style - bold + underline
static int STYLE_ITALIC
          Font style - italic
static int STYLE_STRIKE
          Font style - strikeout
static int STYLE_UNDERLINE
          Font style - underline
 
Method Summary
 void deregisterEmoticon(java.lang.String shortcut)
          Deregister the emoticon After the invocation of this function, the shortcut appearing in the message will show as plain text.
 int getFontColor()
          Get font color of the message
 java.lang.String getFontName()
          Get font name of the message
 int getFontStyle()
          Get font style of the message, as bold, italic, strikeout, underline
 int getInt()
          A util function to get integer content.
 java.lang.String getSignature()
          Get robot message preface.
 java.lang.String getString()
          Get the plain text of the message
 void registerEmoticon(java.lang.String shortcut, java.lang.String filename)
          Register custom emoticon
 RobotMessage setFontColor(int color)
          Set font color of the message
 RobotMessage setFontName(java.lang.String name)
          Set font name of the message
 RobotMessage setFontStyle(int style)
          Set font style of the message, as bold, italic,strikeout, underline
 RobotMessage setInt(int content)
          A util function to set the message text with integer content using setString(String.valueOf(content))
 RobotMessage setSignature(java.lang.String sig)
          Set robot message preface
 RobotMessage setString(java.lang.String content)
          Set the plain text of the message
 

Field Detail

STYLE_BOLD

static final int STYLE_BOLD
Font style - bold

See Also:
Constant Field Values

STYLE_ITALIC

static final int STYLE_ITALIC
Font style - italic

See Also:
Constant Field Values

STYLE_UNDERLINE

static final int STYLE_UNDERLINE
Font style - underline

See Also:
Constant Field Values

STYLE_STRIKE

static final int STYLE_STRIKE
Font style - strikeout

See Also:
Constant Field Values

STYLE_BOLD_ITALIC

static final int STYLE_BOLD_ITALIC
Font style - bold + underline

See Also:
Constant Field Values

STYLE_ALL

static final int STYLE_ALL
Font style - bold + italic + strikeout + underline

See Also:
Constant Field Values
Method Detail

getString

java.lang.String getString()
Get the plain text of the message


setString

RobotMessage setString(java.lang.String content)
Set the plain text of the message

Returns:
RobotMessage

getInt

int getInt()
           throws java.lang.NumberFormatException
A util function to get integer content. When the content is an integer, this function will return the parsed integer using Integer.parseInt(getString())

Throws:
java.lang.NumberFormatException

setInt

RobotMessage setInt(int content)
A util function to set the message text with integer content using setString(String.valueOf(content))

Returns:
RobotMessage back to the set message

getSignature

java.lang.String getSignature()
Get robot message preface. eg: xxx says.


setSignature

RobotMessage setSignature(java.lang.String sig)
Set robot message preface

Returns:
RobotMessage

getFontName

java.lang.String getFontName()
Get font name of the message


setFontName

RobotMessage setFontName(java.lang.String name)
Set font name of the message

Returns:
RobotMessage

getFontStyle

int getFontStyle()
Get font style of the message, as bold, italic, strikeout, underline


setFontStyle

RobotMessage setFontStyle(int style)
Set font style of the message, as bold, italic,strikeout, underline

Returns:
RobotMessage

getFontColor

int getFontColor()
Get font color of the message


setFontColor

RobotMessage setFontColor(int color)
Set font color of the message

Returns:
RobotMessage

registerEmoticon

void registerEmoticon(java.lang.String shortcut,
                      java.lang.String filename)
Register custom emoticon

Parameters:
shortcut - The shortcut of the emoticon. If shortcut appears in message, it'll show as an icon corresponding to your 'filename'.
filename - The filename of emotion. Submitted to INCE by SP, and a certified file of INCE

deregisterEmoticon

void deregisterEmoticon(java.lang.String shortcut)
Deregister the emoticon After the invocation of this function, the shortcut appearing in the message will show as plain text.