private RosterItem getImplicitRosterItem(JID user) {
        Set<String> invisibleSharedGroups = implicitFrom.get(user.toBareJID());
        if (invisibleSharedGroups != null) {
            RosterItem rosterItem = new RosterItem(user, RosterItem.SUB_FROM, RosterItem.ASK_NONE,
                    RosterItem.RECV_NONE, "", null);
            rosterItem.setInvisibleSharedGroupsNames(invisibleSharedGroups);
            return rosterItem;
        }
        return null;
    }
Returns a roster item if the specified user has a subscription of type FROM to this
user and the susbcription only exists due to some shared groups or otherwise
{@code null}. This method assumes that this user does not have a subscription to
the contact. In other words, this method will not check if there should be a subscription
of type TO ot BOTH.

@param user the contact to check if he is subscribed to the presence of this user.
@return a roster item if the specified user has a subscription of type FROM to this
        user and the susbcription only exists due to some shared groups or otherwise null.
xmppserver/src/main/java/org/jivesoftware/openfire/roster/Roster.java