@Override
    public PublishedItem getPublishedItem(String itemID) {
        if (!isItemRequired()) {
            Log.trace("Get published item {}, but returning null, as node is configured to not require item.", itemID);
            return null;
        }

        final PublishedItem.UniqueIdentifier itemIdentifier = new PublishedItem.UniqueIdentifier( getUniqueIdentifier(), itemID );
        synchronized (this) {
            if (lastPublished != null && lastPublished.getUniqueIdentifier().equals( itemIdentifier )) {
                Log.trace("Get published item {} that is the last published item", itemID);
                return lastPublished;
            }
        }
        final PublishedItem publishedItem = XMPPServer.getInstance().getPubSubModule().getPersistenceProvider().getPublishedItem(this, itemIdentifier);
        Log.trace("Get published item {} from persistence provider{}", itemID, publishedItem == null ? ", but it did not exist there." : ".");
        return publishedItem;
    }
Sends an IQ result with the list of items published to the node. Item ID and payload are always included.
Should only be used for use-cases described in section "6.5 Retrieve Items from a Node" from XEP-0060 (as
opposed to processing of notifications or service discovery, which are allowed to discard payloads).

@param originalRequest the IQ packet sent by a subscriber (or anyone) to get the node items.
@param publishedItems the list of published items to send to the subscriber.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/LeafNode.java