tigase.xmpp.impl.roster

## Class DynamicRosterTest

- java.lang.Object
- - tigase.xmpp.impl.roster.DynamicRosterTest

- All Implemented Interfaces:
    DynamicRosterIfc

      public class DynamicRosterTest
      extends Object
      implements DynamicRosterIfc

  Created: Nov 28, 2008 10:27:55 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DynamicRosterTest()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `tigase.xmpp.JID[]` | `getBuddies(XMPPResourceConnection session)` Method description
    `tigase.xml.Element` | `getBuddyItem(XMPPResourceConnection session, tigase.xmpp.JID buddy)` Method description
    `tigase.xml.Element` | `getItemExtraData(tigase.xml.Element item)` Method description
    `List<tigase.xml.Element>` | `getRosterItems(XMPPResourceConnection session)` Method description
    `void` | `init(Map<String,Object> props)` Method description
    `void` | `init(String par)` Method description
    `void` | `setItemExtraData(tigase.xml.Element item)` Method description

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DynamicRosterTest

          public DynamicRosterTest()

  - ### Method Detail

    - #### getBuddies

          public tigase.xmpp.JID[] getBuddies(XMPPResourceConnection session)
                                       throws NotAuthorizedException

      Method description
      Specified by:
        `getBuddies` in interface `DynamicRosterIfc`
      Parameters:
        `session` -
      Returns:
        a `String[]` array of bare JIDs for the dynamic part of the user roster.
      Throws:
        `NotAuthorizedException`

    - #### getBuddyItem

          public tigase.xml.Element getBuddyItem(XMPPResourceConnection session,
                                        tigase.xmpp.JID buddy)
                                          throws NotAuthorizedException

      Method description
      Specified by:
        `getBuddyItem` in interface `DynamicRosterIfc`
      Parameters:
        `session` -
        `buddy` -
      Returns:
        an `Element` value of the XML element with all the roster item data - JID, subscription, nick name and groups. Sample code for creating the buddy element could look like this:

            Element item = new Element("item", new Element[] {
                 new Element("group", "Tigase devs")},
              new String[] {"jid", "subscription", "name"},
              new String[] {peer, "both", JIDUtils.getNodeNick(peer)});

      Throws:
        `NotAuthorizedException`

    - #### getItemExtraData

          public tigase.xml.Element getItemExtraData(tigase.xml.Element item)

      Method description
      Specified by:
        `getItemExtraData` in interface `DynamicRosterIfc`
      Parameters:
        `item` -
      Returns:
        a value of `Element`

    - #### getRosterItems

          public List<tigase.xml.Element> getRosterItems(XMPPResourceConnection session)
                                                  throws NotAuthorizedException

      Method description
      Specified by:
        `getRosterItems` in interface `DynamicRosterIfc`
      Parameters:
        `session` -
      Returns:
        a `List` value
      Throws:
        `NotAuthorizedException`

    - #### init

          public void init(Map<String,Object> props)

      Method description
      Specified by:
        `init` in interface `DynamicRosterIfc`
      Parameters:
        `props` -

    - #### init

          public void init(String par)

      Method description
      Specified by:
        `init` in interface `DynamicRosterIfc`
      Parameters:
        `par` -

    - #### setItemExtraData

          public void setItemExtraData(tigase.xml.Element item)

      Method description
      Specified by:
        `setItemExtraData` in interface `DynamicRosterIfc`
      Parameters:
        `item` -

Copyright © 2014 "Tigase, Inc.". All rights reserved.