Class AdHocCommandDataBuilder
- java.lang.Object
-
- org.jivesoftware.smack.packet.StanzaBuilder<IB>
-
- org.jivesoftware.smack.packet.AbstractIqBuilder<IB>
-
- org.jivesoftware.smack.packet.IqBuilder<AdHocCommandDataBuilder,AdHocCommandData>
-
- org.jivesoftware.smackx.commands.packet.AdHocCommandDataBuilder
-
- All Implemented Interfaces:
IqView
,StanzaView
,XmlLangElement
,AdHocCommandDataView
public class AdHocCommandDataBuilder extends IqBuilder<AdHocCommandDataBuilder,AdHocCommandData> implements AdHocCommandDataView
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AdHocCommandDataBuilder.NextStage
static class
AdHocCommandDataBuilder.PreviousStage
-
Field Summary
-
Fields inherited from class org.jivesoftware.smack.packet.AbstractIqBuilder
type
-
-
Method Summary
-
Methods inherited from class org.jivesoftware.smack.packet.AbstractIqBuilder
addStanzaSpecificAttributes, createErrorResponse, createResponse, createResponse, getType
-
Methods inherited from class org.jivesoftware.smack.packet.StanzaBuilder
addExtension, addExtensions, addOptExtensions, buildIqData, buildMessage, buildMessage, buildMessageFrom, buildMessageFrom, buildPresence, buildPresence, buildPresenceFrom, buildPresenceFrom, buildResponse, from, from, getError, getExtension, getExtensions, getExtensions, getExtensions, getFrom, getLanguage, getStanzaId, getTo, overrideExtension, removeExtension, removeExtension, setError, setLanguage, throwIfNoStanzaId, to, to, toString, willBuildStanzaWithId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smackx.commands.packet.AdHocCommandDataView
isCompleted, isExecuting
-
Methods inherited from interface org.jivesoftware.smack.packet.IqView
getType, isRequestIQ, isResponseIQ
-
Methods inherited from interface org.jivesoftware.smack.packet.StanzaView
getError, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getFrom, getStanzaId, getTo, hasExtension, hasExtension, hasExtension
-
Methods inherited from interface org.jivesoftware.smack.packet.XmlLangElement
getLanguage
-
-
-
-
Method Detail
-
getNode
public String getNode()
Description copied from interface:AdHocCommandDataView
Returns the identifier of the command.- Specified by:
getNode
in interfaceAdHocCommandDataView
- Returns:
- the node.
-
getName
public String getName()
Description copied from interface:AdHocCommandDataView
Returns the human name of the command.- Specified by:
getName
in interfaceAdHocCommandDataView
- Returns:
- the name of the command.
-
setName
public AdHocCommandDataBuilder setName(String name)
-
getSessionId
public String getSessionId()
- Specified by:
getSessionId
in interfaceAdHocCommandDataView
-
setSessionId
public AdHocCommandDataBuilder setSessionId(String sessionId)
-
getNotes
public List<AdHocCommandNote> getNotes()
Description copied from interface:AdHocCommandDataView
Returns the list of notes that the command has.- Specified by:
getNotes
in interfaceAdHocCommandDataView
- Returns:
- the notes.
-
addNote
public AdHocCommandDataBuilder addNote(AdHocCommandNote note)
-
getForm
public DataForm getForm()
Description copied from interface:AdHocCommandDataView
Returns the form of the command.- Specified by:
getForm
in interfaceAdHocCommandDataView
- Returns:
- the data form associated with the command.
-
setForm
public AdHocCommandDataBuilder setForm(DataForm form)
-
getAction
public AdHocCommandData.Action getAction()
Description copied from interface:AdHocCommandDataView
Returns the action to execute. The action is set only on a request.- Specified by:
getAction
in interfaceAdHocCommandDataView
- Returns:
- the action to execute.
-
setAction
public AdHocCommandDataBuilder setAction(AdHocCommandData.Action action)
-
getStatus
public AdHocCommandData.Status getStatus()
Description copied from interface:AdHocCommandDataView
Returns the status of the execution.- Specified by:
getStatus
in interfaceAdHocCommandDataView
- Returns:
- the status.
-
setStatus
public AdHocCommandDataBuilder setStatus(AdHocCommandData.Status status)
-
setStatusCompleted
public AdHocCommandDataBuilder setStatusCompleted()
-
setStatusExecuting
public AdHocCommandDataBuilder setStatusExecuting(AdHocCommandDataBuilder.PreviousStage previousStage, AdHocCommandDataBuilder.NextStage nextStage)
-
getActions
public Set<AdHocCommandData.AllowedAction> getActions()
- Specified by:
getActions
in interfaceAdHocCommandDataView
-
addAction
public AdHocCommandDataBuilder addAction(AdHocCommandData.AllowedAction action)
-
getExecuteAction
public AdHocCommandData.AllowedAction getExecuteAction()
- Specified by:
getExecuteAction
in interfaceAdHocCommandDataView
-
setExecuteAction
public AdHocCommandDataBuilder setExecuteAction(AdHocCommandData.AllowedAction action)
-
build
public AdHocCommandData build()
- Specified by:
build
in classIqBuilder<AdHocCommandDataBuilder,AdHocCommandData>
-
getThis
public AdHocCommandDataBuilder getThis()
- Specified by:
getThis
in classStanzaBuilder<AdHocCommandDataBuilder>
-
buildResponseFor
public static AdHocCommandDataBuilder buildResponseFor(AdHocCommandData request)
-
buildResponseFor
public static AdHocCommandDataBuilder buildResponseFor(AdHocCommandData request, IQ.ResponseType responseType)
-
-