@Override protected PacketExtension createReturnExtension(String currentElement, String currentNamespace, Map<String, String> attributeMap, List<? extends PacketExtension> content) { return new FormNode(FormNodeType.valueOfFromElementName(currentElement, currentNamespace), attributeMap.get("node"), new Form((DataForm)content.iterator().next())); } }
@Override protected PacketExtension createReturnExtension(String currentElement, String currentNamespace, Map<String, String> attributeMap, List<? extends PacketExtension> content) { return new FormNode(FormNodeType.valueOfFromElementName(currentElement, currentNamespace), attributeMap.get("node"), new Form((DataForm)content.iterator().next())); } }
@Override protected PacketExtension createReturnExtension(String currentElement, String currentNamespace, Map<String, String> attributeMap, List<? extends PacketExtension> content) { return new FormNode(FormNodeType.valueOfFromElementName(currentElement, currentNamespace), attributeMap.get("node"), new Form((DataForm)content.iterator().next())); } }
/** * Returns a new ReportedData if the packet is used for gathering data and includes an * extension that matches the elementName and namespace "x","jabber:x:data". * * @param packet the packet used for gathering data. */ public static Form getFormFrom(Packet packet) { // Check if the packet includes the DataForm extension PacketExtension packetExtension = packet.getExtension("x","jabber:x:data"); if (packetExtension != null) { // Check if the existing DataForm is not a result of a search DataForm dataForm = (DataForm) packetExtension; if (dataForm.getReportedData() == null) return new Form(dataForm); } // Otherwise return null return null; }
/** * Returns a new ReportedData if the packet is used for gathering data and includes an * extension that matches the elementName and namespace "x","jabber:x:data". * * @param packet the packet used for gathering data. * @return the data form parsed from the packet or <tt>null</tt> if there was not * a form in the packet. */ public static Form getFormFrom(Packet packet) { // Check if the packet includes the DataForm extension PacketExtension packetExtension = packet.getExtension("x","jabber:x:data"); if (packetExtension != null) { // Check if the existing DataForm is not a result of a search DataForm dataForm = (DataForm) packetExtension; if (dataForm.getReportedData() == null) return new Form(dataForm); } // Otherwise return null return null; }
/** * Returns the form of the current stage. Usually it is the form that must * be answered to execute the next action. If that is the case it should be * used by the requester to fill all the information that the executor needs * to continue to the next stage. It can also be the result of the * execution. * * @return the form of the current stage to fill out or the result of the * execution. */ public Form getForm() { if (data.getForm() == null) { return null; } else { return new Form(data.getForm()); } }
/** * Returns the form of the current stage. Usually it is the form that must * be answered to execute the next action. If that is the case it should be * used by the requester to fill all the information that the executor needs * to continue to the next stage. It can also be the result of the * execution. * * @return the form of the current stage to fill out or the result of the * execution. */ public Form getForm() { if (data.getForm() == null) { return null; } else { return new Form(data.getForm()); } }
/** * Returns the form of the current stage. Usually it is the form that must * be answered to execute the next action. If that is the case it should be * used by the requester to fill all the information that the executor needs * to continue to the next stage. It can also be the result of the * execution. * * @return the form of the current stage to fill out or the result of the * execution. */ public Form getForm() { if (data.getForm() == null) { return null; } else { return new Form(data.getForm()); } }
/** * Returns a new ReportedData if the packet is used for gathering data and includes an * extension that matches the elementName and namespace "x","jabber:x:data". * * @param packet the packet used for gathering data. * @return the data form parsed from the packet or <tt>null</tt> if there was not * a form in the packet. */ public static Form getFormFrom(Packet packet) { // Check if the packet includes the DataForm extension PacketExtension packetExtension = packet.getExtension("x","jabber:x:data"); if (packetExtension != null) { // Check if the existing DataForm is not a result of a search DataForm dataForm = (DataForm) packetExtension; if (dataForm.getReportedData() == null) return new Form(dataForm); } // Otherwise return null return null; }
/** * Returns a new ReportedData if the packet is used for gathering data and includes an * extension that matches the elementName and namespace "x","jabber:x:data". * * @param packet the packet used for gathering data. * @return the data form parsed from the packet or <tt>null</tt> if there was not * a form in the packet. */ public static Form getFormFrom(Packet packet) { // Check if the packet includes the DataForm extension PacketExtension packetExtension = packet.getExtension("x","jabber:x:data"); if (packetExtension != null) { // Check if the existing DataForm is not a result of a search DataForm dataForm = (DataForm) packetExtension; if (dataForm.getReportedData() == null) return new Form(dataForm); } // Otherwise return null return null; }
Form form = new Form(Form.TYPE_SUBMIT); Iterator<String> iter = metadata.keySet().iterator(); while (iter.hasNext()) {
Form form = new Form(Form.TYPE_SUBMIT); Iterator iter = metadata.keySet().iterator(); while (iter.hasNext()) {
Form form = new Form(Form.TYPE_SUBMIT); Iterator iter = metadata.keySet().iterator(); while (iter.hasNext()) {
Form form = new Form(TYPE_SUBMIT); for (Iterator<FormField> fields=getFields(); fields.hasNext();) { FormField field = fields.next();
Form form = new Form(TYPE_SUBMIT); for (Iterator<FormField> fields=getFields(); fields.hasNext();) { FormField field = fields.next();
Form form = new Form(TYPE_SUBMIT); for (Iterator<FormField> fields=getFields(); fields.hasNext();) { FormField field = fields.next();
Form form = new Form(TYPE_SUBMIT); for (Iterator fields=getFields(); fields.hasNext();) { FormField field = (FormField)fields.next();