public static Collection<String> getShowPresences(PubSubService service, JID subscriber) {
        Map<JID, String> fullPresences = service.getSubscriberPresences().get(subscriber.asBareJID());
        if (fullPresences == null) {
            // User is offline so return empty list
            return Collections.emptyList();
        }
        if (subscriber.getResource() == null) {
            // Subscriber used bared JID so return show value of all connected resources
            return fullPresences.values();
        }
        else {
            // Look for the show value using the full JID
            String show = fullPresences.get(subscriber);
            if (show == null) {
                // User at the specified resource is offline so return empty list
                return Collections.emptyList();
            }
            // User is connected at specified resource so answer list with presence show value
            return Collections.singletonList(show);
        }
    }
Returns the show values of the last know presence of all connected resources of the
specified subscriber. When the subscriber JID is a bare JID then the answered collection
will have many entries one for each connected resource. Moreover, if the user
is offline then an empty collectin is returned. Available show status is represented
by a {@code online} value. The rest of the possible show values as defined in RFC 3921.

@param service the PubSub service this action is to be performed for.
@param subscriber the JID of the subscriber. This is not the JID of the affiliate.
@return an empty collection when offline. Otherwise, a collection with the show value
        of each connected resource.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/PubSubEngine.java