use of org.jivesoftware.smackx.pubsub.FormNode in project ecf by eclipse.
the class NodeUtils method getFormFromPacket.
/**
* Get a {@link ConfigureForm} from a packet.
*
* @param packet
* @param elem
* @return The configuration form
*/
public static ConfigureForm getFormFromPacket(Packet packet, PubSubElementType elem) {
FormNode config = (FormNode) packet.getExtension(elem.getElementName(), elem.getNamespace().getXmlns());
Form formReply = config.getForm();
return new ConfigureForm(formReply);
}
use of org.jivesoftware.smackx.pubsub.FormNode in project Smack by igniterealtime.
the class NodeUtils method getFormFromPacket.
/**
* Get a {@link ConfigureForm} from a packet.
*
* @param packet TODO javadoc me please
* @param elem TODO javadoc me please
* @return The configuration form
*/
public static ConfigureForm getFormFromPacket(Stanza packet, PubSubElementType elem) {
FormNode config = (FormNode) packet.getExtensionElement(elem.getElementName(), elem.getNamespace().getXmlns());
DataForm dataForm = config.getForm();
return new ConfigureForm(dataForm);
}
Aggregations