Package nu.fw.jeti.jabber.elements

Examples of nu.fw.jeti.jabber.elements.RosterItem


        else if (infoquery.getType().equals("set"))
        {
          //add result
          for (Iterator i = roster.getItems(); i.hasNext();)
          {
            RosterItem item = (RosterItem) i.next();
            JID jid = item.getJID();
            String nick = item.getName();
            if (nick == null) nick = jid.toString();
            NormalJIDStatus oldJIDStatus = (NormalJIDStatus) jidStatussen.get(jid);
            if ("remove".equals(item.getSubscription()))
            {
              removeFromRoster(oldJIDStatus, item, jid);
            }
            else if (oldJIDStatus == null)
            {
              //group must be present (no unfiled) except when server
              if (item.getGroups() != null || jid.getUser() == null) addToRoster(nick, item, jid);
            }
            else
            {
              changeItem(oldJIDStatus, nick, item, jid);
            }
View Full Code Here


    server.addJIDStatussen(jidStatussen);
    jidTree = new JIDStatusTree();
    server.clear();
    for (Iterator i = roster.getItems(); i.hasNext();)
    {
      RosterItem item = (RosterItem) i.next();
      JIDStatus jidStatus = new NormalJIDStatus(item);
      jidStatussen.put(item.getJID(), jidStatus);
      if (item.getJID().getUser() == null)
      {
        //server /transport
        server.addServerNoFire(jidStatus);
      }
      else
      {
        if (item.getGroups() == null)
          addJIDStatus(I18N.gettext("main.main.roster.Unfiled"), jidStatus);
        else
        {
          for (Iterator j = item.getGroups().iterator(); j.hasNext();)
          {
            //new jidstatus per group?
            addJIDStatus((String) j.next(), jidStatus);
          }
        }
View Full Code Here

      if (currentGroup != null)
      {
        //backend.changeGroup(jidStatus,currentGroup,group);
        groups.remove(currentGroup);
        groups.add(group);
        IQXRoster roster = new IQXRoster(new RosterItem(jidStatus.getJID(), jidStatus.getNick(), null, null, groups));
        backend.send(new InfoQuery("set", roster));
      } else
      {
        if (!jidStatus.isGroupPresent(group))
        {
          groups.add(group);
          IQXRoster roster = new IQXRoster(new RosterItem(jidStatus.getJID(), jidStatus.getNick(), null, null, groups));
          backend.send(new InfoQuery("set", roster));
          //backend.addGroup(jidStatus,group);
        }
      }
    }
View Full Code Here

TOP

Related Classes of nu.fw.jeti.jabber.elements.RosterItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.