public List<Presence> addAdmins(@Nonnull final List<JID> targetUserAddresses, @Nonnull final Affiliation actorAffiliation) throws ForbiddenException, ConflictException
    {
        if (Affiliation.owner != actorAffiliation) {
            throw new ForbiddenException();
        }

        synchronized(this) {
            final List<Presence> answer = new ArrayList<>(targetUserAddresses.size());
            for (final JID newAdmin : targetUserAddresses) {
                final JID bareJID = newAdmin.asBareJID();
                if (!admins.contains(bareJID)) {
                    // TODO if this throws an exception for any one new entry, then some, but not all data is processed. Instead, ensure that either all, or none of the data is processed.
                    answer.addAll(addAdmin(bareJID, actorAffiliation));
                }
            }
            return answer;
        }
    }
Adds a list of users to the list of admins.

@param targetUserAddresses the list of (real) JIDs of the users to add to the list of existing admins.
@param actorAffiliation the room affiliation of the user that is trying to modify the admins list.
@return the list of updated presences of all the clients resources that the clients used to
        join the room.
@throws ForbiddenException If the user is not allowed to modify the admin list.
@throws ConflictException If the room was going to lose all its owners.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java