org.jivesoftware.smackx.pubsub
Class FormNode

java.lang.Object
  extended by org.jivesoftware.smackx.pubsub.NodeExtension
      extended by org.jivesoftware.smackx.pubsub.FormNode
All Implemented Interfaces:
org.jivesoftware.smack.packet.PacketExtension

public class FormNode
extends NodeExtension

Generic packet 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.

Author:
Robin Collier

Constructor Summary
FormNode(FormNodeType formType, org.jivesoftware.smackx.Form submitForm)
          Create a FormNode which contains the specified form.
FormNode(FormNodeType formType, java.lang.String nodeId, org.jivesoftware.smackx.Form submitForm)
          Create a FormNode which contains the specified form, which is associated with the specified node.
 
Method Summary
 org.jivesoftware.smackx.Form getForm()
          Get the Form that is to be sent, or was retrieved from the server.
 java.lang.String toXML()
           
 
Methods inherited from class org.jivesoftware.smackx.pubsub.NodeExtension
getElementName, getNamespace, getNode, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormNode

public FormNode(FormNodeType formType,
                org.jivesoftware.smackx.Form 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,
                java.lang.String nodeId,
                org.jivesoftware.smackx.Form 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 Detail

getForm

public org.jivesoftware.smackx.Form getForm()
Get the Form that is to be sent, or was retrieved from the server.

Returns:
The form

toXML

public java.lang.String toXML()
Specified by:
toXML in interface org.jivesoftware.smack.packet.PacketExtension
Overrides:
toXML in class NodeExtension