mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-30 02:02:06 +01:00
Improved Javadocs on getPresence method.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2132 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
c47f08557c
commit
41d5c4637e
1 changed files with 8 additions and 6 deletions
|
@ -432,11 +432,13 @@ public class Roster {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the presence info for a particular user, or <tt>null</tt> if there is
|
* Returns the presence info for a particular user, or <tt>null</tt> if the user
|
||||||
* no presence information.
|
* is unavailable (offline) or if no presence information is available, such as
|
||||||
|
* when you are not subscribed to the user's presence updates.
|
||||||
*
|
*
|
||||||
* @param user a fully qualified xmpp ID, e.g. jdoe@example.com
|
* @param user a fully qualified xmpp ID, e.g. jdoe@example.com
|
||||||
* @return the user's presence.
|
* @return the user's current presence, or <tt>null</tt> if the user is unavailable
|
||||||
|
* or if no presence information is available..
|
||||||
*/
|
*/
|
||||||
public Presence getPresence(String user) {
|
public Presence getPresence(String user) {
|
||||||
String key = StringUtils.parseName(user) + "@" + StringUtils.parseServer(user);
|
String key = StringUtils.parseName(user) + "@" + StringUtils.parseServer(user);
|
||||||
|
@ -577,14 +579,14 @@ public class Roster {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the list of groups that the user currently belongs to.
|
// Find the list of groups that the user currently belongs to.
|
||||||
List currentGroupNames = new ArrayList();
|
List currentGroupNames = new ArrayList();
|
||||||
for (Iterator j = entry.getGroups(); j.hasNext(); ) {
|
for (Iterator j = entry.getGroups(); j.hasNext(); ) {
|
||||||
RosterGroup group = (RosterGroup)j.next();
|
RosterGroup group = (RosterGroup)j.next();
|
||||||
currentGroupNames.add(group.getName());
|
currentGroupNames.add(group.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the packet is not of the type REMOVE then add the entry to the groups
|
// If the packet is not of the type REMOVE then add the entry to the groups
|
||||||
if (!RosterPacket.ItemType.REMOVE.equals(item.getItemType())) {
|
if (!RosterPacket.ItemType.REMOVE.equals(item.getItemType())) {
|
||||||
// Create the new list of groups the user belongs to.
|
// Create the new list of groups the user belongs to.
|
||||||
|
@ -593,7 +595,7 @@ public class Roster {
|
||||||
String groupName = (String)k.next();
|
String groupName = (String)k.next();
|
||||||
// Add the group name to the list.
|
// Add the group name to the list.
|
||||||
newGroupNames.add(groupName);
|
newGroupNames.add(groupName);
|
||||||
|
|
||||||
// Add the entry to the group.
|
// Add the entry to the group.
|
||||||
RosterGroup group = getGroup(groupName);
|
RosterGroup group = getGroup(groupName);
|
||||||
if (group == null) {
|
if (group == null) {
|
||||||
|
|
Loading…
Reference in a new issue