tigase.xmpp.impl.roster

## Class RosterAbstract

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

- Direct Known Subclasses:
    Roster, RosterFlat

      public abstract class RosterAbstract
      extends Object

  Describe class RosterAbstract here. Created: Thu Sep 4 18:09:52 2008
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RosterAbstract.PresenceType` Enum description
    `static class` | `RosterAbstract.StateTransition` Enum description
    `static class` | `RosterAbstract.SubscriptionType` Enum description

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CLIENT_XMLNS`
    `static tigase.xml.Element[]` | `DISCO_FEATURES` Field description
    `static tigase.xml.Element[]` | `FEATURES` Field description
    `static EnumSet<RosterAbstract.SubscriptionType>` | `FROM_SUBSCRIBED` Field description
    `static String` | `GROUP` Field description
    `static String` | `GROUPS` Field description
    `static EnumSet<StanzaType>` | `INITIAL_PRESENCES` Field description
    `static String` | `NAME` Field description
    `static EnumSet<RosterAbstract.SubscriptionType>` | `PENDING_IN` Field description
    `static EnumSet<RosterAbstract.SubscriptionType>` | `PENDING_OUT` Field description
    `static String` | `ROSTER` Field description
    `static String` | `ROSTER_XMLNS` Field description
    `static String` | `ROSTERHASH` Field description
    `static EnumSet<RosterAbstract.SubscriptionType>` | `SUB_BOTH` Field description
    `static EnumSet<RosterAbstract.SubscriptionType>` | `SUB_FROM` Field description
    `static EnumSet<RosterAbstract.SubscriptionType>` | `SUB_NONE` Field description
    `static EnumSet<RosterAbstract.SubscriptionType>` | `SUB_TO` Field description
    `static String` | `SUBSCRIPTION` Field description
    `static EnumSet<RosterAbstract.SubscriptionType>` | `TO_SUBSCRIBED` Field description
    `static String` | `VER_ATT`
    `static String` | `XMLNS` Field description
    `static String` | `XMLNS_DYNAMIC` Field description

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RosterAbstract()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `addBuddy(XMPPResourceConnection session, tigase.xmpp.JID jid, String name, String[] groups, String otherData)` Method description
    `abstract boolean` | `addBuddyGroup(XMPPResourceConnection session, tigase.xmpp.JID buddy, String[] groups)` Method description
    `abstract boolean` | `containsBuddy(XMPPResourceConnection session, tigase.xmpp.JID buddy)` Method description
    `abstract tigase.xmpp.JID[]` | `getBuddies(XMPPResourceConnection session)` Method description
    `tigase.xmpp.JID[]` | `getBuddies(XMPPResourceConnection session, EnumSet<RosterAbstract.SubscriptionType> subscrs)` Method description
    `String` | `getBuddiesHash(XMPPResourceConnection session)` Method description
    `abstract String[]` | `getBuddyGroups(XMPPResourceConnection session, tigase.xmpp.JID buddy)` Method description
    `tigase.xml.Element` | `getBuddyItem(XMPPResourceConnection session, tigase.xmpp.JID buddy)` Method description
    `abstract String` | `getBuddyName(XMPPResourceConnection session, tigase.xmpp.JID buddy)` Method description
    `abstract RosterAbstract.SubscriptionType` | `getBuddySubscription(XMPPResourceConnection session, tigase.xmpp.JID buddy)` Method description
    `abstract String` | `getCustomStatus(XMPPResourceConnection session, tigase.xmpp.JID buddy)`
    `RosterAbstract.PresenceType` | `getPresenceType(XMPPResourceConnection session, Packet packet)` Method description
    `abstract RosterElementIfc` | `getRosterElement(XMPPResourceConnection session, tigase.xmpp.JID jid)`
    `List<tigase.xml.Element>` | `getRosterItems(XMPPResourceConnection session)` Method description
    `RosterAbstract.SubscriptionType` | `getStateTransition(RosterAbstract.SubscriptionType subscription, RosterAbstract.PresenceType presence)` Method description
    `String` | `groupNode(tigase.xmpp.JID buddy)` Method description
    `void` | `init(UserRepository repo)` Method description
    `abstract boolean` | `isOnline(XMPPResourceConnection session, tigase.xmpp.JID jid)` Method description
    `boolean` | `isPendingIn(XMPPResourceConnection session, tigase.xmpp.JID jid)` Method description
    `boolean` | `isSubscribedFrom(RosterAbstract.SubscriptionType subscr)` Method description
    `boolean` | `isSubscribedFrom(XMPPResourceConnection session, tigase.xmpp.JID jid)` Method description
    `boolean` | `isSubscribedTo(XMPPResourceConnection session, tigase.xmpp.JID jid)` Method description
    `abstract void` | `logout(XMPPResourceConnection session)`
    `abstract boolean` | `presenceSent(XMPPResourceConnection session, tigase.xmpp.JID jid)` Method description
    `abstract boolean` | `removeBuddy(XMPPResourceConnection session, tigase.xmpp.JID jid)` Method description
    `abstract void` | `setBuddyName(XMPPResourceConnection session, tigase.xmpp.JID buddy, String name)` Method description
    `abstract void` | `setBuddySubscription(XMPPResourceConnection session, RosterAbstract.SubscriptionType subscription, tigase.xmpp.JID buddy)` Method description
    `abstract void` | `setOnline(XMPPResourceConnection session, tigase.xmpp.JID jid, boolean online)` Method description
    `abstract void` | `setPresenceSent(XMPPResourceConnection session, tigase.xmpp.JID jid, boolean sent)` Method description
    `void` | `updateBuddyChange(XMPPResourceConnection session, Queue<Packet> results, tigase.xml.Element item)` Method description
    `boolean` | `updateBuddySubscription(XMPPResourceConnection session, RosterAbstract.PresenceType presence, tigase.xmpp.JID jid)` Method description
    `void` | `updateRosterHash(String roster_str, XMPPResourceConnection session)` Method description

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

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

- - ### Field Detail

    - #### CLIENT_XMLNS

          public static final String CLIENT_XMLNS

      See Also:
        Constant Field Values

    - #### ROSTER_XMLNS

          public static final String ROSTER_XMLNS

      Field description
      See Also:
        Constant Field Values

    - #### ROSTER

          public static final String ROSTER

      Field description
      See Also:
        Constant Field Values

    - #### GROUPS

          public static final String GROUPS

      Field description
      See Also:
        Constant Field Values

    - #### GROUP

          public static final String GROUP

      Field description
      See Also:
        Constant Field Values

    - #### NAME

          public static final String NAME

      Field description
      See Also:
        Constant Field Values

    - #### SUBSCRIPTION

          public static final String SUBSCRIPTION

      Field description
      See Also:
        Constant Field Values

    - #### ROSTERHASH

          public static final String ROSTERHASH

      Field description
      See Also:
        Constant Field Values

    - #### XMLNS

          public static final String XMLNS

      Field description
      See Also:
        Constant Field Values

    - #### XMLNS_DYNAMIC

          public static final String XMLNS_DYNAMIC

      Field description
      See Also:
        Constant Field Values

    - #### VER_ATT

          public static final String VER_ATT

      See Also:
        Constant Field Values

    - #### DISCO_FEATURES

          public static final tigase.xml.Element[] DISCO_FEATURES

      Field description

    - #### FEATURES

          public static final tigase.xml.Element[] FEATURES

      Field description

    - #### SUB_NONE

          public static final EnumSet<RosterAbstract.SubscriptionType> SUB_NONE

      Field description

    - #### SUB_TO

          public static final EnumSet<RosterAbstract.SubscriptionType> SUB_TO

      Field description

    - #### SUB_FROM

          public static final EnumSet<RosterAbstract.SubscriptionType> SUB_FROM

      Field description

    - #### SUB_BOTH

          public static final EnumSet<RosterAbstract.SubscriptionType> SUB_BOTH

      Field description

    - #### TO_SUBSCRIBED

          public static final EnumSet<RosterAbstract.SubscriptionType> TO_SUBSCRIBED

      Field description

    - #### FROM_SUBSCRIBED

          public static final EnumSet<RosterAbstract.SubscriptionType> FROM_SUBSCRIBED

      Field description

    - #### INITIAL_PRESENCES

          public static final EnumSet<StanzaType> INITIAL_PRESENCES

      Field description

    - #### PENDING_IN

          public static final EnumSet<RosterAbstract.SubscriptionType> PENDING_IN

      Field description

    - #### PENDING_OUT

          public static final EnumSet<RosterAbstract.SubscriptionType> PENDING_OUT

      Field description

  - ### Constructor Detail

    - #### RosterAbstract

          public RosterAbstract()

  - ### Method Detail

    - #### addBuddy

          public abstract void addBuddy(XMPPResourceConnection session,
                      tigase.xmpp.JID jid,
                      String name,
                      String[] groups,
                      String otherData)
                                 throws NotAuthorizedException,
                                        TigaseDBException

      Method description
      Parameters:
        `session` -
        `jid` -
        `name` -
        `groups` -
        `otherData` -
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### addBuddyGroup

          public abstract boolean addBuddyGroup(XMPPResourceConnection session,
                              tigase.xmpp.JID buddy,
                              String[] groups)
                                         throws NotAuthorizedException,
                                                TigaseDBException

      Method description
      Parameters:
        `session` -
        `buddy` -
        `groups` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### containsBuddy

          public abstract boolean containsBuddy(XMPPResourceConnection session,
                              tigase.xmpp.JID buddy)
                                         throws NotAuthorizedException,
                                                TigaseDBException

      Method description
      Parameters:
        `session` -
        `buddy` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getBuddies

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

      Method description
      Parameters:
        `session` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getBuddyGroups

          public abstract String[] getBuddyGroups(XMPPResourceConnection session,
                                tigase.xmpp.JID buddy)
                                           throws NotAuthorizedException,
                                                  TigaseDBException

      Method description
      Parameters:
        `session` -
        `buddy` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getBuddyName

          public abstract String getBuddyName(XMPPResourceConnection session,
                            tigase.xmpp.JID buddy)
                                       throws NotAuthorizedException,
                                              TigaseDBException

      Method description
      Parameters:
        `session` -
        `buddy` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getBuddySubscription

          public abstract RosterAbstract.SubscriptionType getBuddySubscription(XMPPResourceConnection session,
                                                             tigase.xmpp.JID buddy)
                                                                        throws NotAuthorizedException,
                                                                               TigaseDBException

      Method description
      Parameters:
        `session` -
        `buddy` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### isOnline

          public abstract boolean isOnline(XMPPResourceConnection session,
                         tigase.xmpp.JID jid)
                                    throws NotAuthorizedException,
                                           TigaseDBException

      Method description
      Parameters:
        `session` -
        `jid` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### presenceSent

          public abstract boolean presenceSent(XMPPResourceConnection session,
                             tigase.xmpp.JID jid)
                                        throws NotAuthorizedException,
                                               TigaseDBException

      Method description
      Parameters:
        `session` -
        `jid` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### removeBuddy

          public abstract boolean removeBuddy(XMPPResourceConnection session,
                            tigase.xmpp.JID jid)
                                       throws NotAuthorizedException,
                                              TigaseDBException

      Method description
      Parameters:
        `session` -
        `jid` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### setBuddyName

          public abstract void setBuddyName(XMPPResourceConnection session,
                          tigase.xmpp.JID buddy,
                          String name)
                                     throws NotAuthorizedException,
                                            TigaseDBException

      Method description
      Parameters:
        `session` -
        `buddy` -
        `name` -
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### setBuddySubscription

          public abstract void setBuddySubscription(XMPPResourceConnection session,
                                  RosterAbstract.SubscriptionType subscription,
                                  tigase.xmpp.JID buddy)
                                             throws NotAuthorizedException,
                                                    TigaseDBException

      Method description
      Parameters:
        `session` -
        `subscription` -
        `buddy` -
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### setOnline

          public abstract void setOnline(XMPPResourceConnection session,
                       tigase.xmpp.JID jid,
                       boolean online)
                                  throws NotAuthorizedException,
                                         TigaseDBException

      Method description
      Parameters:
        `session` -
        `jid` -
        `online` -
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### setPresenceSent

          public abstract void setPresenceSent(XMPPResourceConnection session,
                             tigase.xmpp.JID jid,
                             boolean sent)
                                        throws NotAuthorizedException,
                                               TigaseDBException

      Method description
      Parameters:
        `session` -
        `jid` -
        `sent` -
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getRosterElement

          public abstract RosterElementIfc getRosterElement(XMPPResourceConnection session,
                                          tigase.xmpp.JID jid)
                                                     throws NotAuthorizedException,
                                                            TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getBuddies

          public tigase.xmpp.JID[] getBuddies(XMPPResourceConnection session,
                                     EnumSet<RosterAbstract.SubscriptionType> subscrs)
                                       throws NotAuthorizedException,
                                              TigaseDBException

      Method description
      Parameters:
        `session` -
        `subscrs` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getBuddiesHash

          public String getBuddiesHash(XMPPResourceConnection session)

      Method description
      Parameters:
        `session` -
      Returns:

    - #### getBuddyItem

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

      Method description
      Parameters:
        `session` -
        `buddy` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getPresenceType

          public RosterAbstract.PresenceType getPresenceType(XMPPResourceConnection session,
                                                    Packet packet)
                                                      throws NotAuthorizedException

      Method description
      Parameters:
        `session` -
        `packet` -
      Returns:
      Throws:
        `NotAuthorizedException`

    - #### getRosterItems

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

      Method description
      Parameters:
        `session` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getStateTransition

          public RosterAbstract.SubscriptionType getStateTransition(RosterAbstract.SubscriptionType subscription,
                                                           RosterAbstract.PresenceType presence)

      Method description
      Parameters:
        `subscription` -
        `presence` -
      Returns:

    - #### groupNode

          public String groupNode(tigase.xmpp.JID buddy)

      Method description
      Parameters:
        `buddy` -
      Returns:

    - #### init

          public void init(UserRepository repo)
                    throws TigaseDBException,
                           TigaseDBException

      Method description
      Parameters:
        `repo` -
      Throws:
        `TigaseDBException`
        `TigaseDBException`

    - #### isPendingIn

          public boolean isPendingIn(XMPPResourceConnection session,
                            tigase.xmpp.JID jid)
                              throws NotAuthorizedException,
                                     TigaseDBException

      Method description
      Parameters:
        `session` -
        `jid` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### isSubscribedFrom

          public boolean isSubscribedFrom(XMPPResourceConnection session,
                                 tigase.xmpp.JID jid)
                                   throws NotAuthorizedException,
                                          TigaseDBException

      Method description
      Parameters:
        `session` -
        `jid` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### isSubscribedFrom

          public boolean isSubscribedFrom(RosterAbstract.SubscriptionType subscr)

      Method description
      Parameters:
        `subscr` -
      Returns:

    - #### isSubscribedTo

          public boolean isSubscribedTo(XMPPResourceConnection session,
                               tigase.xmpp.JID jid)
                                 throws NotAuthorizedException,
                                        TigaseDBException

      Method description
      Parameters:
        `session` -
        `jid` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### updateBuddyChange

          public void updateBuddyChange(XMPPResourceConnection session,
                               Queue<Packet> results,
                               tigase.xml.Element item)
                                 throws NotAuthorizedException,
                                        TigaseDBException,
                                        NoConnectionIdException

      Method description
      Parameters:
        `session` -
        `results` -
        `item` -
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`
        `NoConnectionIdException`

    - #### updateBuddySubscription

          public boolean updateBuddySubscription(XMPPResourceConnection session,
                                        RosterAbstract.PresenceType presence,
                                        tigase.xmpp.JID jid)
                                          throws NotAuthorizedException,
                                                 TigaseDBException

      Method description
      Parameters:
        `session` -
        `presence` -
        `jid` -
      Returns:
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### updateRosterHash

          public void updateRosterHash(String roster_str,
                              XMPPResourceConnection session)

      Method description
      Parameters:
        `roster_str` -
        `session` -

    - #### logout

          public abstract void logout(XMPPResourceConnection session)

    - #### getCustomStatus

          public abstract String getCustomStatus(XMPPResourceConnection session,
                               tigase.xmpp.JID buddy)
                                          throws NotAuthorizedException,
                                                 TigaseDBException

      Parameters:
        `session` -
        `buddy` -
      Returns:
      Throws:
        `TigaseDBException`
        `NotAuthorizedException`

Copyright © 2013 Tigase. All rights reserved.