Class InMemoryMucRepository

  • All Implemented Interfaces:
    tigase.kernel.beans.Initializable, IMucRepository

    @Bean(name="mucRepository",
          parent=MUCComponent.class,
          active=true)
    public class InMemoryMucRepository
    extends java.lang.Object
    implements IMucRepository, tigase.kernel.beans.Initializable
    Author:
    bmalkow
    • Field Detail

      • rooms

        protected final java.util.Map<tigase.xmpp.jid.BareJID,​RoomWithId> rooms
      • log

        protected java.util.logging.Logger log
    • Constructor Detail

      • InMemoryMucRepository

        public InMemoryMucRepository()
    • Method Detail

      • getRoomAvatar

        public java.lang.String getRoomAvatar​(Room room)
                                       throws tigase.component.exceptions.RepositoryException
        Specified by:
        getRoomAvatar in interface IMucRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • updateRoomAvatar

        public void updateRoomAvatar​(Room room,
                                     java.lang.String encodedAvatar,
                                     java.lang.String hash)
                              throws tigase.component.exceptions.RepositoryException
        Specified by:
        updateRoomAvatar in interface IMucRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • createNewRoom

        public Room createNewRoom​(tigase.xmpp.jid.BareJID roomJID,
                                  tigase.xmpp.jid.JID senderJid)
                           throws tigase.component.exceptions.RepositoryException
        Specified by:
        createNewRoom in interface IMucRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • destroyRoom

        public void destroyRoom​(Room room,
                                tigase.xml.Element destroyElement)
                         throws tigase.component.exceptions.RepositoryException
        Specified by:
        destroyRoom in interface IMucRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • getDefaultRoomConfig

        public RoomConfig getDefaultRoomConfig()
                                        throws tigase.component.exceptions.RepositoryException
        Specified by:
        getDefaultRoomConfig in interface IMucRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • getPublicVisibleRooms

        public java.util.Map<tigase.xmpp.jid.BareJID,​java.lang.String> getPublicVisibleRooms​(java.lang.String domain)
                                                                                            throws tigase.component.exceptions.RepositoryException
        Specified by:
        getPublicVisibleRooms in interface IMucRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • getPublicVisibleRoomsIdList

        public tigase.xmpp.jid.BareJID[] getPublicVisibleRoomsIdList()
                                                              throws tigase.component.exceptions.RepositoryException
        Specified by:
        getPublicVisibleRoomsIdList in interface IMucRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • getRoom

        public Room getRoom​(tigase.xmpp.jid.BareJID roomJID)
                     throws tigase.component.exceptions.RepositoryException
        Specified by:
        getRoom in interface IMucRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • initialize

        public void initialize()
        Specified by:
        initialize in interface tigase.kernel.beans.Initializable
      • isRoomIdExists

        public boolean isRoomIdExists​(java.lang.String newRoomName)
        Specified by:
        isRoomIdExists in interface IMucRepository
        Returns:
      • updateDefaultRoomConfig

        public void updateDefaultRoomConfig​(RoomConfig config)
                                     throws tigase.component.exceptions.RepositoryException
        Specified by:
        updateDefaultRoomConfig in interface IMucRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • removeFromAllRooms

        protected void removeFromAllRooms​(tigase.xmpp.jid.BareJID roomJid)
      • roomConfigChanged

        protected void roomConfigChanged​(RoomConfig roomConfig,
                                         java.util.Set<java.lang.String> modifiedVars)