Class MucDAOMDBean

  • All Implemented Interfaces:
    tigase.db.DataSourceAware, tigase.kernel.beans.Initializable, tigase.kernel.beans.RegistrarBean, tigase.kernel.beans.RegistrarBeanWithDefaultBeanClass, tigase.kernel.beans.UnregisterAware, IMucDAO, tigase.stats.ComponentStatisticsProvider, tigase.stats.StatisticsProviderIfc

    @Bean(name="muc-dao",
          parent=MUCComponent.class,
          active=true)
    public class MucDAOMDBean
    extends tigase.db.beans.MDRepositoryBeanWithStatistics<IMucDAO>
    implements IMucDAO
    Created by andrzej on 16.10.2016.
    • Constructor Detail

      • MucDAOMDBean

        public MucDAOMDBean()
    • Method Detail

      • belongsTo

        public boolean belongsTo​(Class<? extends tigase.server.BasicComponent> component)
        Specified by:
        belongsTo in interface tigase.stats.ComponentStatisticsProvider
      • createRoom

        public Object createRoom​(RoomWithId room)
                          throws tigase.component.exceptions.RepositoryException
        Specified by:
        createRoom in interface IMucDAO
        Throws:
        tigase.component.exceptions.RepositoryException
      • destroyRoom

        public void destroyRoom​(tigase.xmpp.jid.BareJID roomJID)
                         throws tigase.component.exceptions.RepositoryException
        Specified by:
        destroyRoom in interface IMucDAO
        Throws:
        tigase.component.exceptions.RepositoryException
      • getAffiliations

        public Map<tigase.xmpp.jid.BareJID,​RoomAffiliation> getAffiliations​(RoomWithId room)
                                                                           throws tigase.component.exceptions.RepositoryException
        Specified by:
        getAffiliations in interface IMucDAO
        Throws:
        tigase.component.exceptions.RepositoryException
      • getRoom

        public RoomWithId getRoom​(tigase.xmpp.jid.BareJID roomJID)
                           throws tigase.component.exceptions.RepositoryException
        Specified by:
        getRoom in interface IMucDAO
        Throws:
        tigase.component.exceptions.RepositoryException
      • getRoomsJIDList

        public List<tigase.xmpp.jid.BareJID> getRoomsJIDList()
                                                      throws tigase.component.exceptions.RepositoryException
        Specified by:
        getRoomsJIDList in interface IMucDAO
        Throws:
        tigase.component.exceptions.RepositoryException
      • setAffiliation

        public void setAffiliation​(RoomWithId room,
                                   tigase.xmpp.jid.BareJID jid,
                                   RoomAffiliation affiliation)
                            throws tigase.component.exceptions.RepositoryException
        Specified by:
        setAffiliation in interface IMucDAO
        Throws:
        tigase.component.exceptions.RepositoryException
      • updateRoomAvatar

        public void updateRoomAvatar​(RoomWithId room,
                                     String encodedAvatar,
                                     String hash)
                              throws tigase.component.exceptions.RepositoryException
        Specified by:
        updateRoomAvatar in interface IMucDAO
        Throws:
        tigase.component.exceptions.RepositoryException
      • getRoomAvatar

        public String getRoomAvatar​(RoomWithId room)
                             throws tigase.component.exceptions.RepositoryException
        Specified by:
        getRoomAvatar in interface IMucDAO
        Throws:
        tigase.component.exceptions.RepositoryException
      • setSubject

        public void setSubject​(RoomWithId room,
                               String subject,
                               String creatorNickname,
                               Date changeDate)
                        throws tigase.component.exceptions.RepositoryException
        Specified by:
        setSubject in interface IMucDAO
        Throws:
        tigase.component.exceptions.RepositoryException
      • updateRoomConfig

        public void updateRoomConfig​(RoomConfig roomConfig)
                              throws tigase.component.exceptions.RepositoryException
        Specified by:
        updateRoomConfig in interface IMucDAO
        Throws:
        tigase.component.exceptions.RepositoryException
      • getDefaultBeanClass

        public Class<?> getDefaultBeanClass()
        Specified by:
        getDefaultBeanClass in interface tigase.kernel.beans.RegistrarBeanWithDefaultBeanClass
      • setDataSource

        public void setDataSource​(tigase.db.DataSource dataSource)
        Specified by:
        setDataSource in interface tigase.db.DataSourceAware
      • getRepository

        protected IMucDAO getRepository​(String domain)
        Overrides:
        getRepository in class tigase.db.beans.MDRepositoryBeanWithStatistics<IMucDAO>
      • findClassForDataSource

        protected Class<? extends IMucDAO> findClassForDataSource​(tigase.db.DataSource dataSource)
                                                           throws tigase.db.DBInitException
        Specified by:
        findClassForDataSource in class tigase.db.beans.MDRepositoryBean<IMucDAO>
        Throws:
        tigase.db.DBInitException