Class DefaultPubSubLogic

  • All Implemented Interfaces:
    Logic

    @Bean(name="logic",
          parent=PubSubComponent.class,
          active=true)
    public class DefaultPubSubLogic
    extends java.lang.Object
    implements Logic
    Helper bean containing PubSub logic

    Created by andrzej on 25.12.2016.

    • Constructor Detail

      • DefaultPubSubLogic

        public DefaultPubSubLogic()
    • Method Detail

      • checkAccessPermission

        public void checkAccessPermission​(tigase.xmpp.jid.BareJID serviceJid,
                                          java.lang.String nodeName,
                                          tigase.xmpp.jid.JID senderJid)
                                   throws PubSubException,
                                          tigase.component.exceptions.RepositoryException
        Specified by:
        checkAccessPermission in interface Logic
        Throws:
        PubSubException
        tigase.component.exceptions.RepositoryException
      • prepareNotificationMessage

        public tigase.xml.Element prepareNotificationMessage​(tigase.xmpp.jid.JID from,
                                                             tigase.xmpp.jid.JID to,
                                                             java.lang.String id,
                                                             tigase.xml.Element itemToSend,
                                                             java.util.Map<java.lang.String,​java.lang.String> headers)
        Specified by:
        prepareNotificationMessage in interface Logic
      • hasSenderSubscription

        public boolean hasSenderSubscription​(tigase.xmpp.jid.BareJID bareJid,
                                             IAffiliations affiliations,
                                             ISubscriptions subscriptions)
                                      throws tigase.component.exceptions.RepositoryException
        Specified by:
        hasSenderSubscription in interface Logic
        Throws:
        tigase.component.exceptions.RepositoryException
      • isSenderInRosterGroup

        public boolean isSenderInRosterGroup​(tigase.xmpp.jid.BareJID bareJid,
                                             AbstractNodeConfig nodeConfig,
                                             IAffiliations affiliations,
                                             ISubscriptions subscriptions)
                                      throws tigase.component.exceptions.RepositoryException
        Specified by:
        isSenderInRosterGroup in interface Logic
        Throws:
        tigase.component.exceptions.RepositoryException
      • getPubSubConfig

        protected PubSubConfig getPubSubConfig()