Package org.olat.instantMessaging.ui

Examples of org.olat.instantMessaging.ui.ConnectedUsersListEntry


     
      //localy we do not have all information we need
      //todo, add dummy values locally as we do not have authUserSessions
      if (CoordinatorManager.getCoordinator().isClusterMode()) {
        List<ConnectedUsersListEntry> l = im.getAllConnectedUsers(null);
        ConnectedUsersListEntry entry = l.get(1);
        assertNotNull(entry);
      }
     
     
      im.getClientManager().destroyInstantMessagingClient(testUserA);
View Full Code Here


   
    for (Iterator<Item> iter = sessions.iterator(); iter.hasNext();) {
      IMSessionItems.Item item = iter.next();
     
      if (item.getResource().startsWith(IMConfig.RESOURCE)) {
        ConnectedUsersListEntry entry = (ConnectedUsersListEntry)sessionItemsCache.get(item.getUsername());
        if (entry != null && !item.getUsername().equals(currentUsername)) {
          entries.add(entry);
          if (log.isDebug()) log.debug("loading item from cache: "+item.getUsername());
        } else {
       
          Identity identity = ManagerFactory.getManager().findIdentityByName(item.getUsername());
          if (identity != null) {
            identity = (Identity) DBFactory.getInstance().loadObject(identity);
            try {
              ImPrefsManager ipm = ImPrefsManager.getInstance();
              ImPreferences imPrefs = ipm.loadOrCreatePropertiesFor(identity);
              if ( (imPrefs != null) ) {
                entry = new ConnectedUsersListEntry(item.getUsername(), identity.getUser().getPreferences().getLanguage());
                entry.setName(identity.getUser().getProperty(UserConstants.LASTNAME, null));
                entry.setPrename(identity.getUser().getProperty(UserConstants.FIRSTNAME, null));
                entry.setShowAwarenessMessage(imPrefs.isAwarenessVisible());
                entry.setShowOnlineTime(imPrefs.isOnlineTimeVisible());
                entry.setAwarenessMessage(item.getPresenceMsg());
                entry.setInstantMessagingStatus(item.getPresenceStatus());
                entry.setLastActivity(item.getLastActivity());
                entry.setOnlineTime(item.getLoginTime());
                entry.setJabberId(InstantMessagingModule.getAdapter().getUserJid(item.getUsername()));
                entry.setVisibleToOthers(imPrefs.isVisibleToOthers());
                entry.setResource(item.getResource());
                entries.add(entry);
               
                //put in cache. Sync. is done by cache
                sessionItemsCache.put(item.getUsername(), entry);
              }
View Full Code Here

TOP

Related Classes of org.olat.instantMessaging.ui.ConnectedUsersListEntry

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.