mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 18:29:45 +02:00
Change Element.toXml() to toXml(String enclosingNamespace)
This commit is contained in:
parent
380f9a2b72
commit
5ab2903c32
229 changed files with 634 additions and 536 deletions
|
@ -64,7 +64,7 @@ public class MetaData implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
return MetaDataUtils.serializeMetaData(this.getMetaData());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -299,7 +299,7 @@ public class AgentRoster {
|
|||
EntityFullJid from = presence.getFrom().asEntityFullJidIfPossible();
|
||||
if (from == null) {
|
||||
// TODO Check if we need to ignore these presences or this is a server bug?
|
||||
LOGGER.warning("Presence with non full JID from: " + presence.toXML());
|
||||
LOGGER.warning("Presence with non full JID from: " + presence.toXML(null));
|
||||
return;
|
||||
}
|
||||
Jid key = getPresenceMapKey(from);
|
||||
|
|
|
@ -95,7 +95,7 @@ public class AgentStatus implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
||||
buf.append('<').append(ELEMENT_NAME).append(" xmlns=\"").append(NAMESPACE).append('"');
|
||||
|
|
|
@ -107,10 +107,10 @@ public class OfferRevokeProvider extends IQProvider<IQ> {
|
|||
buf.append("<reason>").append(reason).append("</reason>");
|
||||
}
|
||||
if (sessionID != null) {
|
||||
buf.append(new SessionID(sessionID).toXML());
|
||||
buf.append(new SessionID(sessionID).toXML(null));
|
||||
}
|
||||
if (userID != null) {
|
||||
buf.append(new UserID(userID).toXML());
|
||||
buf.append(new UserID(userID).toXML(null));
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ public final class QueueDetails implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append('<').append(ELEMENT_NAME).append(" xmlns=\"").append(NAMESPACE).append("\">");
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ public class QueueOverview implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML () {
|
||||
public String toXML (String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append('<').append(ELEMENT_NAME).append(" xmlns=\"").append(NAMESPACE).append("\">");
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ public class QueueUpdate implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append("<queue-status xmlns=\"http://jabber.org/protocol/workgroup\">");
|
||||
if (position != -1) {
|
||||
|
|
|
@ -112,7 +112,7 @@ public class RoomInvitation implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public XmlStringBuilder toXML() {
|
||||
public XmlStringBuilder toXML(String enclosingNamespace) {
|
||||
XmlStringBuilder xml = getIQChildElementBuilder(new IQChildElementXmlStringBuilder(this));
|
||||
xml.closeElement(this);
|
||||
return xml;
|
||||
|
|
|
@ -108,7 +108,7 @@ public class RoomTransfer implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public XmlStringBuilder toXML() {
|
||||
public XmlStringBuilder toXML(String enclosingNamespace) {
|
||||
XmlStringBuilder xml = getIQChildElementBuilder(new IQChildElementXmlStringBuilder(this));
|
||||
xml.closeElement(this);
|
||||
return xml;
|
||||
|
|
|
@ -58,7 +58,7 @@ public class SessionID implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
||||
buf.append('<').append(ELEMENT_NAME).append(" xmlns=\"").append(NAMESPACE).append("\" ");
|
||||
|
|
|
@ -83,7 +83,7 @@ public class Transcript extends IQ {
|
|||
.append("\">");
|
||||
|
||||
for (Stanza packet : packets) {
|
||||
buf.append(packet.toXML());
|
||||
buf.append(packet.toXML(null));
|
||||
}
|
||||
|
||||
return buf;
|
||||
|
|
|
@ -60,7 +60,7 @@ public class UserID implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
||||
buf.append('<').append(ELEMENT_NAME).append(" xmlns=\"").append(NAMESPACE).append("\" ");
|
||||
|
|
|
@ -64,7 +64,7 @@ public class WorkgroupInformation implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
||||
buf.append('<').append(ELEMENT_NAME);
|
||||
|
|
|
@ -587,11 +587,11 @@ public class Workgroup {
|
|||
buf.append("<queue-notifications/>");
|
||||
// Add the user unique identification if the session is anonymous
|
||||
if (connection.isAnonymous()) {
|
||||
buf.append(new UserID(userID).toXML());
|
||||
buf.append(new UserID(userID).toXML(null));
|
||||
}
|
||||
|
||||
// Append data form text
|
||||
buf.append(form.toXML());
|
||||
buf.append(form.toXML(null));
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
|
|
@ -306,7 +306,7 @@ public class MessageEvent implements ExtensionElement {
|
|||
*
|
||||
*/
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append('<').append(getElementName()).append(" xmlns=\"").append(getNamespace()).append(
|
||||
"\">");
|
||||
|
|
|
@ -167,7 +167,7 @@ public class RosterExchange implements ExtensionElement {
|
|||
*
|
||||
*/
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append('<').append(getElementName()).append(" xmlns=\"").append(getNamespace()).append(
|
||||
"\">");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue