public static boolean addingContact(Roster roster, RosterItem item, boolean persistent) {
        boolean answer = persistent;
        if (!listeners.isEmpty()) {
            for (RosterEventListener listener : listeners) {
                try {
                    if (!listener.addingContact(roster, item, persistent)) {
                        answer = false;
                    }
                } catch (Exception e) {
                    Log.warn("An exception occurred while dispatching a 'addingContact' event!", e);
                }
            }
        }
        return answer;
    }
Notifies listeners that a contact is about to be added to a roster. New contacts
may be persisted to the database or not. Listeners may indicate that contact about
to be persisted should not be persisted. Only one listener is needed to return
{@code false} so that the contact is not persisted.

@param roster the roster that was updated.
@param item the new roster item.
@param persistent true if the new contact is going to be saved to the database.
@return false if the contact should not be persisted to the database.
xmppserver/src/main/java/org/jivesoftware/openfire/roster/RosterEventDispatcher.java