public final class MucAdmin
extends java.lang.Object
The implementation of the <query/>
element in the http://jabber.org/protocol/muc#admin
namespace.
// To create an element with an item of a role
MucAdmin mucAdmin = MucAdmin.withItem(Role.MODERATOR);
This class is immutable.
Modifier and Type | Method and Description |
---|---|
static Item |
createItem(Affiliation affiliation)
Creates an item, which can be used as input parameter for
withItems(rocks.xmpp.extensions.muc.model.Item...) . |
static Item |
createItem(Affiliation affiliation,
Jid jid)
Creates an item, which can be used as input parameter for
withItems(rocks.xmpp.extensions.muc.model.Item...) . |
static Item |
createItem(Affiliation affiliation,
Jid jid,
java.lang.String reason)
Creates an item, which can be used as input parameter for
withItems(rocks.xmpp.extensions.muc.model.Item...) . |
static Item |
createItem(Affiliation affiliation,
Jid jid,
java.lang.String nick,
java.lang.String reason)
Creates an item, which can be used as input parameter for
withItems(rocks.xmpp.extensions.muc.model.Item...) . |
static Item |
createItem(Affiliation affiliation,
Role role,
Jid jid,
java.lang.String nick,
Actor actor,
java.lang.String reason)
Creates an item, which can be used as input parameter for
withItems(rocks.xmpp.extensions.muc.model.Item...) . |
static Item |
createItem(Role role)
Creates an item, which can be used as input parameter for
withItems(rocks.xmpp.extensions.muc.model.Item...) . |
static Item |
createItem(Role role,
java.lang.String nick)
Creates an item, which can be used as input parameter for
withItems(rocks.xmpp.extensions.muc.model.Item...) . |
static Item |
createItem(Role role,
java.lang.String nick,
java.lang.String reason)
Creates an item, which can be used as input parameter for
withItems(rocks.xmpp.extensions.muc.model.Item...) . |
java.util.List<Item> |
getItems()
Gets the items.
|
static MucAdmin |
withItem(Affiliation affiliation)
Creates a
<query/> element with an <item/> child element. |
static MucAdmin |
withItem(Affiliation affiliation,
Jid jid,
java.lang.String reason)
Creates a
<query/> element with an <item/> child element. |
static MucAdmin |
withItem(Affiliation affiliation,
Jid jid,
java.lang.String nick,
java.lang.String reason)
Creates a
<query/> element with an <item/> child element. |
static MucAdmin |
withItem(Role role)
Creates a
<query/> element with an <item/> child element. |
static MucAdmin |
withItem(Role role,
java.lang.String nick,
java.lang.String reason)
Creates a
<query/> element with an <item/> child element. |
static MucAdmin |
withItems(Item... items)
Creates a
<query/> element with <item/> child elements. |
static MucAdmin |
withItems(java.util.List<Item> items)
Creates a
<query/> element with <item/> child elements. |
public static MucAdmin withItem(Role role)
Creates a <query/>
element with an <item/>
child element.
Sample:
<query xmlns='http://jabber.org/protocol/muc#admin'>
<item role='participant'/>
</query>
role
- The role.MucAdmin
instance.public static MucAdmin withItem(Affiliation affiliation)
Creates a <query/>
element with an <item/>
child element.
Sample:
<query xmlns='http://jabber.org/protocol/muc#admin'>
<item affiliation='outcast'/>
</query>
affiliation
- The affiliation.MucAdmin
instance.public static MucAdmin withItem(Role role, java.lang.String nick, java.lang.String reason)
Creates a <query/>
element with an <item/>
child element.
Sample:
<query xmlns='http://jabber.org/protocol/muc#admin'>
<item nick='thirdwitch'
role='participant'>
<reason>A worthy witch indeed!</reason>
</item>
</query>
role
- The role.nick
- The nick.reason
- The reason.MucAdmin
instance.public static MucAdmin withItem(Affiliation affiliation, Jid jid, java.lang.String reason)
Creates a <query/>
element with an <item/>
child element.
Sample:
<query xmlns='http://jabber.org/protocol/muc#admin'>
<item affiliation='outcast'
jid='earlofcambridge@shakespeare.lit'/>
</query>
affiliation
- The affiliation.jid
- The JID.reason
- The reason.MucAdmin
instance.public static MucAdmin withItem(Affiliation affiliation, Jid jid, java.lang.String nick, java.lang.String reason)
Creates a <query/>
element with an <item/>
child element.
Sample:
<query xmlns='http://jabber.org/protocol/muc#admin'>
<item affiliation='member'
jid='hag66@shakespeare.lit'
nick='thirdwitch'>
<reason>A worthy witch indeed!</reason>
</query>
affiliation
- The affiliation.jid
- The JID.nick
- The nick.reason
- The reason.MucAdmin
instance.public static MucAdmin withItems(java.util.List<Item> items)
Creates a <query/>
element with <item/>
child elements.
Sample:
<query xmlns='http://jabber.org/protocol/muc#admin'>
<item affiliation='none'
jid='polonius@hamlet/castle'
nick='Polo'
role='participant'/>
<item affiliation='none'
jid='horatio@hamlet/castle'
nick='horotoro'
role='participant'/>
<item affiliation='member'
jid='hecate@shakespeare.lit/broom'
nick='Hecate'
role='participant'/>
</query>
items
- The items.MucAdmin
instance.public static MucAdmin withItems(Item... items)
Creates a <query/>
element with <item/>
child elements.
items
- The items.MucAdmin
instance.withItems(rocks.xmpp.extensions.muc.model.Item...)
public static Item createItem(Affiliation affiliation, Role role, Jid jid, java.lang.String nick, Actor actor, java.lang.String reason)
Creates an item, which can be used as input parameter for withItems(rocks.xmpp.extensions.muc.model.Item...)
.
affiliation
- The affiliation.role
- The role.jid
- The JID.nick
- The nick.actor
- The actor.reason
- The reason.public static Item createItem(Role role, java.lang.String nick, java.lang.String reason)
Creates an item, which can be used as input parameter for withItems(rocks.xmpp.extensions.muc.model.Item...)
.
role
- The role.nick
- The nick.reason
- The reason.public static Item createItem(Role role, java.lang.String nick)
Creates an item, which can be used as input parameter for withItems(rocks.xmpp.extensions.muc.model.Item...)
.
role
- The role.nick
- The nick.public static Item createItem(Role role)
Creates an item, which can be used as input parameter for withItems(rocks.xmpp.extensions.muc.model.Item...)
.
role
- The role.public static Item createItem(Affiliation affiliation)
Creates an item, which can be used as input parameter for withItems(rocks.xmpp.extensions.muc.model.Item...)
.
affiliation
- The affiliation.public static Item createItem(Affiliation affiliation, Jid jid)
Creates an item, which can be used as input parameter for withItems(rocks.xmpp.extensions.muc.model.Item...)
.
affiliation
- The affiliation.jid
- The JID.public static Item createItem(Affiliation affiliation, Jid jid, java.lang.String reason)
Creates an item, which can be used as input parameter for withItems(rocks.xmpp.extensions.muc.model.Item...)
.
affiliation
- The affiliation.jid
- The JID.reason
- The reason.public static Item createItem(Affiliation affiliation, Jid jid, java.lang.String nick, java.lang.String reason)
Creates an item, which can be used as input parameter for withItems(rocks.xmpp.extensions.muc.model.Item...)
.
affiliation
- The affiliation.jid
- The JID.nick
- The nick.reason
- The reason.public java.util.List<Item> getItems()
Gets the items.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.