Class FormNode

java.lang.Object
org.jivesoftware.smackx.pubsub.NodeExtension
org.jivesoftware.smackx.pubsub.FormNode
All Implemented Interfaces:
org.jivesoftware.smack.packet.Element, org.jivesoftware.smack.packet.NamedElement, org.jivesoftware.smack.packet.XmlElement, org.jivesoftware.smack.packet.XmlLangElement

public class FormNode extends NodeExtension
Generic stanza extension which represents any PubSub form that is parsed from the incoming stream or being sent out to the server. Form types are defined in FormNodeType.
  • Constructor Details

    • FormNode

      public FormNode(FormNodeType formType, DataForm submitForm)
      Create a FormNode which contains the specified form.
      Parameters:
      formType - The type of form being sent
      submitForm - The form
    • FormNode

      public FormNode(FormNodeType formType, String nodeId, DataForm submitForm)
      Create a FormNode which contains the specified form, which is associated with the specified node.
      Parameters:
      formType - The type of form being sent
      nodeId - The node the form is associated with
      submitForm - The form
  • Method Details

    • getForm

      public DataForm getForm()
      Get the Form that is to be sent, or was retrieved from the server.
      Returns:
      The form
    • addXml

      protected void addXml(org.jivesoftware.smack.util.XmlStringBuilder xml)
      Overrides:
      addXml in class NodeExtension