class GetNumberDisabledUsers extends AdHocCommand {

    @Override
    protected void addStageInformation(@Nonnull final SessionData data, Element command) {
        //Do nothing since there are no stages
    }

    @Override
    public void execute(@Nonnull final SessionData data, Element command) {<FILL_FUNCTION_BODY>}

    @Override
    protected List<Action> getActions(@Nonnull final SessionData data) {
        //Do nothing since there are no stages
        return null;
    }

    @Override
    public String getCode() {
        return "http://jabber.org/protocol/admin#get-disabled-users-num";
    }

    @Override
    public String getDefaultLabel() {
        return LocaleUtils.getLocalizedString("commands.admin.getnumberdisabledusers.label");
    }

    @Override
    protected Action getExecuteAction(@Nonnull final SessionData data) {
        //Do nothing since there are no stages
        return null;
    }

    @Override
    public int getMaxStages(@Nonnull final SessionData data) {
        return 0;
    }
}

        final Locale preferredLocale = SessionManager.getInstance().getLocaleForSession(data.getOwner());

        DataForm form = new DataForm(DataForm.Type.result);

        FormField field = form.addField();
        field.setType(FormField.Type.hidden);
        field.setVariable("FORM_TYPE");
        field.addValue("http://jabber.org/protocol/admin");

        field = form.addField();
        field.setType(FormField.Type.text_single);
        field.setLabel(LocaleUtils.getLocalizedString("commands.admin.getnumberdisabledusers.form.field.disabledusersnum.label", preferredLocale));
        field.setVariable("disabledusersnum");

        // TODO improve on this, as this is not efficient on systems with large amounts of users.
        int count = 0;
        final LockOutManager lockOutManager = LockOutManager.getInstance();
        for (final User user : UserManager.getInstance().getUsers()) {
            if (lockOutManager.isAccountDisabled(user.getUsername())) {
                count++;
            }
        }
        field.addValue(count);

        command.add(form.getElement());
    
<methods>public void <init>() ,public void addNextStageInformation(org.jivesoftware.openfire.commands.SessionData, Element) ,public void addPreviousStageInformation(org.jivesoftware.openfire.commands.SessionData, Element) ,public abstract void execute(org.jivesoftware.openfire.commands.SessionData, Element) ,public abstract java.lang.String getCode() ,public abstract java.lang.String getDefaultLabel() ,public java.lang.String getLabel() ,public abstract int getMaxStages(org.jivesoftware.openfire.commands.SessionData) ,public boolean hasPermission(JID) ,public void setLabel(java.lang.String) <variables>private java.lang.String label