tigase.xmpp.impl.roster

## Class RosterFlat

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

-     public class RosterFlat
      extends RosterAbstract

  Describe class RosterFlat here. Created: Tue Feb 21 18:05:53 2006
  Author:
    Artur Hefczyc

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class tigase.xmpp.impl.roster.RosterAbstract

      `RosterAbstract.PresenceType, RosterAbstract.StateTransition, RosterAbstract.SubscriptionType`

  - ### Field Summary

    - ### Fields inherited from class tigase.xmpp.impl.roster.RosterAbstract

      `CLIENT_XMLNS, DISCO_FEATURES, emptyNameAllowed, FEATURES, FROM_SUBSCRIBED, GROUP, GROUPS, INITIAL_PRESENCES, maxRosterSize, NAME, PENDING_IN, PENDING_OUT, ROSTER, ROSTER_XMLNS, ROSTERHASH, SUB_BOTH, SUB_FROM, SUB_NONE, SUB_TO, SUBSCRIPTION, TO_SUBSCRIBED, VER_ATT, XMLNS, XMLNS_DYNAMIC, XMLNS_LOAD`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RosterFlat()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `addBuddy(RosterElement relem, Map<BareJID,RosterElement> roster)`
    `void` | `addBuddy(XMPPResourceConnection session, JID buddy, String name, String[] groups, String otherData)`
    `boolean` | `addBuddyGroup(XMPPResourceConnection session, JID buddy, String[] groups)`
    `RosterElement` | `addTempBuddy(JID buddy, XMPPResourceConnection session)`
    `boolean` | `containsBuddy(XMPPResourceConnection session, JID buddy)`
    `JID[]` | `getBuddies(XMPPResourceConnection session)`
    `String[]` | `getBuddyGroups(XMPPResourceConnection session, JID buddy)`
    `Element` | `getBuddyItem(RosterElement relem)`
    `Element` | `getBuddyItem(XMPPResourceConnection session, JID buddy)`
    `String` | `getBuddyName(XMPPResourceConnection session, JID buddy)`
    `RosterAbstract.SubscriptionType` | `getBuddySubscription(XMPPResourceConnection session, JID buddy)`
    `Element` | `getCustomChild(XMPPResourceConnection session, JID buddy)`
    `RosterElement` | `getRosterElement(XMPPResourceConnection session, JID buddy)`
    `RosterElement` | `getRosterElementInstance(JID buddy, String name, String[] groups, XMPPResourceConnection session)`
    `List<Element>` | `getRosterItems(XMPPResourceConnection session)`
    `protected Map<BareJID,RosterElement>` | `getUserRoster(XMPPResourceConnection session)`
    `boolean` | `isModified(XMPPResourceConnection session)`
    `boolean` | `isOnline(XMPPResourceConnection session, JID buddy)`
    `boolean` | `isRosterLoaded(XMPPResourceConnection session)` Check if data containing user roster for this session is loaded from database
    `void` | `logout(XMPPResourceConnection session)`
    `boolean` | `parseRoster(String roster_str, Map<BareJID,RosterElement> roster, XMPPResourceConnection session)`
    `static boolean` | `parseRosterUtil(String roster_str, Map<BareJID,RosterElement> roster, XMPPResourceConnection session)`
    `boolean` | `presenceSent(XMPPResourceConnection session, JID buddy)`
    `boolean` | `removeBuddy(XMPPResourceConnection session, JID jid)`
    `protected void` | `saveUserRoster(XMPPResourceConnection session)`
    `void` | `setBuddyName(XMPPResourceConnection session, JID buddy, String name)`
    `void` | `setBuddySubscription(XMPPResourceConnection session, RosterAbstract.SubscriptionType subscription, JID buddy)`
    `void` | `setOnline(XMPPResourceConnection session, JID buddy, boolean online)`
    `void` | `setPresenceSent(XMPPResourceConnection session, JID buddy, boolean sent)`

    - ### Methods inherited from class tigase.xmpp.impl.roster.RosterAbstract

      `getBuddies, getBuddiesHash, getCustomChildren, getPresenceType, getStateTransition, groupNode, init, isPendingIn, isSubscribedFrom, isSubscribedFrom, isSubscribedTo, setProperties, updateBuddyChange, updateBuddySubscription, updateRosterHash`

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

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

- - ### Constructor Detail

    - #### RosterFlat

          public RosterFlat()

  - ### Method Detail

    - #### addBuddy

          public static boolean addBuddy(RosterElement relem,
                                         Map<BareJID,RosterElement> roster)

    - #### addTempBuddy

          public RosterElement addTempBuddy(JID buddy,
                                            XMPPResourceConnection session)
                                     throws NotAuthorizedException,
                                            TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### parseRosterUtil

          public static boolean parseRosterUtil(String roster_str,
                                                Map<BareJID,RosterElement> roster,
                                                XMPPResourceConnection session)

    - #### addBuddy

          public void addBuddy(XMPPResourceConnection session,
                               JID buddy,
                               String name,
                               String[] groups,
                               String otherData)
                        throws NotAuthorizedException,
                               TigaseDBException,
                               PolicyViolationException

      Specified by:
        `addBuddy` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`
        `PolicyViolationException`

    - #### addBuddyGroup

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

      Specified by:
        `addBuddyGroup` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### containsBuddy

          public boolean containsBuddy(XMPPResourceConnection session,
                                       JID buddy)
                                throws NotAuthorizedException,
                                       TigaseDBException

      Specified by:
        `containsBuddy` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getBuddies

          public JID[] getBuddies(XMPPResourceConnection session)
                           throws NotAuthorizedException,
                                  TigaseDBException

      Specified by:
        `getBuddies` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getBuddyGroups

          public String[] getBuddyGroups(XMPPResourceConnection session,
                                         JID buddy)
                                  throws NotAuthorizedException,
                                         TigaseDBException

      Specified by:
        `getBuddyGroups` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getBuddyItem

          public Element getBuddyItem(RosterElement relem)

    - #### getBuddyItem

          public Element getBuddyItem(XMPPResourceConnection session,
                                      JID buddy)
                               throws NotAuthorizedException,
                                      TigaseDBException

      Overrides:
        `getBuddyItem` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getBuddyName

          public String getBuddyName(XMPPResourceConnection session,
                                     JID buddy)
                              throws NotAuthorizedException,
                                     TigaseDBException

      Specified by:
        `getBuddyName` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getBuddySubscription

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

      Specified by:
        `getBuddySubscription` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getRosterElementInstance

          public RosterElement getRosterElementInstance(JID buddy,
                                                        String name,
                                                        String[] groups,
                                                        XMPPResourceConnection session)

    - #### getRosterItems

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

      Overrides:
        `getRosterItems` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### isRosterLoaded

          public boolean isRosterLoaded(XMPPResourceConnection session)

      Description copied from class: `RosterAbstract`
      Check if data containing user roster for this session is loaded from database
      Specified by:
        `isRosterLoaded` in class `RosterAbstract`
      Returns:

    - #### isOnline

          public boolean isOnline(XMPPResourceConnection session,
                                  JID buddy)
                           throws NotAuthorizedException,
                                  TigaseDBException

      Specified by:
        `isOnline` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### parseRoster

          public boolean parseRoster(String roster_str,
                                     Map<BareJID,RosterElement> roster,
                                     XMPPResourceConnection session)

    - #### presenceSent

          public boolean presenceSent(XMPPResourceConnection session,
                                      JID buddy)
                               throws NotAuthorizedException,
                                      TigaseDBException

      Specified by:
        `presenceSent` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### removeBuddy

          public boolean removeBuddy(XMPPResourceConnection session,
                                     JID jid)
                              throws NotAuthorizedException,
                                     TigaseDBException

      Specified by:
        `removeBuddy` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### setBuddyName

          public void setBuddyName(XMPPResourceConnection session,
                                   JID buddy,
                                   String name)
                            throws NotAuthorizedException,
                                   TigaseDBException

      Specified by:
        `setBuddyName` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### setBuddySubscription

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

      Specified by:
        `setBuddySubscription` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### setOnline

          public void setOnline(XMPPResourceConnection session,
                                JID buddy,
                                boolean online)
                         throws NotAuthorizedException,
                                TigaseDBException

      Specified by:
        `setOnline` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### setPresenceSent

          public void setPresenceSent(XMPPResourceConnection session,
                                      JID buddy,
                                      boolean sent)
                               throws NotAuthorizedException,
                                      TigaseDBException

      Specified by:
        `setPresenceSent` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getRosterElement

          public RosterElement getRosterElement(XMPPResourceConnection session,
                                                JID buddy)
                                         throws NotAuthorizedException,
                                                TigaseDBException

      Specified by:
        `getRosterElement` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getUserRoster

          protected Map<BareJID,RosterElement> getUserRoster(XMPPResourceConnection session)
                                                      throws NotAuthorizedException,
                                                             TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### saveUserRoster

          protected void saveUserRoster(XMPPResourceConnection session)
                                 throws NotAuthorizedException,
                                        TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getCustomChild

          public Element getCustomChild(XMPPResourceConnection session,
                                        JID buddy)
                                 throws NotAuthorizedException,
                                        TigaseDBException

      Specified by:
        `getCustomChild` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### logout

          public void logout(XMPPResourceConnection session)

      Specified by:
        `logout` in class `RosterAbstract`

    - #### isModified

          public boolean isModified(XMPPResourceConnection session)
                             throws NotAuthorizedException,
                                    TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

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