public PrivacyList createPrivacyList(String username, String listName, Element listElement) {
        // Create new list
        PrivacyList list = new PrivacyList(username, listName, false, listElement);
        // Add new list to cache
        listsCache.put(getCacheKey(username, listName), list);
        // Save new  list to database
        provider.createPrivacyList(username, list);
        // Trigger event that a new privacy list has been created
        for (PrivacyListEventListener listener : listeners) {
            try {
                listener.privacyListCreated(list);   
            } catch (Exception e) {
                logger.warn("An exception occurred while dispatching a 'privacyListCreated' event!", e);
            }
        }
        return list;
    }
Creates a new privacy list for the specified user.

@param username the username of the list owner.
@param listName the name of the new privacy list.
@param listElement the XML that specifies the list and its items.
@return the newly created PrivacyList.
xmppserver/src/main/java/org/jivesoftware/openfire/privacy/PrivacyListManager.java