/** * 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); }
@Override protected PacketExtension createReturnExtension(String currentElement, String currentNamespace, Map<String, String> attributeMap, List<? extends PacketExtension> content) { return new NodeExtension(PubSubElementType.valueOfFromElemName( currentElement, currentNamespace), attributeMap.get("node")); }
/** * 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); }
@Override protected NodeExtension createReturnExtension(String currentElement, String currentNamespace, Map<String, String> attributeMap, List<? extends ExtensionElement> content) { return new NodeExtension(PubSubElementType.valueOfFromElemName(currentElement, currentNamespace), attributeMap.get("node")); }
@SuppressWarnings("unchecked") public <PE extends ExtensionElement> PE getExtension(PubSubElementType elem) { return (PE) getExtension(elem.getElementName(), elem.getNamespace().getXmlns()); }
@Override protected PacketExtension createReturnExtension(String currentElement, String currentNamespace, Map<String, String> attributeMap, List<? extends PacketExtension> content) { return new NodeExtension(PubSubElementType.valueOfFromElemName(currentElement, currentNamespace), attributeMap.get("node")); }
public PacketExtension getExtension(PubSubElementType elem) { return getExtension(elem.getElementName(), elem.getNamespace().getXmlns()); }
public PacketExtension getExtension(PubSubElementType elem) { return getExtension(elem.getElementName(), elem.getNamespace() .getXmlns()); }
/** * Get a {@link ConfigureForm} from a packet. * * @param packet * @param elem * @return The configuration form */ public static ConfigureForm getFormFromPacket(Stanza packet, PubSubElementType elem) { FormNode config = packet.getExtension(elem.getElementName(), elem.getNamespace().getXmlns()); Form formReply = config.getForm(); return new ConfigureForm(formReply); }