Smack

org.jivesoftware.smackx.workgroup.packet
Class AgentWorkgroups

java.lang.Object
  extended by org.jivesoftware.smack.packet.Packet
      extended by org.jivesoftware.smack.packet.IQ
          extended by org.jivesoftware.smackx.workgroup.packet.AgentWorkgroups

public class AgentWorkgroups
extends IQ

Represents a request for getting the jid of the workgroups where an agent can work or could represent the result of such request which will contain the list of workgroups JIDs where the agent can work.

Author:
Gaston Dombiak

Nested Class Summary
static class AgentWorkgroups.Provider
          An IQProvider for AgentWorkgroups packets.
 
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ
IQ.Type
 
Field Summary
 
Fields inherited from class org.jivesoftware.smack.packet.Packet
DEFAULT_LANGUAGE, ID_NOT_AVAILABLE
 
Constructor Summary
AgentWorkgroups(java.lang.String agentJID)
          Creates an AgentWorkgroups request for the given agent.
AgentWorkgroups(java.lang.String agentJID, java.util.List<java.lang.String> workgroups)
          Creates an AgentWorkgroups which will contain the JIDs of the workgroups where an agent can work.
 
Method Summary
 java.lang.String getAgentJID()
           
 java.lang.String getChildElementXML()
          Returns the sub-element XML section of the IQ packet, or null if there isn't one.
 java.util.List<java.lang.String> getWorkgroups()
          Returns a list of workgroup JIDs where the agent can work.
 
Methods inherited from class org.jivesoftware.smack.packet.IQ
createErrorResponse, createResultIQ, getType, setType, toXML
 
Methods inherited from class org.jivesoftware.smack.packet.Packet
addExtension, addExtensions, deleteProperty, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setProperty, setTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentWorkgroups

public AgentWorkgroups(java.lang.String agentJID)
Creates an AgentWorkgroups request for the given agent. This IQ will be sent and an answer will be received with the jid of the workgroups where the agent can work.

Parameters:
agentJID - the id of the agent to get his workgroups.

AgentWorkgroups

public AgentWorkgroups(java.lang.String agentJID,
                       java.util.List<java.lang.String> workgroups)
Creates an AgentWorkgroups which will contain the JIDs of the workgroups where an agent can work.

Parameters:
agentJID - the id of the agent that can work in the list of workgroups.
workgroups - the list of workgroup JIDs where the agent can work.
Method Detail

getAgentJID

public java.lang.String getAgentJID()

getWorkgroups

public java.util.List<java.lang.String> getWorkgroups()
Returns a list of workgroup JIDs where the agent can work.

Returns:
a list of workgroup JIDs where the agent can work.

getChildElementXML

public java.lang.String getChildElementXML()
Description copied from class: IQ
Returns the sub-element XML section of the IQ packet, or null if there isn't one. Packet extensions must be included, if any are defined.

Extensions of this class must override this method.

Specified by:
getChildElementXML in class IQ
Returns:
the child element section of the IQ XML.

Smack

Copyright © 2003-2007 Jive Software.