use of org.xmpp.forms.FormField in project Openfire by igniterealtime.
the class GetUsersPresence method addStageInformation.
@Override
protected void addStageInformation(SessionData data, Element command) {
DataForm form = new DataForm(DataForm.Type.form);
form.setTitle("Requesting Presence of Active Users");
form.addInstruction("Fill out this form to request the active users presence of this service.");
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.list_single);
field.setLabel("Maximum number of items to return");
field.setVariable("max_items");
field.addOption("25", "25");
field.addOption("50", "50");
field.addOption("75", "75");
field.addOption("100", "100");
field.addOption("150", "150");
field.addOption("200", "200");
field.addOption("None", "none");
// Add the form to the command
command.add(form.getElement());
}
use of org.xmpp.forms.FormField in project Openfire by igniterealtime.
the class AddGroup method addStageInformation.
@Override
protected void addStageInformation(SessionData data, Element command) {
DataForm form = new DataForm(DataForm.Type.form);
form.setTitle("Create new group");
form.addInstruction("Fill out this form to create a new group.");
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("Group Name");
field.setVariable("group");
field.setRequired(true);
field = form.addField();
field.setType(FormField.Type.text_multi);
field.setLabel("Description");
field.setVariable("desc");
field = form.addField();
field.setType(FormField.Type.jid_multi);
field.setLabel("Initial members");
field.setVariable("members");
field = form.addField();
field.setType(FormField.Type.list_single);
field.setLabel("Shared group visibility");
field.setVariable("showInRoster");
field.addValue("nobody");
field.addOption("Disable sharing group in rosters", "nobody");
field.addOption("Show group in all users' rosters", "everybody");
field.addOption("Show group in group members' rosters", "onlyGroup");
field.addOption("Show group to members' rosters of these groups", "spefgroups");
field.setRequired(true);
field = form.addField();
field.setType(FormField.Type.list_multi);
field.setVariable("groupList");
for (Group group : GroupManager.getInstance().getGroups()) {
field.addOption(group.getName(), group.getName());
}
field = form.addField();
field.setType(FormField.Type.text_single);
field.setLabel("Group Display Name");
field.setVariable("displayName");
// Add the form to the command
command.add(form.getElement());
}
use of org.xmpp.forms.FormField in project Openfire by igniterealtime.
the class GetListGroupUsers method addStageInformation.
@Override
protected void addStageInformation(SessionData data, Element command) {
DataForm form = new DataForm(DataForm.Type.form);
form.setTitle("Requesting List of Group Members");
form.addInstruction("Fill out this form to request list of group members and admins.");
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("Group Name");
field.setVariable("group");
field.setRequired(true);
// Add the form to the command
command.add(form.getElement());
}
use of org.xmpp.forms.FormField in project Openfire by igniterealtime.
the class GroupMemberAdded method addStageInformation.
@Override
protected void addStageInformation(SessionData data, Element command) {
DataForm form = new DataForm(DataForm.Type.form);
form.setTitle("Dispatching a group member added event.");
form.addInstruction("Fill out this form to dispatch a group member added event.");
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("The group name of the group");
field.setVariable("groupName");
field.setRequired(true);
field = form.addField();
field.setType(FormField.Type.text_single);
field.setLabel("Member");
field.setVariable("member");
field.setRequired(true);
// Add the form to the command
command.add(form.getElement());
}
use of org.xmpp.forms.FormField in project Openfire by igniterealtime.
the class UserDeleting method addStageInformation.
@Override
protected void addStageInformation(SessionData data, Element command) {
DataForm form = new DataForm(DataForm.Type.form);
form.setTitle("Dispatching a user deleting event.");
form.addInstruction("Fill out this form to dispatch a user deleting event.");
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("The username of the user that is being deleted");
field.setVariable("username");
field.setRequired(true);
// Add the form to the command
command.add(form.getElement());
}
Aggregations