Class PublishItemModule

java.lang.Object
tigase.stats.CounterValue
tigase.stats.Counter
tigase.stats.StatisticHolderImpl
tigase.pubsub.AbstractPubSubModule
tigase.pubsub.modules.PublishItemModule
All Implemented Interfaces:
tigase.component.modules.Module, tigase.kernel.beans.Initializable, tigase.kernel.beans.UnregisterAware, tigase.stats.StatisticHolder

@Bean(name="publishItemModule", parent=PubSubComponent.class, active=true) public class PublishItemModule extends AbstractPubSubModule implements tigase.kernel.beans.Initializable, tigase.kernel.beans.UnregisterAware
Implementation of the PubSub component module responsible for publication of new entries on the pubsub nodes.
Version:
5.0.0, 2010.03.27 at 05:21:54 GMT
Author:
Artur Hefczyc
  • Field Details

  • Constructor Details

    • PublishItemModule

      public PublishItemModule()
  • Method Details

    • main

      public static void main(String[] args)
    • doPublishItems

      public void doPublishItems(tigase.xmpp.jid.BareJID serviceJID, String nodeName, LeafNodeConfig leafNodeConfig, String publisher, List<tigase.xml.Element> itemsToSend) throws tigase.component.exceptions.RepositoryException, PubSubException
      Throws:
      tigase.component.exceptions.RepositoryException
      PubSubException
    • generateItemsNotifications

      public void generateItemsNotifications(tigase.xmpp.jid.BareJID serviceJID, String nodeName, List<tigase.xml.Element> itemsToSend, String uuid, boolean persistInMAM) throws tigase.component.exceptions.RepositoryException
      Throws:
      tigase.component.exceptions.RepositoryException
    • generateNodeNotifications

      public void generateNodeNotifications(tigase.xmpp.jid.BareJID serviceJID, String nodeName, tigase.xml.Element payload, String uuid, boolean persistInMAM) throws tigase.component.exceptions.RepositoryException
      Throws:
      tigase.component.exceptions.RepositoryException
    • sendNotification

      public void sendNotification(tigase.xmpp.jid.BareJID serviceJID, String nodeName, tigase.xml.Element item, String uuid, Map<String,String> headers, tigase.xmpp.jid.JID recipient, tigase.xmpp.StanzaType stanzaType)
    • broadcastNotification

      public void broadcastNotification(Executor.Priority priority, tigase.xmpp.jid.BareJID serviceJID, String nodeName, tigase.xml.Element message) throws tigase.component.exceptions.RepositoryException
      Throws:
      tigase.component.exceptions.RepositoryException
    • ensurePepNode

      public AbstractNodeConfig ensurePepNode(tigase.xmpp.jid.BareJID toJid, String nodeName, tigase.xmpp.jid.BareJID ownerJid, tigase.xml.Element publishOptions) throws PubSubException
      Throws:
      PubSubException
    • getFeatures

      public String[] getFeatures()
      Specified by:
      getFeatures in interface tigase.component.modules.Module
    • getModuleCriteria

      public tigase.criteria.Criteria getModuleCriteria()
      Specified by:
      getModuleCriteria in interface tigase.component.modules.Module
    • initialize

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

      public boolean isPEPNodeName(String nodeName)
    • process

      public void process(tigase.server.Packet packet) throws PubSubException
      Specified by:
      process in interface tigase.component.modules.Module
      Throws:
      PubSubException
    • publishItems

      public List<String> publishItems(tigase.xmpp.jid.BareJID toJid, String nodeName, tigase.xmpp.jid.JID publisher, List<tigase.xml.Element> itemsToPublish, tigase.xml.Element publishOptions) throws tigase.component.exceptions.RepositoryException, PubSubException
      Throws:
      tigase.component.exceptions.RepositoryException
      PubSubException
    • publishLastItem

      public void publishLastItem(tigase.xmpp.jid.BareJID serviceJid, AbstractNodeConfig nodeConfig, tigase.xmpp.jid.JID destinationJID) throws tigase.component.exceptions.RepositoryException
      Throws:
      tigase.component.exceptions.RepositoryException
    • trimItems

      public void trimItems(tigase.xmpp.jid.BareJID serviceJid, String nodeName, Integer maxItems, CollectionItemsOrdering collectionItemsOrdering) throws tigase.component.exceptions.RepositoryException
      Throws:
      tigase.component.exceptions.RepositoryException
    • beforeUnregister

      public void beforeUnregister()
      Specified by:
      beforeUnregister in interface tigase.kernel.beans.UnregisterAware
    • getValidBuddies

      protected tigase.xmpp.jid.JID[] getValidBuddies(tigase.xmpp.jid.BareJID id) throws tigase.component.exceptions.RepositoryException
      Throws:
      tigase.component.exceptions.RepositoryException
    • onCapsChange

      @HandleEvent protected void onCapsChange(PresenceCollectorModule.CapsChangeEvent event) throws tigase.util.stringprep.TigaseStringprepException
      Throws:
      tigase.util.stringprep.TigaseStringprepException
    • publishLastItem

      protected void publishLastItem(tigase.xmpp.jid.BareJID serviceJid, String nodeName, tigase.xmpp.jid.JID buddyJid) throws tigase.component.exceptions.RepositoryException
      Throws:
      tigase.component.exceptions.RepositoryException
    • onPresenceChangeEvent

      @HandleEvent protected void onPresenceChangeEvent(PresenceCollectorModule.PresenceChangeEvent event) throws tigase.util.stringprep.TigaseStringprepException
      Throws:
      tigase.util.stringprep.TigaseStringprepException