Class ModeratorModule

  • All Implemented Interfaces:
    tigase.component.modules.Module

    @Bean(name="admin",
          active=true)
    public class ModeratorModule
    extends AbstractMucModule
    Author:
    bmalkow
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static tigase.criteria.Criteria CRIT  
      static java.lang.String ID  
      • Fields inherited from class tigase.component.modules.AbstractModule

        eventBus, log, writer
      • Fields inherited from interface tigase.component.modules.Module

        EMPTY_FEATURES
    • 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.component.modules.AbstractModule

        fireEvent, getEventBus, getWriter, setEventBus, setWriter, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface tigase.component.modules.Module

        canHandle
    • Field Detail

      • CRIT

        protected static final tigase.criteria.Criteria CRIT
    • Constructor Detail

      • ModeratorModule

        public ModeratorModule()
    • Method Detail

      • 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
      • 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