mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 00:59:39 +02:00
Introduce XmlEnvironment
This commit is contained in:
parent
dc780ffd6c
commit
fee3ed81ca
229 changed files with 715 additions and 526 deletions
|
@ -64,7 +64,7 @@ public class MetaData implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML(String enclosingNamespace) {
|
||||
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment 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(null));
|
||||
LOGGER.warning("Presence with non full JID from: " + presence.toXML());
|
||||
return;
|
||||
}
|
||||
Jid key = getPresenceMapKey(from);
|
||||
|
|
|
@ -95,7 +95,7 @@ public class AgentStatus implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML(String enclosingNamespace) {
|
||||
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment 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(null));
|
||||
buf.append(new SessionID(sessionID).toXML());
|
||||
}
|
||||
if (userID != null) {
|
||||
buf.append(new UserID(userID).toXML(null));
|
||||
buf.append(new UserID(userID).toXML());
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ public final class QueueDetails implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML(String enclosingNamespace) {
|
||||
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append('<').append(ELEMENT_NAME).append(" xmlns=\"").append(NAMESPACE).append("\">");
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.Date;
|
|||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smack.packet.XmlEnvironment;
|
||||
import org.jivesoftware.smack.provider.ExtensionElementProvider;
|
||||
|
||||
import org.jivesoftware.smackx.workgroup.agent.WorkgroupQueue;
|
||||
|
@ -101,7 +102,7 @@ public class QueueOverview implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML (String enclosingNamespace) {
|
||||
public String toXML(XmlEnvironment enclosingEnvironment) {
|
||||
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(String enclosingNamespace) {
|
||||
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment 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(String enclosingNamespace) {
|
||||
public XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment 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(String enclosingNamespace) {
|
||||
public XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment 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(String enclosingNamespace) {
|
||||
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment 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(null));
|
||||
buf.append(packet.toXML());
|
||||
}
|
||||
|
||||
return buf;
|
||||
|
|
|
@ -60,7 +60,7 @@ public class UserID implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML(String enclosingNamespace) {
|
||||
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment 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(String enclosingNamespace) {
|
||||
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment 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(null));
|
||||
buf.append(new UserID(userID).toXML());
|
||||
}
|
||||
|
||||
// Append data form text
|
||||
buf.append(form.toXML(null));
|
||||
buf.append(form.toXML());
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
|
|
@ -306,7 +306,7 @@ public class MessageEvent implements ExtensionElement {
|
|||
*
|
||||
*/
|
||||
@Override
|
||||
public String toXML(String enclosingNamespace) {
|
||||
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment 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(String enclosingNamespace) {
|
||||
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment 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