Class ModeratorModule

  • All Implemented Interfaces:
    tigase.component.modules.ContextAware, tigase.component.modules.InitializingModule, tigase.component.modules.Module

    public class ModeratorModule
    extends AbstractMucModule
    Author:
    bmalkow
    • Constructor Detail

      • ModeratorModule

        public ModeratorModule()
    • Method Detail

      • 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:
        MUCException
        tigase.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 MUCException
        Method description
        Parameters:
        element -
        Throws:
        MUCException
      • 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,
                                            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,
                                             String reason,
                                             String actor)
                                      throws tigase.component.exceptions.RepositoryException,
                                             tigase.util.TigaseStringprepException
        Throws:
        tigase.component.exceptions.RepositoryException
        tigase.util.TigaseStringprepException
      • processSetRole

        protected void processSetRole​(Room room,
                                      String occupantNick,
                                      Role newRole,
                                      String reason,
                                      String actor)
                               throws tigase.util.TigaseStringprepException
        Throws:
        tigase.util.TigaseStringprepException
      • sendInvitation

        protected void sendInvitation​(Room room,
                                      tigase.xmpp.BareJID occupantBareJid,
                                      String actor)
                               throws tigase.util.TigaseStringprepException
        Parameters:
        room -
        occupantBareJid -
        Throws:
        tigase.util.TigaseStringprepException