use of org.jivesoftware.smackx.pubsub.ConfigureForm 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.ConfigureForm in project Smack by igniterealtime.
the class PubSubTestCase method getRandomPubnode.
protected LeafNode getRandomPubnode(PubSubManager pubMgr, boolean persistItems, boolean deliverPayload) throws XMPPException {
ConfigureForm form = new ConfigureForm(FormType.submit);
form.setPersistentItems(persistItems);
form.setDeliverPayloads(deliverPayload);
form.setAccessModel(AccessModel.open);
return (LeafNode) pubMgr.createNode("/test/Pubnode" + System.currentTimeMillis(), form);
}
Aggregations