Class MUCItem

java.lang.Object
org.jivesoftware.smackx.muc.packet.MUCItem
All Implemented Interfaces:
org.jivesoftware.smack.packet.Element, org.jivesoftware.smack.packet.NamedElement

public class MUCItem extends Object implements org.jivesoftware.smack.packet.NamedElement
Item child that holds information about roles, affiliation, jids and nicks.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    MUCItem(MUCAffiliation affiliation)
     
    MUCItem(MUCAffiliation affiliation, MUCRole role, org.jxmpp.jid.Jid actor, String reason, org.jxmpp.jid.Jid jid, org.jxmpp.jid.parts.Resourcepart nick, org.jxmpp.jid.parts.Resourcepart actorNick)
    Creates a new item child.
    MUCItem(MUCAffiliation affiliation, org.jxmpp.jid.Jid jid)
     
    MUCItem(MUCAffiliation affiliation, org.jxmpp.jid.Jid jid, String reason)
     
     
    MUCItem(MUCRole role, org.jxmpp.jid.parts.Resourcepart nick)
     
    MUCItem(MUCRole role, org.jxmpp.jid.parts.Resourcepart nick, String reason)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.jxmpp.jid.Jid
    Returns the actor (JID of an occupant in the room) that was kicked or banned.
    org.jxmpp.jid.parts.Resourcepart
    Get the nickname of the actor.
    Returns the occupant's affiliation to the room.
     
    org.jxmpp.jid.Jid
    Returns the <room@service/nick> by which an occupant is identified within the context of a room.
    org.jxmpp.jid.parts.Resourcepart
    Returns the new nickname of an occupant that is changing his/her nickname.
    Returns the reason for the item child.
    Returns the temporary position or privilege level of an occupant within a room.
    org.jivesoftware.smack.util.XmlStringBuilder
    toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.jivesoftware.smack.packet.Element

    toXML, toXML
  • Field Details

  • Constructor Details

    • MUCItem

      public MUCItem(MUCAffiliation affiliation)
    • MUCItem

      public MUCItem(MUCRole role)
    • MUCItem

      public MUCItem(MUCRole role, org.jxmpp.jid.parts.Resourcepart nick)
    • MUCItem

      public MUCItem(MUCAffiliation affiliation, org.jxmpp.jid.Jid jid, String reason)
    • MUCItem

      public MUCItem(MUCAffiliation affiliation, org.jxmpp.jid.Jid jid)
    • MUCItem

      public MUCItem(MUCRole role, org.jxmpp.jid.parts.Resourcepart nick, String reason)
    • MUCItem

      public MUCItem(MUCAffiliation affiliation, MUCRole role, org.jxmpp.jid.Jid actor, String reason, org.jxmpp.jid.Jid jid, org.jxmpp.jid.parts.Resourcepart nick, org.jxmpp.jid.parts.Resourcepart actorNick)
      Creates a new item child.
      Parameters:
      affiliation - the actor's affiliation to the room
      role - the privilege level of an occupant within a room.
      actor - TODO javadoc me please
      reason - TODO javadoc me please
      jid - TODO javadoc me please
      nick - TODO javadoc me please
      actorNick - TODO javadoc me please
  • Method Details

    • getActor

      public org.jxmpp.jid.Jid 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.
    • getActorNick

      public org.jxmpp.jid.parts.Resourcepart getActorNick()
      Get the nickname of the actor.
      Returns:
      the nickname of the actor.
      Since:
      4.2
    • 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 MUCAffiliation 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 org.jxmpp.jid.Jid getJid()
      Returns the <room@service/nick> 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 org.jxmpp.jid.parts.Resourcepart 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 MUCRole getRole()
      Returns the temporary position or privilege level of an occupant within a room. The possible roles are "moderator", "participant", "visitor" and "none" (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.
    • toXML

      public org.jivesoftware.smack.util.XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace)
      Specified by:
      toXML in interface org.jivesoftware.smack.packet.Element
    • getElementName

      public String getElementName()
      Specified by:
      getElementName in interface org.jivesoftware.smack.packet.NamedElement