@Override
    public void entityCapabilitiesChanged( @Nonnull final JID entity,
                                           @Nonnull final EntityCapabilities updatedEntityCapabilities,
                                           @Nonnull final Set<String> featuresAdded,
                                           @Nonnull final Set<String> featuresRemoved,
                                           @Nonnull final Set<String> identitiesAdded,
                                           @Nonnull final Set<String> identitiesRemoved )
    {
        // Look for new +notify features. Those are the nodes that the entity is now interested in.
        final Set<String> nodeIDs = featuresAdded.stream()
            .filter(feature -> feature.endsWith("+notify"))
            .map(feature -> feature.substring(0, feature.length() - "+notify".length()))
            .collect(Collectors.toSet());

        if ( !nodeIDs.isEmpty() )
        {
            Log.debug( "Entity '{}' expressed new interest in receiving notifications for nodes '{}'", entity, String.join( ", ", nodeIDs ) );
            nodes.values().stream()
                .filter( Node::isSendItemSubscribe )
                .filter( node -> nodeIDs.contains( node.getUniqueIdentifier().getNodeId()) )
                .forEach( node -> {
                    final NodeSubscription subscription = node.getSubscription(entity);
                    if (subscription != null && subscription.isActive()) {
                        PublishedItem lastItem = node.getLastPublishedItem();
                        if (lastItem != null) {
                            subscription.sendLastPublishedItem(lastItem);
                        }
                    }
                });
        }
    }
Returns a data access object that can be used to interact with backend storage that holds pubsub data.

This method returns null only when the this instance of PubSubModule has not been initialized yet, or has been
destroyed.

@return The configured and initialized persistence provider
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/PubSubModule.java