Class AdHocCommandData
- java.lang.Object
-
- org.jivesoftware.smack.packet.Stanza
-
- org.jivesoftware.smack.packet.IQ
-
- org.jivesoftware.smackx.commands.packet.AdHocCommandData
-
- All Implemented Interfaces:
org.jivesoftware.smack.packet.Element,org.jivesoftware.smack.packet.FullyQualifiedElement,org.jivesoftware.smack.packet.IqView,org.jivesoftware.smack.packet.NamedElement,org.jivesoftware.smack.packet.StanzaView,org.jivesoftware.smack.packet.TopLevelStreamElement,org.jivesoftware.smack.packet.XmlLangElement
public class AdHocCommandData extends org.jivesoftware.smack.packet.IQRepresents the state and the request of the execution of an adhoc command.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAdHocCommandData.SpecificError
-
Constructor Summary
Constructors Constructor Description AdHocCommandData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAction(AdHocCommand.Action action)voidaddNote(AdHocCommandNote note)AdHocCommand.ActiongetAction()Returns the action to execute.java.util.List<AdHocCommand.Action>getActions()AdHocCommand.ActiongetExecuteAction()DataFormgetForm()Returns the form of the command.org.jxmpp.jid.JidgetId()Returns the JID of the command host.protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuildergetIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder xml)java.lang.StringgetName()Returns the human name of the command.java.lang.StringgetNode()Returns the identifier of the command.java.util.List<AdHocCommandNote>getNotes()Returns the list of notes that the command has.java.lang.StringgetSessionID()AdHocCommand.StatusgetStatus()Returns the status of the execution.voidremoveNote(AdHocCommandNote note)voidsetAction(AdHocCommand.Action action)voidsetExecuteAction(AdHocCommand.Action executeAction)voidsetForm(DataForm form)voidsetId(org.jxmpp.jid.Jid id)voidsetName(java.lang.String name)voidsetNode(java.lang.String node)voidsetSessionID(java.lang.String sessionID)Set the 'sessionid' attribute of the command.voidsetStatus(AdHocCommand.Status status)-
Methods inherited from class org.jivesoftware.smack.packet.IQ
createErrorResponse, createErrorResponse, createErrorResponse, createResultIQ, getChildElementName, getChildElementNamespace, getChildElementQName, getChildElementXML, getElementName, getType, isRequestIQ, isResponseIQ, setType, toString, toXML
-
Methods inherited from class org.jivesoftware.smack.packet.Stanza
addCommonAttributes, addExtension, addExtensions, appendErrorIfExists, getDefaultLanguage, getError, getExtension, getExtension, getExtension, getExtensionElement, getExtensions, getExtensions, getExtensions, getExtensions, getExtensionsMap, getFrom, getLanguage, getNamespace, getStanzaId, getTo, hasExtension, hasExtension, hasStanzaIdSet, logCommonAttributes, overrideExtension, removeExtension, removeExtension, setError, setError, setFrom, setLanguage, setNewStanzaId, setStanzaId, setStanzaId, setTo, throwIfNoStanzaId
-
-
-
-
Field Detail
-
ELEMENT
public static final java.lang.String ELEMENT
- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIQChildElementBuilder
protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder xml)
- Specified by:
getIQChildElementBuilderin classorg.jivesoftware.smack.packet.IQ
-
getId
public org.jxmpp.jid.Jid getId()
Returns the JID of the command host.- Returns:
- the JID of the command host.
-
setId
public void setId(org.jxmpp.jid.Jid id)
-
getName
public java.lang.String getName()
Returns the human name of the command.- Returns:
- the name of the command.
-
setName
public void setName(java.lang.String name)
-
getNode
public java.lang.String getNode()
Returns the identifier of the command.- Returns:
- the node.
-
setNode
public void setNode(java.lang.String node)
-
getNotes
public java.util.List<AdHocCommandNote> getNotes()
Returns the list of notes that the command has.- Returns:
- the notes.
-
addNote
public void addNote(AdHocCommandNote note)
-
removeNote
public void removeNote(AdHocCommandNote note)
-
getForm
public DataForm getForm()
Returns the form of the command.- Returns:
- the data form associated with the command.
-
setForm
public void setForm(DataForm form)
-
getAction
public AdHocCommand.Action getAction()
Returns the action to execute. The action is set only on a request.- Returns:
- the action to execute.
-
setAction
public void setAction(AdHocCommand.Action action)
-
getStatus
public AdHocCommand.Status getStatus()
Returns the status of the execution.- Returns:
- the status.
-
setStatus
public void setStatus(AdHocCommand.Status status)
-
getActions
public java.util.List<AdHocCommand.Action> getActions()
-
addAction
public void addAction(AdHocCommand.Action action)
-
setExecuteAction
public void setExecuteAction(AdHocCommand.Action executeAction)
-
getExecuteAction
public AdHocCommand.Action getExecuteAction()
-
setSessionID
public void setSessionID(java.lang.String sessionID)
Set the 'sessionid' attribute of the command.This value can be null or empty for the first command, but MUST be set for subsequent commands. See also XEP-0050 ยง 3.3 Session Lifetime.
- Parameters:
sessionID- TODO javadoc me please
-
getSessionID
public java.lang.String getSessionID()
-
-