思特奇智慧酒店云平台 v0.0.5版本的 MD5 值为:dedb172bb322639d79d7e0e26262fb5c
以下内容为反编译后的 DiscoverItems.java 源代码,内容仅作参考
package org.jivesoftware.smackx.disco.packet;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.util.XmlStringBuilder;
public class DiscoverItems extends IQ {
public static final String ELEMENT = "query";
public static final String NAMESPACE = "http://jabber.org/protocol/disco#items";
public final List<Item> items;
public String node;
public static class Item {
public static final String REMOVE_ACTION = "remove";
public static final String UPDATE_ACTION = "update";
public String action;
public final xw3 entityID;
public String name;
public String node;
public Item(xw3 xw3Var) {
this.entityID = xw3Var;
}
public String getAction() {
return this.action;
}
public xw3 getEntityID() {
return this.entityID;
}
public String getName() {
return this.name;
}
public String getNode() {
return this.node;
}
public void setAction(String str) {
this.action = str;
}
public void setName(String str) {
this.name = str;
}
public void setNode(String str) {
this.node = str;
}
public XmlStringBuilder toXML() {
XmlStringBuilder xmlStringBuilder = new XmlStringBuilder();
xmlStringBuilder.halfOpenElement("item");
xmlStringBuilder.attribute("jid", this.entityID);
xmlStringBuilder.optAttribute("name", this.name);
xmlStringBuilder.optAttribute("node", this.node);
xmlStringBuilder.optAttribute("action", this.action);
xmlStringBuilder.closeEmptyElement();
return xmlStringBuilder;
}
}
public DiscoverItems() {
super("query", NAMESPACE);
this.items = new LinkedList();
}
public void addItem(Item item) {
this.items.add(item);
}
public void addItems(Collection<Item> collection) {
if (collection == null) {
return;
}
for (Item item : collection) {
addItem(item);
}
}
@Override
public IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.optAttribute("node", getNode());
iQChildElementXmlStringBuilder.rightAngleBracket();
for (Item item : this.items) {
iQChildElementXmlStringBuilder.append(item.toXML());
}
return iQChildElementXmlStringBuilder;
}
public List<Item> getItems() {
return Collections.unmodifiableList(this.items);
}
public String getNode() {
return this.node;
}
public void setNode(String str) {
this.node = str;
}
}