public String getChildElementXML() { StringBuilder buf = new StringBuilder(); buf.append("<join-queue xmlns=\"http://jabber.org/protocol/workgroup\">"); buf.append("<queue-notifications/>"); // Add the user unique identification if the session is anonymous if (connection.isAnonymous()) { buf.append(new UserID(userID).toXML()); } // Append data form text buf.append(form.toXML()); buf.append("</join-queue>"); return buf.toString(); }
@Override protected IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder buf) { buf.rightAngleBracket(); buf.append("<queue-notifications/>"); // Add the user unique identification if the session is anonymous if (connection.isAnonymous()) { buf.append(new UserID(userID).toXML()); } // Append data form text buf.append(form.toXML()); return buf; }