private IQ setDefaultList(IQ packet, JID from, String listName) {
        IQ result = IQ.createResultIQ(packet);
        Element childElement = packet.getChildElement().createCopy();
        result.setChildElement(childElement);

        if (sessionManager.getSessionCount(from.getNode()) > 1) {
            // Current default list is being used by more than one session
            result.setError(PacketError.Condition.conflict);
        }
        else {
            // Get the list
            PrivacyList list = manager.getPrivacyList(from.getNode(), listName);
            if (list != null) {
                // Get the user session
                ClientSession session = sessionManager.getSession(from);
                PrivacyList oldDefaultList = session.getDefaultList();
                manager.changeDefaultList(from.getNode(), list, oldDefaultList);
                // Set the new default list for this session (the only existing session)
                session.setDefaultList(list);
            }
            else {
                // List not found
                result.setError(PacketError.Condition.item_not_found);
            }
        }
        return result;
    }
User has specified a new default list that should be used for all session.

@param packet IQ packet setting new default list for all sessions.
@param from sender of the IQ packet.
@param listName name of the new default list for all sessions.
@return acknowledge of success.
xmppserver/src/main/java/org/jivesoftware/openfire/handler/IQPrivacyHandler.java