Package tigase.muc.modules
Class ModeratorModule
- java.lang.Object
-
- tigase.component.modules.AbstractModule
-
- tigase.muc.modules.AbstractMucModule
-
- tigase.muc.modules.ModeratorModule
-
- All Implemented Interfaces:
tigase.component.modules.Module
@Bean(name="admin", active=true) 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 void
checkItem(Room room, tigase.xml.Element item, tigase.xmpp.jid.JID senderJid, Affiliation senderaAffiliation, Role senderRole)
protected static Affiliation
getAffiliation(tigase.xml.Element item)
java.lang.String[]
getFeatures()
tigase.criteria.Criteria
getModuleCriteria()
protected static java.lang.String
getReason(tigase.xml.Element item)
protected static Role
getRole(tigase.xml.Element item)
void
kickWithoutBroadcast(Room room, java.lang.String occupantNick, java.lang.String reason, java.lang.String actor)
Kicking user without sending presence to all other occupant.protected tigase.server.Packet
makePresence(tigase.xmpp.jid.JID destinationJid, tigase.xmpp.jid.BareJID roomJID, Room room, tigase.xmpp.jid.BareJID occupantJid, boolean unavailable, Affiliation affiliation, Role role, java.lang.String nick, java.lang.String reason, java.lang.String actor, java.lang.String... codes)
void
process(tigase.server.Packet element)
protected void
processGet(tigase.server.Packet element)
protected void
processMatchingItems(tigase.server.Packet iq, Room room, Affiliation filterAffiliation, Role filterRole, java.util.Collection<tigase.muc.modules.ModeratorModule.Item> resultItems)
protected void
processSet(tigase.server.Packet element)
protected void
processSetAffiliation(Room room, tigase.xml.Element item, Affiliation newAffiliation, Role newRole, java.lang.String reason, java.lang.String actor)
protected void
processSetRole(Room room, java.lang.String occupantNick, Role newRole, java.lang.String reason, java.lang.String actor)
protected void
sendInvitation(Room room, tigase.xmpp.jid.BareJID occupantBareJid, java.lang.String actor)
-
Methods inherited from class tigase.muc.modules.AbstractMucModule
createResultIQ, getNicknameFromJid, sendMucMessage
-
Methods inherited from class tigase.component.modules.AbstractModule
fireEvent, getEventBus, getWriter, setEventBus, setWriter, write, write
-
-
-
-
Field Detail
-
ID
public static final java.lang.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 java.lang.String getReason(tigase.xml.Element item)
-
getRole
protected static Role getRole(tigase.xml.Element item)
-
getFeatures
public java.lang.String[] getFeatures()
-
getModuleCriteria
public tigase.criteria.Criteria getModuleCriteria()
-
kickWithoutBroadcast
public void kickWithoutBroadcast(Room room, java.lang.String occupantNick, java.lang.String reason, java.lang.String actor) throws tigase.util.stringprep.TigaseStringprepException
Kicking user without sending presence to all other occupant. Used only to inform occupants that component is stopping.- Throws:
tigase.util.stringprep.TigaseStringprepException
-
process
public void process(tigase.server.Packet element) throws MUCException
- Throws:
MUCException
-
checkItem
protected void checkItem(Room room, tigase.xml.Element item, tigase.xmpp.jid.JID senderJid, Affiliation senderaAffiliation, Role senderRole) throws MUCException, tigase.util.stringprep.TigaseStringprepException
- Throws:
MUCException
tigase.util.stringprep.TigaseStringprepException
-
makePresence
protected tigase.server.Packet makePresence(tigase.xmpp.jid.JID destinationJid, tigase.xmpp.jid.BareJID roomJID, Room room, tigase.xmpp.jid.BareJID occupantJid, boolean unavailable, Affiliation affiliation, Role role, java.lang.String nick, java.lang.String reason, java.lang.String actor, java.lang.String... codes) throws tigase.util.stringprep.TigaseStringprepException
- Throws:
tigase.util.stringprep.TigaseStringprepException
-
processGet
protected void processGet(tigase.server.Packet element) throws tigase.component.exceptions.RepositoryException, MUCException
- Throws:
tigase.component.exceptions.RepositoryException
MUCException
-
processMatchingItems
protected void processMatchingItems(tigase.server.Packet iq, Room room, Affiliation filterAffiliation, Role filterRole, java.util.Collection<tigase.muc.modules.ModeratorModule.Item> resultItems) throws tigase.component.exceptions.RepositoryException, MUCException
- Throws:
tigase.component.exceptions.RepositoryException
MUCException
-
processSet
protected void processSet(tigase.server.Packet element) throws tigase.component.exceptions.RepositoryException, MUCException
- Throws:
tigase.component.exceptions.RepositoryException
MUCException
-
processSetAffiliation
protected void processSetAffiliation(Room room, tigase.xml.Element item, Affiliation newAffiliation, Role newRole, java.lang.String reason, java.lang.String actor) throws tigase.component.exceptions.RepositoryException, tigase.util.stringprep.TigaseStringprepException
- Throws:
tigase.component.exceptions.RepositoryException
tigase.util.stringprep.TigaseStringprepException
-
processSetRole
protected void processSetRole(Room room, java.lang.String occupantNick, Role newRole, java.lang.String reason, java.lang.String actor) throws tigase.util.stringprep.TigaseStringprepException
- Throws:
tigase.util.stringprep.TigaseStringprepException
-
sendInvitation
protected void sendInvitation(Room room, tigase.xmpp.jid.BareJID occupantBareJid, java.lang.String actor) throws tigase.util.stringprep.TigaseStringprepException
- Throws:
tigase.util.stringprep.TigaseStringprepException
-
-