当前位置: 首页>>代码示例>>Java>>正文


Java DataForm.addInstruction方法代码示例

本文整理汇总了Java中org.xmpp.forms.DataForm.addInstruction方法的典型用法代码示例。如果您正苦于以下问题:Java DataForm.addInstruction方法的具体用法?Java DataForm.addInstruction怎么用?Java DataForm.addInstruction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.xmpp.forms.DataForm的用法示例。


在下文中一共展示了DataForm.addInstruction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@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());
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:27,代码来源:GetUsersPresence.java

示例2: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@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());
   }
 
开发者ID:idwanglu2010,项目名称:openfire,代码行数:27,代码来源:GetUsersPresence.java

示例3: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@Override
protected void addStageInformation(SessionData data, Element command) {
       DataForm form = new DataForm(DataForm.Type.form);
       form.setTitle("Delete workgroup");
       form.addInstruction("Fill out this form to delete a workgroup.");

       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.jid_single);
       field.setLabel("Workgroup's JID");
       field.setVariable("workgroup");
       field.setRequired(true);

       // Add the form to the command
       command.add(form.getElement());
   }
 
开发者ID:coodeer,项目名称:g3server,代码行数:21,代码来源:DeleteWorkgroup.java

示例4: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@Override
protected void addStageInformation(SessionData data, Element command) {
       DataForm form = new DataForm(DataForm.Type.form);
       form.setTitle("Delete group");
       form.addInstruction("Fill out this form to delete a 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);

       // Add the form to the command
       command.add(form.getElement());
   }
 
开发者ID:idwanglu2010,项目名称:openfire,代码行数:21,代码来源:DeleteGroup.java

示例5: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@Override
protected void addStageInformation(SessionData data, Element command) {
    DataForm form = new DataForm(DataForm.Type.form);
    form.setTitle("Authenticating a user");
    form.addInstruction("Fill out this form to authenticate a user.");

    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 for this account");
    field.setVariable("accountjid");
    field.setRequired(true);

    field = form.addField();
    field.setType(FormField.Type.text_private);
    field.setLabel("The password for this account");
    field.setVariable("password");
    field.setRequired(true);

    // Add the form to the command
    command.add(form.getElement());
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:27,代码来源:AuthenticateUser.java

示例6: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@Override
protected void addStageInformation(SessionData data, Element command) {
    DataForm form = new DataForm(DataForm.Type.form);
    form.setTitle("Changing a User Password");
    form.addInstruction("Fill out this form to change a user\u2019s password.");

    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.jid_single);
    field.setLabel("The Jabber ID for this account");
    field.setVariable("accountjid");
    field.setRequired(true);

    field = form.addField();
    field.setType(FormField.Type.text_private);
    field.setLabel("The password for this account");
    field.setVariable("password");
    field.setRequired(true);

    // Add the form to the command
    command.add(form.getElement());
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:27,代码来源:ChangeUserPassword.java

示例7: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@Override
protected void addStageInformation(SessionData data, Element command) {
       DataForm form = new DataForm(DataForm.Type.form);
       form.setTitle("Changing a User Password");
       form.addInstruction("Fill out this form to change a user\u2019s password.");

       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.jid_single);
       field.setLabel("The Jabber ID for this account");
       field.setVariable("accountjid");
       field.setRequired(true);

       field = form.addField();
       field.setType(FormField.Type.text_private);
       field.setLabel("The password for this account");
       field.setVariable("password");
       field.setRequired(true);

       // Add the form to the command
       command.add(form.getElement());
   }
 
开发者ID:idwanglu2010,项目名称:openfire,代码行数:27,代码来源:ChangeUserPassword.java

示例8: getConfigurationForm

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
/**
 * Returns a data form used by the owner to edit the node configuration.
 *
 * @return data form used by the owner to edit the node configuration.
 */
public DataForm getConfigurationForm() {
    DataForm form = new DataForm(DataForm.Type.form);
    form.setTitle(LocaleUtils.getLocalizedString("pubsub.form.conf.title"));
    List<String> params = new ArrayList<>();
    params.add(getNodeID());
    form.addInstruction(LocaleUtils.getLocalizedString("pubsub.form.conf.instruction", params));

    FormField formField = form.addField();
    formField.setVariable("FORM_TYPE");
    formField.setType(FormField.Type.hidden);
    formField.addValue("http://jabber.org/protocol/pubsub#node_config");

    // Add the form fields and configure them for edition
    addFormFields(form, true);
    return form;
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:22,代码来源:Node.java

示例9: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@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);

    // Add the form to the command
    command.add(form.getElement());
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:21,代码来源:GroupCreated.java

示例10: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@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());
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:21,代码来源:VCardCreated.java

示例11: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@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());
   }
 
开发者ID:idwanglu2010,项目名称:openfire,代码行数:21,代码来源:UserDeleting.java

示例12: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@Override
protected void addStageInformation(SessionData data, Element command) {
       DataForm form = new DataForm(DataForm.Type.form);
       form.setTitle("Receiving notification of packets activity");
       form.addInstruction("Fill out this form to configure packets to receive.");

       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_multi);
       field.setLabel("Type of packet");
       field.setVariable("packet_type");
       field.addOption("Presence", "presence");
       field.addOption("IQ", "iq");
       field.addOption("Message", "message");
       field.setRequired(true);

       field = form.addField();
       field.setType(FormField.Type.list_single);
       field.setLabel("Direction");
       field.setVariable("direction");
       field.addOption("Incoming", "incoming");
       field.addOption("Outgoing", "outgoing");
       field.setRequired(true);

       field = form.addField();
       field.setType(FormField.Type.list_single);
       field.setLabel("Processing time");
       field.setVariable("processed");
       field.addOption("Before processing", "false");
       field.addOption("After processing", "true");
       field.setRequired(true);

       // Add the form to the command
       command.add(form.getElement());
   }
 
开发者ID:coodeer,项目名称:g3server,代码行数:40,代码来源:PacketsNotification.java

示例13: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@Override
protected void addStageInformation(SessionData data, Element command) {
       DataForm form = new DataForm(DataForm.Type.form);
       form.setTitle("Adding a new workgroup");
       form.addInstruction("Fill out this form to add a workgroup.");

       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 name of the workgroup to be added");
       field.setVariable("name");
       field.setRequired(true);

       field = form.addField();
       field.setType(FormField.Type.text_multi);
       field.setLabel("Username of the members");
       field.setVariable("members");

       field = form.addField();
       field.setType(FormField.Type.text_single);
       field.setLabel("Description");
       field.setVariable("description");

       // Add the form to the command
       command.add(form.getElement());
   }
 
开发者ID:coodeer,项目名称:g3server,代码行数:31,代码来源:CreateWorkgroup.java

示例14: addStageInformation

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
@Override
protected void addStageInformation(SessionData data, Element command) {
    DataForm form = new DataForm(DataForm.Type.form);
    form.setTitle("Receiving notification of packets activity");
    form.addInstruction("Fill out this form to configure packets to receive.");

    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_multi);
    field.setLabel("Type of packet");
    field.setVariable("packet_type");
    field.addOption("Presence", "presence");
    field.addOption("IQ", "iq");
    field.addOption("Message", "message");
    field.setRequired(true);

    field = form.addField();
    field.setType(FormField.Type.list_single);
    field.setLabel("Direction");
    field.setVariable("direction");
    field.addOption("Incoming", "incoming");
    field.addOption("Outgoing", "outgoing");
    field.setRequired(true);

    field = form.addField();
    field.setType(FormField.Type.list_single);
    field.setLabel("Processing time");
    field.setVariable("processed");
    field.addOption("Before processing", "false");
    field.addOption("After processing", "true");
    field.setRequired(true);

    // Add the form to the command
    command.add(form.getElement());
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:40,代码来源:PacketsNotification.java

示例15: getDataElement

import org.xmpp.forms.DataForm; //导入方法依赖的package包/类
/**
 * Utility method that returns a 'jabber:iq:search' child element filled
 * with a blank dataform.
 * 
 * @return Element, named 'query', escaped by the 'jabber:iq:search'
 *         namespace, filled with a blank dataform.
 */
private static Element getDataElement()
{
    final DataForm searchForm = new DataForm(DataForm.Type.form);
    searchForm.setTitle("Chat Rooms Search");
    searchForm.addInstruction("Instructions");

    final FormField typeFF = searchForm.addField();
    typeFF.setVariable("FORM_TYPE");
    typeFF.setType(FormField.Type.hidden);
    typeFF.addValue("jabber:iq:search");

    final FormField nameFF = searchForm.addField();
    nameFF.setVariable("name");
    nameFF.setType(FormField.Type.text_single);
    nameFF.setLabel("Name");
    nameFF.setRequired(false);

    final FormField matchFF = searchForm.addField();
    matchFF.setVariable("name_is_exact_match");
    matchFF.setType(FormField.Type.boolean_type);
    matchFF.setLabel("Name must match exactly");
    matchFF.setRequired(false);

    final FormField subjectFF = searchForm.addField();
    subjectFF.setVariable("subject");
    subjectFF.setType(FormField.Type.text_single);
    subjectFF.setLabel("Subject");
    subjectFF.setRequired(false);

    final FormField userAmountFF = searchForm.addField();
    userAmountFF.setVariable("num_users");
    userAmountFF.setType(FormField.Type.text_single);
    userAmountFF.setLabel("Number of users");
    userAmountFF.setRequired(false);

    final FormField maxUsersFF = searchForm.addField();
    maxUsersFF.setVariable("num_max_users");
    maxUsersFF.setType(FormField.Type.text_single);
    maxUsersFF.setLabel("Max number allowed of users");
    maxUsersFF.setRequired(false);

    final FormField includePasswordProtectedFF = searchForm.addField();
    includePasswordProtectedFF.setVariable("include_password_protected");
    includePasswordProtectedFF.setType(FormField.Type.boolean_type);
    includePasswordProtectedFF.setLabel("Include password protected rooms");
    includePasswordProtectedFF.setRequired(false);

    final Element probeResult = DocumentHelper.createElement(QName.get(
        "query", "jabber:iq:search"));
    probeResult.add(searchForm.getElement());
    return probeResult;
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:60,代码来源:IQMUCSearchHandler.java


注:本文中的org.xmpp.forms.DataForm.addInstruction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。