public void shareWithUsersInGroups(@Nonnull final List<String> groupNames, @Nonnull final String displayName) {
        final PersistableMap<String, String> properties = getProperties();
        properties.put(SHARED_ROSTER_SHOW_IN_ROSTER_PROPERTY_KEY, SharedGroupVisibility.usersOfGroups.getDbValue());
        properties.put(SHARED_ROSTER_DISPLAY_NAME_PROPERTY_KEY, displayName);
        properties.put(SHARED_ROSTER_GROUP_LIST_PROPERTY_KEY, String.join(",", groupNames));
    }
Enable contact list group sharing for this group. The group is shared on the contact list of all users in each of
the provided group: every user in this group is added to the contact list of every user in each of the provided
other groups, grouped by the provided display name.

@param groupNames Name of groups for which all users should
@param displayName The name of the group that as shown in the contact lists of users.
xmppserver/src/main/java/org/jivesoftware/openfire/group/Group.java