@Override
    public void execute(@Nonnull SessionData sessionData, Element command)
    {
        final Locale preferredLocale = SessionManager.getInstance().getLocaleForSession(sessionData.getOwner());
        Element note = command.addElement("note");

        Map<String, List<String>> data = sessionData.getData();

        boolean requestError = false;
        final List<JID> listed = new ArrayList<>();
        for ( final String adminjid : data.get( "adminjids" ))
        {
            try
            {
                listed.add(new JID(adminjid));
            }
            catch (IllegalArgumentException npe)
            {
                note.addAttribute( "type", "error" );
                note.setText(LocaleUtils.getLocalizedString("commands.admin.editadminlist.note.jid-invalid", preferredLocale));
                requestError = true;
            }
        }

        if ( requestError )
        {
            // We've collected all errors. Return without applying changes.
            return;
        }

        // No errors.
        AdminManager.getInstance().setAdminJIDs(listed);

        // Answer that the operation was successful
        note.addAttribute("type", "info");
        note.setText(LocaleUtils.getLocalizedString("commands.global.operation.finished.success", preferredLocale));
    }
Edits the list of Openfire administrators

@author Guus der Kinderen, guus@goodbytes.nl
@see <a href="https://xmpp.org/extensions/xep-0133.html#edit-admin">XEP-0133 Service Administration: Edit Admin List</a>
xmppserver/src/main/java/org/jivesoftware/openfire/commands/admin/EditAdminList.java