Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber.extensions.coin
Class UserRolesPacketExtension

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.jabber.extensions.AbstractPacketExtension
      extended by net.java.sip.communicator.impl.protocol.jabber.extensions.coin.UserRolesPacketExtension
All Implemented Interfaces:
org.jivesoftware.smack.packet.PacketExtension

public class UserRolesPacketExtension
extends AbstractPacketExtension

User roles packet extension.

Author:
Sebastien Vincent

Field Summary
static String ELEMENT_NAME
          The name of the element that contains the user roles data.
static String ELEMENT_ROLE
          Subject element name.
static String NAMESPACE
          The namespace that user roles belongs to.
 
Fields inherited from class net.java.sip.communicator.impl.protocol.jabber.extensions.AbstractPacketExtension
attributes
 
Constructor Summary
UserRolesPacketExtension()
          Constructor.
 
Method Summary
 void addRoles(String role)
          Add roles.
 List<String> getRoles()
          Get list of roles.
 String toXML()
          Returns an XML representation of this extension.
 
Methods inherited from class net.java.sip.communicator.impl.protocol.jabber.extensions.AbstractPacketExtension
addChildExtension, getAttribute, getAttributeAsInt, getAttributeAsInt, getAttributeAsString, getAttributeAsURI, getAttributeNames, getChildExtensions, getChildExtensionsOfType, getElementName, getFirstChildOfType, getNamespace, getText, removeAttribute, setAttribute, setNamespace, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE

public static final String NAMESPACE
The namespace that user roles belongs to.

See Also:
Constant Field Values

ELEMENT_NAME

public static final String ELEMENT_NAME
The name of the element that contains the user roles data.

See Also:
Constant Field Values

ELEMENT_ROLE

public static final String ELEMENT_ROLE
Subject element name.

See Also:
Constant Field Values
Constructor Detail

UserRolesPacketExtension

public UserRolesPacketExtension()
Constructor.

Method Detail

addRoles

public void addRoles(String role)
Add roles.

Parameters:
role - role to add

getRoles

public List<String> getRoles()
Get list of roles.

Returns:
list of roles

toXML

public String toXML()
Returns an XML representation of this extension.

Specified by:
toXML in interface org.jivesoftware.smack.packet.PacketExtension
Overrides:
toXML in class AbstractPacketExtension
Returns:
an XML representation of this extension.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.