Smack

org.jivesoftware.smackx.packet
Class MUCUser.Item

java.lang.Object
  extended by org.jivesoftware.smackx.packet.MUCUser.Item
Enclosing class:
MUCUser

public static class MUCUser.Item
extends Object

Item child that holds information about roles, affiliation, jids and nicks.

Author:
Gaston Dombiak

Constructor Summary
MUCUser.Item(String affiliation, String role)
          Creates a new item child.
 
Method Summary
 String getActor()
          Returns the actor (JID of an occupant in the room) that was kicked or banned.
 String getAffiliation()
          Returns the occupant's affiliation to the room.
 String getJid()
          Returns the by which an occupant is identified within the context of a room.
 String getNick()
          Returns the new nickname of an occupant that is changing his/her nickname.
 String getReason()
          Returns the reason for the item child.
 String getRole()
          Returns the temporary position or privilege level of an occupant within a room.
 void setActor(String actor)
          Sets the actor (JID of an occupant in the room) that was kicked or banned.
 void setJid(String jid)
          Sets the by which an occupant is identified within the context of a room.
 void setNick(String nick)
          Sets the new nickname of an occupant that is changing his/her nickname.
 void setReason(String reason)
          Sets the reason for the item child.
 String toXML()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MUCUser.Item

public MUCUser.Item(String affiliation,
                    String role)
Creates a new item child.

Parameters:
affiliation - the actor's affiliation to the room
role - the privilege level of an occupant within a room.
Method Detail

getActor

public String getActor()
Returns the actor (JID of an occupant in the room) that was kicked or banned.

Returns:
the JID of an occupant in the room that was kicked or banned.

getReason

public String getReason()
Returns the reason for the item child. The reason is optional and could be used to explain the reason why a user (occupant) was kicked or banned.

Returns:
the reason for the item child.

getAffiliation

public String getAffiliation()
Returns the occupant's affiliation to the room. The affiliation is a semi-permanent association or connection with a room. The possible affiliations are "owner", "admin", "member", and "outcast" (naturally it is also possible to have no affiliation). An affiliation lasts across a user's visits to a room.

Returns:
the actor's affiliation to the room

getJid

public String getJid()
Returns the by which an occupant is identified within the context of a room. If the room is non-anonymous, the JID will be included in the item.

Returns:
the room JID by which an occupant is identified within the room.

getNick

public String getNick()
Returns the new nickname of an occupant that is changing his/her nickname. The new nickname is sent as part of the unavailable presence.

Returns:
the new nickname of an occupant that is changing his/her nickname.

getRole

public String getRole()
Returns the temporary position or privilege level of an occupant within a room. The possible roles are "moderator", "participant", and "visitor" (it is also possible to have no defined role). A role lasts only for the duration of an occupant's visit to a room.

Returns:
the privilege level of an occupant within a room.

setActor

public void setActor(String actor)
Sets the actor (JID of an occupant in the room) that was kicked or banned.

Parameters:
actor - the actor (JID of an occupant in the room) that was kicked or banned.

setReason

public void setReason(String reason)
Sets the reason for the item child. The reason is optional and could be used to explain the reason why a user (occupant) was kicked or banned.

Parameters:
reason - the reason why a user (occupant) was kicked or banned.

setJid

public void setJid(String jid)
Sets the by which an occupant is identified within the context of a room. If the room is non-anonymous, the JID will be included in the item.

Parameters:
jid - the JID by which an occupant is identified within a room.

setNick

public void setNick(String nick)
Sets the new nickname of an occupant that is changing his/her nickname. The new nickname is sent as part of the unavailable presence.

Parameters:
nick - the new nickname of an occupant that is changing his/her nickname.

toXML

public String toXML()

Smack

Copyright © 2003-2007 Jive Software.