Package 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.RosterModifiedEvent, 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, PRE_APPROVED, 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 | Description
    --- | ---
    `RosterFlat()` |

  - ### Method Summary

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

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

      `addBuddy, addJidToRoster, getActiveConnections, getBuddies, getBuddiesHash, getCustomChildren, getEventBus, getMaxRosterSize, getPresenceType, getStateTransition, groupNode, handleRosterModified, init, isEmptyNameAllowed, isPendingIn, isPreApproved, isSubscribedFrom, isSubscribedFrom, isSubscribedTo, removeJidFromRoster, setEmptyNameAllowed, setEventBus, setMaxRosterSize, setProperties, updateBuddyChange, updateBuddySubscription, updateRosterHash, updateRosterHash, updateRosterHashForConnection`

    - ### 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,
                                         java.util.Map<BareJID,​RosterElement> roster)

    - #### parseRosterUtil

          public static boolean parseRosterUtil​(java.lang.String roster_str,
                                                java.util.Map<BareJID,​RosterElement> roster,
                                                XMPPResourceConnection session)

    - #### addTempBuddy

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

      Deprecated.
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### addBuddy

          @Deprecated
          public void addBuddy​(XMPPResourceConnection session,
                               JID buddy,
                               java.lang.String name,
                               java.lang.String[] groups,
                               RosterAbstract.SubscriptionType subscription,
                               java.lang.String otherData)
                        throws NotAuthorizedException,
                               TigaseDBException,
                               PolicyViolationException

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

    - #### addBuddy

          @Deprecated
          public void addBuddy​(XMPPResourceConnection session,
                               JID buddy,
                               java.lang.String name,
                               java.lang.String[] groups,
                               RosterAbstract.SubscriptionType subscription,
                               java.lang.String mixParticipantId,
                               java.lang.String otherData)
                        throws NotAuthorizedException,
                               TigaseDBException,
                               PolicyViolationException

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

    - #### addBuddyGroup

          @Deprecated
          public boolean addBuddyGroup​(XMPPResourceConnection session,
                                       JID buddy,
                                       java.lang.String[] groups)
                                throws NotAuthorizedException,
                                       TigaseDBException

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

    - #### containsBuddy

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

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

    - #### getBuddies

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

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

    - #### getBuddyGroups

          @Deprecated
          public java.lang.String[] getBuddyGroups​(XMPPResourceConnection session,
                                                   JID buddy)
                                            throws NotAuthorizedException,
                                                   TigaseDBException

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

    - #### getBuddyItem

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

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

    - #### getBuddyName

          @Deprecated
          public java.lang.String getBuddyName​(XMPPResourceConnection session,
                                               JID buddy)
                                        throws NotAuthorizedException,
                                               TigaseDBException

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

    - #### getBuddySubscription

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

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

    - #### getMixParticipantId

          @Deprecated
          public java.lang.String getMixParticipantId​(XMPPResourceConnection session,
                                                      JID buddy)
                                               throws NotAuthorizedException,
                                                      TigaseDBException

      Deprecated.
      Specified by:
        `getMixParticipantId` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getRosterElementInstance

          @Deprecated
          public RosterElement getRosterElementInstance​(JID buddy,
                                                        java.lang.String name,
                                                        java.lang.String[] groups,
                                                        XMPPResourceConnection session)

      Deprecated.

    - #### getRosterItems

          public java.util.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`

    - #### isOnline

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

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

    - #### parseRoster

          public boolean parseRoster​(java.lang.String roster_str,
                                     java.util.Map<BareJID,​RosterElement> roster,
                                     XMPPResourceConnection session)

    - #### presenceSent

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

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

    - #### removeBuddy

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

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

    - #### setBuddyName

          @Deprecated
          public void setBuddyName​(XMPPResourceConnection session,
                                   JID buddy,
                                   java.lang.String name)
                            throws NotAuthorizedException,
                                   TigaseDBException

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

    - #### setBuddySubscription

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

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

    - #### setOnline

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

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

    - #### setPresenceSent

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

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

    - #### getRosterElement

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

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

    - #### loadUserRoster

          public java.util.Map<BareJID,​RosterElement> loadUserRoster​(XMPPResourceConnection session)
                                                                    throws NotAuthorizedException,
                                                                           TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### rosterElementProvider

          @Deprecated
          public java.util.function.Function<JID,​RosterElement> rosterElementProvider​(XMPPResourceConnection session)
                                                                                     throws NotAuthorizedException,
                                                                                            TigaseDBException

      Deprecated.
      Specified by:
        `rosterElementProvider` in class `RosterAbstract`
      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### getCustomChild

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

      Deprecated.
      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`

    - #### getUserRoster

          protected java.util.Map<BareJID,​RosterElement> getUserRoster​(XMPPResourceConnection session)
                                                                      throws NotAuthorizedException,
                                                                             TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### modifyStoredRoster

          public void modifyStoredRoster​(UserRepository repository,
                                         BareJID owner,
                                         java.util.function.Consumer<java.util.Map<BareJID,​RosterElement>> modifyRoster)
                                  throws TigaseDBException

      Overrides:
        `modifyStoredRoster` in class `RosterAbstract`
      Throws:
        `TigaseDBException`

    - #### saveUserRoster

          protected void saveUserRoster​(XMPPResourceConnection session)
                                 throws NotAuthorizedException,
                                        TigaseDBException

      Throws:
        `NotAuthorizedException`
        `TigaseDBException`

    - #### updateRosterItem

          protected void updateRosterItem​(XMPPResourceConnection session,
                                          RosterAbstract.RosterModifiedEvent event)
                                   throws NotAuthorizedException,
                                          TigaseDBException

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