Package tigase.muc.modules
Class ModeratorModule
- java.lang.Object
-
- tigase.component.modules.AbstractModule<MucContext>
-
- tigase.muc.modules.AbstractMucModule
-
- tigase.muc.modules.ModeratorModule
-
- All Implemented Interfaces:
tigase.component.modules.ContextAware,tigase.component.modules.InitializingModule,tigase.component.modules.Module
public class ModeratorModule extends AbstractMucModule
- Author:
- bmalkow
-
-
Constructor Summary
Constructors Constructor Description ModeratorModule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckItem(Room room, tigase.xml.Element item, tigase.xmpp.JID senderJid, Affiliation senderaAffiliation, Role senderRole)protected static AffiliationgetAffiliation(tigase.xml.Element item)String[]getFeatures()Method descriptiontigase.criteria.CriteriagetModuleCriteria()Method descriptionprotected static StringgetReason(tigase.xml.Element item)protected static RolegetRole(tigase.xml.Element item)voidkickWithoutBroadcast(Room room, String occupantNick, String reason, String actor)Kicking user without sending presence to all other occupant.protected tigase.server.PacketmakePresence(tigase.xmpp.JID destinationJid, tigase.xmpp.BareJID roomJID, Room room, tigase.xmpp.BareJID occupantJid, boolean unavailable, Affiliation affiliation, Role role, String nick, String reason, String actor, String... codes)voidprocess(tigase.server.Packet element)Method descriptionprotected voidprocessGet(tigase.server.Packet element)protected voidprocessMatchingItems(tigase.server.Packet iq, Room room, Affiliation filterAffiliation, Role filterRole, Collection<tigase.muc.modules.ModeratorModule.Item> resultItems)protected voidprocessSet(tigase.server.Packet element)protected voidprocessSetAffiliation(Room room, tigase.xml.Element item, Affiliation newAffiliation, Role newRole, String reason, String actor)protected voidprocessSetRole(Room room, String occupantNick, Role newRole, String reason, String actor)protected voidsendInvitation(Room room, tigase.xmpp.BareJID occupantBareJid, String actor)-
Methods inherited from class tigase.muc.modules.AbstractMucModule
createResultIQ, getNicknameFromJid, sendMucMessage
-
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
CRIT
protected static final tigase.criteria.Criteria CRIT
-
-
Method Detail
-
getAffiliation
protected static Affiliation getAffiliation(tigase.xml.Element item) throws MUCException
- Throws:
MUCException
-
getReason
protected static String getReason(tigase.xml.Element item)
-
getRole
protected static Role getRole(tigase.xml.Element item)
-
checkItem
protected void checkItem(Room room, tigase.xml.Element item, tigase.xmpp.JID senderJid, Affiliation senderaAffiliation, Role senderRole) throws MUCException, tigase.util.TigaseStringprepException
- Throws:
MUCExceptiontigase.util.TigaseStringprepException
-
getFeatures
public String[] getFeatures()
Method description- Returns:
-
getModuleCriteria
public tigase.criteria.Criteria getModuleCriteria()
Method description- Returns:
-
kickWithoutBroadcast
public void kickWithoutBroadcast(Room room, String occupantNick, String reason, String actor) throws tigase.util.TigaseStringprepException
Kicking user without sending presence to all other occupant. Used only to inform occupants that component is stopping.- Throws:
tigase.util.TigaseStringprepException
-
makePresence
protected tigase.server.Packet makePresence(tigase.xmpp.JID destinationJid, tigase.xmpp.BareJID roomJID, Room room, tigase.xmpp.BareJID occupantJid, boolean unavailable, Affiliation affiliation, Role role, String nick, String reason, String actor, String... codes) throws tigase.util.TigaseStringprepException- Throws:
tigase.util.TigaseStringprepException
-
process
public void process(tigase.server.Packet element) throws MUCExceptionMethod description- Parameters:
element-- Throws:
MUCException
-
processGet
protected void processGet(tigase.server.Packet element) throws tigase.component.exceptions.RepositoryException, MUCException- Throws:
tigase.component.exceptions.RepositoryExceptionMUCException
-
processMatchingItems
protected void processMatchingItems(tigase.server.Packet iq, Room room, Affiliation filterAffiliation, Role filterRole, Collection<tigase.muc.modules.ModeratorModule.Item> resultItems) throws tigase.component.exceptions.RepositoryException, MUCException- Throws:
tigase.component.exceptions.RepositoryExceptionMUCException
-
processSet
protected void processSet(tigase.server.Packet element) throws tigase.component.exceptions.RepositoryException, MUCException- Throws:
tigase.component.exceptions.RepositoryExceptionMUCException
-
processSetAffiliation
protected void processSetAffiliation(Room room, tigase.xml.Element item, Affiliation newAffiliation, Role newRole, String reason, String actor) throws tigase.component.exceptions.RepositoryException, tigase.util.TigaseStringprepException
- Throws:
tigase.component.exceptions.RepositoryExceptiontigase.util.TigaseStringprepException
-
processSetRole
protected void processSetRole(Room room, String occupantNick, Role newRole, String reason, String actor) throws tigase.util.TigaseStringprepException
- Throws:
tigase.util.TigaseStringprepException
-
-