use of org.xmpp.forms.DataForm in project Openfire by igniterealtime.
the class GroupModified method addStageInformation.
@Override
protected void addStageInformation(SessionData data, Element command) {
DataForm form = new DataForm(DataForm.Type.form);
form.setTitle("Dispatching a group created event.");
form.addInstruction("Fill out this form to dispatch a group created 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 that was created");
field.setVariable("groupName");
field.setRequired(true);
field.setType(FormField.Type.list_single);
field.setLabel("Change type");
field.setVariable("changeType");
field.addOption("Name modified", "nameModified");
field.addOption("Description modified", "descriptionModified");
field.addOption("Property modified", "propertyModified");
field.addOption("Property added", "propertyAdded");
field.addOption("Property deleted", "propertyDeleted");
field.addOption("Other", "other");
field.setRequired(true);
field = form.addField();
field.setType(FormField.Type.text_single);
field.setLabel("Original value");
field.setVariable("originalValue");
field = form.addField();
field.setType(FormField.Type.text_single);
field.setLabel("Name of the property");
field.setVariable("propertyKey");
// Add the form to the command
command.add(form.getElement());
}
use of org.xmpp.forms.DataForm in project Openfire by igniterealtime.
the class UserCreated method addStageInformation.
@Override
protected void addStageInformation(SessionData data, Element command) {
DataForm form = new DataForm(DataForm.Type.form);
form.setTitle("Dispatching a user created event.");
form.addInstruction("Fill out this form to dispatch a user created 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 was created");
field.setVariable("username");
field.setRequired(true);
// Add the form to the command
command.add(form.getElement());
}
use of org.xmpp.forms.DataForm in project Openfire by igniterealtime.
the class UserModified method addStageInformation.
@Override
protected void addStageInformation(SessionData data, Element command) {
DataForm form = new DataForm(DataForm.Type.form);
form.setTitle("Dispatching a user updated event.");
form.addInstruction("Fill out this form to dispatch a user updated 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 was updated");
field.setVariable("username");
field.setRequired(true);
field.setType(FormField.Type.list_single);
field.setLabel("Change type");
field.setVariable("changeType");
field.addOption("Name modified", "nameModified");
field.addOption("Email modified", "emailModified");
field.addOption("Password modified", "passwordModified");
field.addOption("Creation date modified", "creationDateModified");
field.addOption("Modification date modified", "modificationDateModified");
field.addOption("Property modified", "propertyModified");
field.addOption("Property added", "propertyAdded");
field.addOption("Property deleted", "propertyDeleted");
field.addOption("Other", "other");
field.setRequired(true);
field = form.addField();
field.setType(FormField.Type.text_single);
field.setLabel("Original value");
field.setVariable("originalValue");
field = form.addField();
field.setType(FormField.Type.text_single);
field.setLabel("Name of the property");
field.setVariable("propertyKey");
// Add the form to the command
command.add(form.getElement());
}
use of org.xmpp.forms.DataForm in project Openfire by igniterealtime.
the class VCardCreated method addStageInformation.
@Override
protected void addStageInformation(SessionData data, Element command) {
DataForm form = new DataForm(DataForm.Type.form);
form.setTitle("Dispatching a vCard created event.");
form.addInstruction("Fill out this form to dispatch a vCard created 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 who's vCard was created");
field.setVariable("username");
field.setRequired(true);
// Add the form to the command
command.add(form.getElement());
}
use of org.xmpp.forms.DataForm in project Openfire by igniterealtime.
the class VCardDeleting method addStageInformation.
@Override
protected void addStageInformation(SessionData data, Element command) {
DataForm form = new DataForm(DataForm.Type.form);
form.setTitle("Dispatching a vCard deleting event.");
form.addInstruction("Fill out this form to dispatch a vCard 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 who's vCard is being deleted");
field.setVariable("username");
field.setRequired(true);
// Add the form to the command
command.add(form.getElement());
}
Aggregations