com.zion.jbuddy
Interface IBuddy


public interface IBuddy

IBuddy represents the exposed attributes of a buddy including presence information. IBuddy objects are presentities (presence aware entities) in a IClient's buddylist and typically represent a remote user whose presence we have subscribed to.


Field Summary
static int ATLUNCH
          A status type indicating that a user is at lunch.
static int AWAY
          A status type indicating that a user is away.
static int BRB
          A status type indicating that a user will be right back.
static int BUSY
          A status type indicating that a user is busy.
static int CUSTOM_AWAY
          A status type indicating that a user has set a custom away message.
static int DND
          A status type indicating that a user wishes to not be disturbed.
static int FREE_TO_CHAT
          A status type indicating that a user is free to chat.
static int IDLE
          A status type indicating that a user is idle.
static int INVISIBLE
          A status type indicating that a user is invisible to other users.
static int NA
          A status type indicating that a user is not available.
static int NOT_AT_DESK
          A status type indicating that a user is not at their desk.
static int NOT_AT_HOME
          A status type indicating that a user is not at home.
static int NOT_IN_OFFICE
          A status type indicating that a user is not in the office.
static int OCCUPIED
          A status type indicating that a user is occupied.
static int OFFLINE
          A status type indicating that a user is not available.
static int ON_VACATION
          A status type indicating that a user is on vacation.
static int ONLINE
          A status type indicating that a user is online and available.
static int ONPHONE
          A status type indicating that a user is on the phone.
static int STEPPED_OUT
          A status type indicating that a user has stepped out.
 
Method Summary
 String getCustomAwayMessage()
          Returns this buddy's custom away/status message.
 String getGroup()
          Returns the name of the Buddy Group that this buddy belongs to.
 int getIdleTime()
          Returns the number of minutes this buddy has been idle for.
 String getName()
          Returns this buddy's unique name.
 String getNickName()
          Returns this buddy's nickname.
 String getOwner()
          Returns a string representing the client and protocol associated with this buddy.
 Properties getProperties()
          Returns the properties associated with this buddy.
 String getProperty(String name)
          Returns the value of a property associated with this buddy, represented as a string.
 int getProtocol()
          Returns this buddy's protocol.
 String getProtocolName()
          Returns the name of this buddy's protocol.
 Date getSignOnTimeStamp()
          Returns the date and time when this buddy signed on to the server.
 int getStatus()
          Returns this buddy's current online status.
 String getStatusAsString()
          Returns this buddy's current online status, represented as a printable string (currently in English).
 Date getStatusTimeStamp()
          Returns the date and time when this buddy last changed its status.
 int getWarningPercent()
          Returns this buddy's warning percentage.
 boolean isMobile()
          Returns true if this buddy is on a mobile device (as indicated by the server).
 

Field Detail

OFFLINE

static final int OFFLINE
A status type indicating that a user is not available.

Valid for all protocols.

See Also:
Constant Field Values

ONLINE

static final int ONLINE
A status type indicating that a user is online and available.

Valid for all protocols.

See Also:
Constant Field Values

AWAY

static final int AWAY
A status type indicating that a user is away.

Valid for AIM, ICQ, JABBER, JSC, MSN, SAMETIME.

See Also:
Constant Field Values

IDLE

static final int IDLE
A status type indicating that a user is idle.

Valid for AIM, ICQ, JSC, MSN, SAMETIME, YIM.

See Also:
Constant Field Values

BRB

static final int BRB
A status type indicating that a user will be right back.

Valid for JSC, MSN, YIM.

See Also:
Constant Field Values

ONPHONE

static final int ONPHONE
A status type indicating that a user is on the phone.

Valid for JSC, MSN, YIM.

See Also:
Constant Field Values

ATLUNCH

static final int ATLUNCH
A status type indicating that a user is at lunch.

Valid for JSC, MSN, YIM.

See Also:
Constant Field Values

BUSY

static final int BUSY
A status type indicating that a user is busy.

Valid for JSC, MSN, YIM.

See Also:
Constant Field Values

NOT_AT_HOME

static final int NOT_AT_HOME
A status type indicating that a user is not at home.

Valid for JSC, YIM.

See Also:
Constant Field Values

NOT_AT_DESK

static final int NOT_AT_DESK
A status type indicating that a user is not at their desk.

Valid for JSC, YIM.

See Also:
Constant Field Values

NOT_IN_OFFICE

static final int NOT_IN_OFFICE
A status type indicating that a user is not in the office.

Valid for JSC, YIM.

See Also:
Constant Field Values

ON_VACATION

static final int ON_VACATION
A status type indicating that a user is on vacation.

Valid for JSC, YIM.

See Also:
Constant Field Values

STEPPED_OUT

static final int STEPPED_OUT
A status type indicating that a user has stepped out.

Valid for JSC, YIM.

See Also:
Constant Field Values

CUSTOM_AWAY

static final int CUSTOM_AWAY
A status type indicating that a user has set a custom away message.

Valid for JSC, YIM.

See Also:
Constant Field Values

DND

static final int DND
A status type indicating that a user wishes to not be disturbed.

Valid for ICQ, JABBER, JSC, SAMETIME.

See Also:
Constant Field Values

INVISIBLE

static final int INVISIBLE
A status type indicating that a user is invisible to other users.

Valid for AIM, ICQ, MSN, YIM, JSC.

See Also:
Constant Field Values

NA

static final int NA
A status type indicating that a user is not available.

Valid for ICQ, JABBER, JSC.

See Also:
Constant Field Values

OCCUPIED

static final int OCCUPIED
A status type indicating that a user is occupied.

Valid for ICQ, JSC.

See Also:
Constant Field Values

FREE_TO_CHAT

static final int FREE_TO_CHAT
A status type indicating that a user is free to chat.

Valid for ICQ, JABBER.

See Also:
Constant Field Values
Method Detail

getName

String getName()
Returns this buddy's unique name. On systems like Lotus Sametime, it may represent a fully qualified LDAP DN


getNickName

String getNickName()
Returns this buddy's nickname. On AIM, this reflects the proper capitalization and spacing of this buddy's name. On other systems, like Lotus Sametime, it represents the displayName of the user such as their firstLast + lastName


getGroup

String getGroup()
Returns the name of the Buddy Group that this buddy belongs to.


getOwner

String getOwner()
Returns a string representing the client and protocol associated with this buddy.

Returns:
IClient.getName() + "@" + IClient.getProtocolName()
Since:
2.1

getProtocol

int getProtocol()
Returns this buddy's protocol.

Returns:
the protocol, such as IClient.AIM or IClient.MSN
Since:
2.2

getProtocolName

String getProtocolName()
Returns the name of this buddy's protocol.

Returns:
one of the following: AIM, ICQ, JABBER, JSC, MSN, SAMETIME, YIM
Since:
2.4

getStatus

int getStatus()
Returns this buddy's current online status.

See Also:
IClient.setStatus(int, String)

getStatusAsString

String getStatusAsString()
Returns this buddy's current online status, represented as a printable string (currently in English).


getIdleTime

int getIdleTime()
Returns the number of minutes this buddy has been idle for.

Valid for AIM, ICQ, JSC, YIM.


isMobile

boolean isMobile()
Returns true if this buddy is on a mobile device (as indicated by the server).

Valid for AIM, JABBER, YIM.

Since:
2.0, 5.1 (JABBER), 6.0 (JSC)

getStatusTimeStamp

Date getStatusTimeStamp()
Returns the date and time when this buddy last changed its status.


getSignOnTimeStamp

Date getSignOnTimeStamp()
Returns the date and time when this buddy signed on to the server.

Valid for AIM, JSC.


getWarningPercent

int getWarningPercent()
Returns this buddy's warning percentage.

Valid for AIM, JSC.


getCustomAwayMessage

String getCustomAwayMessage()
Returns this buddy's custom away/status message.

Returns:
the custom message, or null if it has not been set

getProperties

Properties getProperties()
Returns the properties associated with this buddy.

Since:
2.4

getProperty

String getProperty(String name)
Returns the value of a property associated with this buddy, represented as a string.


Available Properties

customAwayMessage
See getCustomAwayMessage().

group
See getGroup().

idleTime
See getIdleTime().

mobile
See isMobile().

name
See getName().

nickName
See getNickName().

owner
See getOwner().

protocol
See getProtocol().

protocolName
See getProtocolName().

signOnTimeStamp
See getSignOnTimeStamp().

status
See getStatus().

statusAsString
See getStatusAsString().

statusTimeStamp
See getStatusTimeStamp().

warningPercent
See getWarningPercent().

jabber.resourceName
Returns the name of this buddy's resource.
Only valid in JABBER.

Parameters:
name - the name of the property
Returns:
the value of the property, represented as a String, or null if the property doesn't exist
Since:
2.4


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