Class MixRepository<T>

  • All Implemented Interfaces:
    IMixRepository, tigase.pubsub.repository.cached.CachedPubSubRepository.NodeAffiliationProvider<T>, tigase.pubsub.repository.IItems.IListnener, tigase.pubsub.repository.IPubSubRepository.IListener

    @Bean(name="mixRepository",
          parent=MixComponent.class,
          active=true)
    public class MixRepository<T>
    extends java.lang.Object
    implements IMixRepository, tigase.pubsub.repository.IPubSubRepository.IListener, tigase.pubsub.repository.cached.CachedPubSubRepository.NodeAffiliationProvider<T>
    • Constructor Summary

      Constructors 
      Constructor Description
      MixRepository()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void bannedParticipantFromChannel​(tigase.xmpp.jid.BareJID channelJID, tigase.xmpp.jid.BareJID participantJID)  
      java.util.Optional<java.util.List<tigase.xmpp.jid.BareJID>> getAllowed​(tigase.xmpp.jid.BareJID channelJID)  
      java.util.Optional<java.util.List<tigase.xmpp.jid.BareJID>> getBanned​(tigase.xmpp.jid.BareJID channelJID)  
      ChannelConfiguration getChannelConfiguration​(tigase.xmpp.jid.BareJID channelJID)  
      java.lang.String getChannelName​(tigase.xmpp.jid.BareJID channelJID)  
      tigase.pubsub.repository.ISubscriptions getNodeSubscriptions​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName)  
      protected IParticipant getParticipant​(MixRepository.ParticipantKey key)  
      IParticipant getParticipant​(tigase.xmpp.jid.BareJID channelJID, java.lang.String participantId)  
      IParticipant getParticipant​(tigase.xmpp.jid.BareJID channelJID, tigase.xmpp.jid.BareJID participantRealJID)  
      java.util.Map<java.lang.String,​tigase.pubsub.repository.stateless.UsersAffiliation> getUserAffiliations​(tigase.xmpp.jid.BareJID serviceJid, tigase.xmpp.jid.BareJID jid)  
      protected void invalidateChannelParticipant​(tigase.xmpp.jid.BareJID channelJID, tigase.xmpp.jid.BareJID participantId)  
      void itemDeleted​(tigase.xmpp.jid.BareJID serviceJID, java.lang.String node, java.lang.String id)  
      void itemWritten​(tigase.xmpp.jid.BareJID serviceJID, java.lang.String node, java.lang.String id, java.lang.String publisher, tigase.xml.Element item, java.lang.String uuid)  
      protected ChannelConfiguration loadChannelConfiguration​(tigase.xmpp.jid.BareJID channelJID)  
      tigase.pubsub.repository.cached.IAffiliationsCached newNodeAffiliations​(tigase.xmpp.jid.BareJID serviceJid, java.lang.String nodeName, T nodeId, tigase.pubsub.repository.IPubSubRepository.RepositorySupplier<java.util.Map<tigase.xmpp.jid.BareJID,​tigase.pubsub.repository.stateless.UsersAffiliation>> affiliationSupplier)  
      void removeParticiapnt​(tigase.xmpp.jid.BareJID channelJID, tigase.xmpp.jid.BareJID participantJID)  
      void removeTempParticipant​(tigase.xmpp.jid.BareJID channelJID, tigase.xmpp.jid.JID participantJID)  
      void serviceRemoved​(tigase.xmpp.jid.BareJID userJid)  
      protected void updateChannelConfiguration​(tigase.xmpp.jid.BareJID serviceJID, tigase.xml.Element item)  
      IParticipant updateParticipant​(tigase.xmpp.jid.BareJID channelJID, tigase.xmpp.jid.BareJID participantJID, java.lang.String nick)  
      IParticipant updateTempParticipant​(tigase.xmpp.jid.BareJID channelJID, tigase.xmpp.jid.JID participantJID, java.lang.String nick)  
      boolean validateItem​(tigase.xmpp.jid.BareJID serviceJID, java.lang.String node, java.lang.String id, java.lang.String publisher, tigase.xml.Element item)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MixRepository

        public MixRepository()
    • Method Detail

      • getAllowed

        public java.util.Optional<java.util.List<tigase.xmpp.jid.BareJID>> getAllowed​(tigase.xmpp.jid.BareJID channelJID)
                                                                               throws tigase.component.exceptions.RepositoryException
        Specified by:
        getAllowed in interface IMixRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • getBanned

        public java.util.Optional<java.util.List<tigase.xmpp.jid.BareJID>> getBanned​(tigase.xmpp.jid.BareJID channelJID)
                                                                              throws tigase.component.exceptions.RepositoryException
        Specified by:
        getBanned in interface IMixRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • getParticipant

        public IParticipant getParticipant​(tigase.xmpp.jid.BareJID channelJID,
                                           tigase.xmpp.jid.BareJID participantRealJID)
                                    throws tigase.component.exceptions.RepositoryException
        Specified by:
        getParticipant in interface IMixRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • getParticipant

        public IParticipant getParticipant​(tigase.xmpp.jid.BareJID channelJID,
                                           java.lang.String participantId)
                                    throws tigase.component.exceptions.RepositoryException
        Specified by:
        getParticipant in interface IMixRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • getParticipant

        protected IParticipant getParticipant​(MixRepository.ParticipantKey key)
                                       throws tigase.component.exceptions.RepositoryException
        Throws:
        tigase.component.exceptions.RepositoryException
      • removeParticiapnt

        public void removeParticiapnt​(tigase.xmpp.jid.BareJID channelJID,
                                      tigase.xmpp.jid.BareJID participantJID)
                               throws tigase.component.exceptions.RepositoryException
        Specified by:
        removeParticiapnt in interface IMixRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • updateParticipant

        public IParticipant updateParticipant​(tigase.xmpp.jid.BareJID channelJID,
                                              tigase.xmpp.jid.BareJID participantJID,
                                              java.lang.String nick)
                                       throws tigase.component.exceptions.RepositoryException,
                                              tigase.pubsub.exceptions.PubSubException
        Specified by:
        updateParticipant in interface IMixRepository
        Throws:
        tigase.component.exceptions.RepositoryException
        tigase.pubsub.exceptions.PubSubException
      • updateTempParticipant

        public IParticipant updateTempParticipant​(tigase.xmpp.jid.BareJID channelJID,
                                                  tigase.xmpp.jid.JID participantJID,
                                                  java.lang.String nick)
                                           throws tigase.component.exceptions.RepositoryException,
                                                  tigase.pubsub.exceptions.PubSubException
        Specified by:
        updateTempParticipant in interface IMixRepository
        Throws:
        tigase.component.exceptions.RepositoryException
        tigase.pubsub.exceptions.PubSubException
      • removeTempParticipant

        public void removeTempParticipant​(tigase.xmpp.jid.BareJID channelJID,
                                          tigase.xmpp.jid.JID participantJID)
                                   throws tigase.component.exceptions.RepositoryException
        Specified by:
        removeTempParticipant in interface IMixRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • getChannelName

        public java.lang.String getChannelName​(tigase.xmpp.jid.BareJID channelJID)
                                        throws tigase.component.exceptions.RepositoryException
        Specified by:
        getChannelName in interface IMixRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • getChannelConfiguration

        public ChannelConfiguration getChannelConfiguration​(tigase.xmpp.jid.BareJID channelJID)
                                                     throws tigase.component.exceptions.RepositoryException
        Specified by:
        getChannelConfiguration in interface IMixRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • loadChannelConfiguration

        protected ChannelConfiguration loadChannelConfiguration​(tigase.xmpp.jid.BareJID channelJID)
                                                         throws tigase.component.exceptions.RepositoryException
        Throws:
        tigase.component.exceptions.RepositoryException
      • getNodeSubscriptions

        public tigase.pubsub.repository.ISubscriptions getNodeSubscriptions​(tigase.xmpp.jid.BareJID serviceJid,
                                                                            java.lang.String nodeName)
                                                                     throws tigase.component.exceptions.RepositoryException
        Specified by:
        getNodeSubscriptions in interface IMixRepository
        Throws:
        tigase.component.exceptions.RepositoryException
      • serviceRemoved

        public void serviceRemoved​(tigase.xmpp.jid.BareJID userJid)
        Specified by:
        serviceRemoved in interface tigase.pubsub.repository.IPubSubRepository.IListener
      • itemDeleted

        public void itemDeleted​(tigase.xmpp.jid.BareJID serviceJID,
                                java.lang.String node,
                                java.lang.String id)
        Specified by:
        itemDeleted in interface tigase.pubsub.repository.IItems.IListnener
      • itemWritten

        public void itemWritten​(tigase.xmpp.jid.BareJID serviceJID,
                                java.lang.String node,
                                java.lang.String id,
                                java.lang.String publisher,
                                tigase.xml.Element item,
                                java.lang.String uuid)
        Specified by:
        itemWritten in interface tigase.pubsub.repository.IItems.IListnener
      • validateItem

        public boolean validateItem​(tigase.xmpp.jid.BareJID serviceJID,
                                    java.lang.String node,
                                    java.lang.String id,
                                    java.lang.String publisher,
                                    tigase.xml.Element item)
                             throws tigase.pubsub.exceptions.PubSubException
        Specified by:
        validateItem in interface tigase.pubsub.repository.IItems.IListnener
        Throws:
        tigase.pubsub.exceptions.PubSubException
      • getUserAffiliations

        public java.util.Map<java.lang.String,​tigase.pubsub.repository.stateless.UsersAffiliation> getUserAffiliations​(tigase.xmpp.jid.BareJID serviceJid,
                                                                                                                             tigase.xmpp.jid.BareJID jid)
                                                                                                                      throws tigase.component.exceptions.RepositoryException
        Specified by:
        getUserAffiliations in interface tigase.pubsub.repository.cached.CachedPubSubRepository.NodeAffiliationProvider<T>
        Throws:
        tigase.component.exceptions.RepositoryException
      • newNodeAffiliations

        public tigase.pubsub.repository.cached.IAffiliationsCached newNodeAffiliations​(tigase.xmpp.jid.BareJID serviceJid,
                                                                                       java.lang.String nodeName,
                                                                                       T nodeId,
                                                                                       tigase.pubsub.repository.IPubSubRepository.RepositorySupplier<java.util.Map<tigase.xmpp.jid.BareJID,​tigase.pubsub.repository.stateless.UsersAffiliation>> affiliationSupplier)
                                                                                throws tigase.component.exceptions.RepositoryException
        Specified by:
        newNodeAffiliations in interface tigase.pubsub.repository.cached.CachedPubSubRepository.NodeAffiliationProvider<T>
        Throws:
        tigase.component.exceptions.RepositoryException
      • bannedParticipantFromChannel

        protected void bannedParticipantFromChannel​(tigase.xmpp.jid.BareJID channelJID,
                                                    tigase.xmpp.jid.BareJID participantJID)
                                             throws tigase.component.exceptions.RepositoryException
        Throws:
        tigase.component.exceptions.RepositoryException
      • invalidateChannelParticipant

        protected void invalidateChannelParticipant​(tigase.xmpp.jid.BareJID channelJID,
                                                    tigase.xmpp.jid.BareJID participantId)
                                             throws tigase.component.exceptions.RepositoryException
        Throws:
        tigase.component.exceptions.RepositoryException
      • updateChannelConfiguration

        protected void updateChannelConfiguration​(tigase.xmpp.jid.BareJID serviceJID,
                                                  tigase.xml.Element item)