Package tigase.pubsub.modules
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected final LeafNodeConfigstatic final String[]Fields inherited from class tigase.pubsub.AbstractPubSubModule
config, log, packetWriter, pubSubLogicFields inherited from class tigase.stats.CounterValue
counter, level, nameFields inherited from interface tigase.component.modules.Module
EMPTY_FEATURES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbroadcastNotification(Executor.Priority priority, tigase.xmpp.jid.BareJID serviceJID, String nodeName, tigase.xml.Element message) voiddoPublishItems(tigase.xmpp.jid.BareJID serviceJID, String nodeName, LeafNodeConfig leafNodeConfig, String publisher, List<tigase.xml.Element> itemsToSend) ensurePepNode(tigase.xmpp.jid.BareJID toJid, String nodeName, tigase.xmpp.jid.BareJID ownerJid, tigase.xml.Element publishOptions) voidgenerateItemsNotifications(tigase.xmpp.jid.BareJID serviceJID, String nodeName, List<tigase.xml.Element> itemsToSend, String uuid, boolean persistInMAM) voidgenerateNodeNotifications(tigase.xmpp.jid.BareJID serviceJID, String nodeName, tigase.xml.Element payload, String uuid, boolean persistInMAM) String[]tigase.criteria.Criteriaprotected tigase.xmpp.jid.JID[]getValidBuddies(tigase.xmpp.jid.BareJID id) voidbooleanisPEPNodeName(String nodeName) static voidprotected voidprotected voidvoidprocess(tigase.server.Packet packet) publishItems(tigase.xmpp.jid.BareJID toJid, String nodeName, tigase.xmpp.jid.JID publisher, List<tigase.xml.Element> itemsToPublish, tigase.xml.Element publishOptions) protected voidpublishLastItem(tigase.xmpp.jid.BareJID serviceJid, String nodeName, tigase.xmpp.jid.JID buddyJid) voidpublishLastItem(tigase.xmpp.jid.BareJID serviceJid, AbstractNodeConfig nodeConfig, tigase.xmpp.jid.JID destinationJID) voidsendNotification(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) voidtrimItems(tigase.xmpp.jid.BareJID serviceJid, String nodeName, Integer maxItems, CollectionItemsOrdering collectionItemsOrdering) Methods inherited from class tigase.pubsub.AbstractPubSubModule
canHandle, getRepository, makeArray, makeArrayMethods inherited from class tigase.stats.StatisticHolderImpl
getStatistics, setStatisticsPrefix, statisticExecutedInMethods inherited from class tigase.stats.Counter
everyHour, everyMinute, everySecond, getPerHour, getPerMinute, getPerSecondMethods inherited from class tigase.stats.CounterValue
getLevel, getName, getValue, inc, setName, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface tigase.stats.StatisticHolder
everyHour, everyMinute, everySecond
-
Field Details
-
AMP_XMLNS
- See Also:
-
SUPPORTED_PEP_XMLNS
-
defaultPepNodeConfig
-
pepNodes
-
-
Constructor Details
-
PublishItemModule
public PublishItemModule()
-
-
Method Details
-
main
-
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.RepositoryExceptionPubSubException
-
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
-
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
- Specified by:
getFeaturesin interfacetigase.component.modules.Module
-
getModuleCriteria
public tigase.criteria.Criteria getModuleCriteria()- Specified by:
getModuleCriteriain interfacetigase.component.modules.Module
-
initialize
public void initialize()- Specified by:
initializein interfacetigase.kernel.beans.Initializable
-
isPEPNodeName
-
process
- Specified by:
processin interfacetigase.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.RepositoryExceptionPubSubException
-
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:
beforeUnregisterin interfacetigase.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
-