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.IqView
,org.jivesoftware.smack.packet.NamedElement
,org.jivesoftware.smack.packet.StanzaView
,org.jivesoftware.smack.packet.TopLevelStreamElement
,org.jivesoftware.smack.packet.XmlElement
,org.jivesoftware.smack.packet.XmlLangElement
public class AdHocCommandData extends org.jivesoftware.smack.packet.IQ
Represents the state and the request of the execution of an adhoc command.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AdHocCommandData.SpecificError
-
Constructor Summary
Constructors Constructor Description AdHocCommandData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAction(AdHocCommand.Action action)
void
addNote(AdHocCommandNote note)
AdHocCommand.Action
getAction()
Returns the action to execute.java.util.List<AdHocCommand.Action>
getActions()
AdHocCommand.Action
getExecuteAction()
DataForm
getForm()
Returns the form of the command.org.jxmpp.jid.Jid
getId()
Returns the JID of the command host.protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder
getIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder xml)
java.lang.String
getName()
Returns the human name of the command.java.lang.String
getNode()
Returns the identifier of the command.java.util.List<AdHocCommandNote>
getNotes()
Returns the list of notes that the command has.java.lang.String
getSessionID()
AdHocCommand.Status
getStatus()
Returns the status of the execution.void
removeNote(AdHocCommandNote note)
void
setAction(AdHocCommand.Action action)
void
setExecuteAction(AdHocCommand.Action executeAction)
void
setForm(DataForm form)
void
setId(org.jxmpp.jid.Jid id)
void
setName(java.lang.String name)
void
setNode(java.lang.String node)
void
setSessionID(java.lang.String sessionID)
Set the 'sessionid' attribute of the command.void
setStatus(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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
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:
getIQChildElementBuilder
in 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()
-
-