思特奇智慧酒店云平台 v0.0.5版本的 MD5 值为:dedb172bb322639d79d7e0e26262fb5c
以下内容为反编译后的 AdHocCommandData.java 源代码,内容仅作参考
package org.jivesoftware.smackx.commands.packet;
import androidx.core.app.NotificationCompat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smackx.commands.AdHocCommand;
import org.jivesoftware.smackx.commands.AdHocCommandNote;
import org.jivesoftware.smackx.xdata.packet.DataForm;
public class AdHocCommandData extends IQ {
public static final String ELEMENT = "command";
public static final String NAMESPACE = "http://jabber.org/protocol/commands";
public AdHocCommand.Action action;
public final ArrayList<AdHocCommand.Action> actions;
public AdHocCommand.Action executeAction;
public DataForm form;
public xw3 f142id;
public String name;
public String node;
public final List<AdHocCommandNote> notes;
public String sessionID;
public AdHocCommand.Status status;
public static class SpecificError implements ExtensionElement {
public static final String namespace = "http://jabber.org/protocol/commands";
public AdHocCommand.SpecificErrorCondition condition;
public SpecificError(AdHocCommand.SpecificErrorCondition specificErrorCondition) {
this.condition = specificErrorCondition;
}
public AdHocCommand.SpecificErrorCondition getCondition() {
return this.condition;
}
@Override
public String getElementName() {
return this.condition.toString();
}
@Override
public String getNamespace() {
return "http://jabber.org/protocol/commands";
}
@Override
public String toXML(String str) {
return '<' + getElementName() + " xmlns=\"" + getNamespace() + "\"/>";
}
}
public AdHocCommandData() {
super("command", "http://jabber.org/protocol/commands");
this.notes = new ArrayList();
this.actions = new ArrayList<>();
}
public void addAction(AdHocCommand.Action action) {
this.actions.add(action);
}
public void addNote(AdHocCommandNote adHocCommandNote) {
this.notes.add(adHocCommandNote);
}
public AdHocCommand.Action getAction() {
return this.action;
}
public List<AdHocCommand.Action> getActions() {
return this.actions;
}
public AdHocCommand.Action getExecuteAction() {
return this.executeAction;
}
public DataForm getForm() {
return this.form;
}
@Override
public IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.attribute("node", this.node);
iQChildElementXmlStringBuilder.optAttribute(zv3.i, this.sessionID);
iQChildElementXmlStringBuilder.optAttribute("status", this.status);
iQChildElementXmlStringBuilder.optAttribute("action", this.action);
iQChildElementXmlStringBuilder.rightAngleBracket();
if (getType() == IQ.Type.result) {
iQChildElementXmlStringBuilder.halfOpenElement(NotificationCompat.WearableExtender.KEY_ACTIONS);
iQChildElementXmlStringBuilder.optAttribute("execute", this.executeAction);
if (this.actions.size() == 0) {
iQChildElementXmlStringBuilder.closeEmptyElement();
} else {
iQChildElementXmlStringBuilder.rightAngleBracket();
Iterator<AdHocCommand.Action> it = this.actions.iterator();
while (it.hasNext()) {
iQChildElementXmlStringBuilder.emptyElement(it.next());
}
iQChildElementXmlStringBuilder.closeElement(NotificationCompat.WearableExtender.KEY_ACTIONS);
}
}
DataForm dataForm = this.form;
if (dataForm != null) {
iQChildElementXmlStringBuilder.append(dataForm.toXML((String) null));
}
for (AdHocCommandNote adHocCommandNote : this.notes) {
iQChildElementXmlStringBuilder.halfOpenElement("note").attribute("type", adHocCommandNote.getType().toString()).rightAngleBracket();
iQChildElementXmlStringBuilder.append((CharSequence) adHocCommandNote.getValue());
iQChildElementXmlStringBuilder.closeElement("note");
}
return iQChildElementXmlStringBuilder;
}
public xw3 getId() {
return this.f142id;
}
public String getName() {
return this.name;
}
public String getNode() {
return this.node;
}
public List<AdHocCommandNote> getNotes() {
return this.notes;
}
public String getSessionID() {
return this.sessionID;
}
public AdHocCommand.Status getStatus() {
return this.status;
}
public void removeNote(AdHocCommandNote adHocCommandNote) {
this.notes.remove(adHocCommandNote);
}
public void setAction(AdHocCommand.Action action) {
this.action = action;
}
public void setExecuteAction(AdHocCommand.Action action) {
this.executeAction = action;
}
public void setForm(DataForm dataForm) {
this.form = dataForm;
}
public void setId(xw3 xw3Var) {
this.f142id = xw3Var;
}
public void setName(String str) {
this.name = str;
}
public void setNode(String str) {
this.node = str;
}
public void setSessionID(String str) {
this.sessionID = str;
}
public void setStatus(AdHocCommand.Status status) {
this.status = status;
}
}