Smack

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:
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, Form submitForm)
          Create a FormNode which contains the specified form.
FormNode(FormNodeType formType, String nodeId, Form submitForm)
          Create a FormNode which contains the specified form, which is associated with the specified node.
 
Method Summary
 Form getForm()
          Get the Form that is to be sent, or was retrieved from the server.
 String toXML()
          Returns the XML representation of the PacketExtension.
 
Methods inherited from class org.jivesoftware.smackx.pubsub.NodeExtension
getElementName, getNamespace, getNode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormNode

public FormNode(FormNodeType formType,
                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,
                String nodeId,
                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 Form getForm()
Get the Form that is to be sent, or was retrieved from the server.

Returns:
The form

toXML

public String toXML()
Description copied from interface: PacketExtension
Returns the XML representation of the PacketExtension.

Specified by:
toXML in interface PacketExtension
Overrides:
toXML in class NodeExtension
Returns:
the packet extension as XML.

Smack

Copyright © 2003-2007 Jive Software.