Package jetbrains.communicator.core.users

Examples of jetbrains.communicator.core.users.User


    Set selectedUsers = mySelectionProcessor.getSelectedUsers();

    assertEquals("Wrong number of selected users: " + selectedUsers,
        userNames.length, selectedUsers.size());
    for (Iterator it = selectedUsers.iterator(); it.hasNext();) {
      User user = (User) it.next();
      assertTrue("Unknown user:" + user, Arrays.asList(userNames).contains(user.getName()));
    }
  }
View Full Code Here


  private static String getTargetGroup(JComponent comp) {
    final Object userObject = getUserObject(comp);
    String group = userObject != null ? userObject.toString() : UserModel.DEFAULT_GROUP;
    if (userObject instanceof User) {
      User user = (User) userObject;
      group = user.getGroup();
    }
    return group;
  }
View Full Code Here

        groupsToDelete.add(selectedNode);
      }
    }

    for (Iterator it = usersToDelete.iterator(); it.hasNext();) {
      User user = (User) it.next();
      if (groupsToDelete.contains(user.getGroup())) {
        it.remove();
      }
    }
  }
View Full Code Here

    myFacade = facade;
    myUserListComponent = userListComponent;
  }

  public boolean isEnabled() {
    User selectedUser = myUserListComponent.getSelectedUser();
    return selectedUser != null && selectedUser.isOnline() && selectedUser.hasIDEtalkClient();
  }
View Full Code Here

    User selectedUser = myUserListComponent.getSelectedUser();
    return selectedUser != null && selectedUser.isOnline() && selectedUser.hasIDEtalkClient();
  }

  public void execute() {
    User user = myUserListComponent.getSelectedUser();
    assert user != null;
    ProjectsData projectsData = user.getProjectsData(myFacade);
    if (projectsData.isEmpty()) {
      myFacade.showMessage(StringUtil.getMsg("ViewFilesCommand.no.information"),
          StringUtil.getMsg("ViewFilesCommand.no.information.for.user", user.getDisplayName())
      );
    }
    else {
      myFacade.showUserFiles(user, projectsData);
    }
View Full Code Here

    }
    List<User> users = finalUsers[0];
    if (users == null) return;

    for (Iterator<User> it = users.iterator(); it.hasNext();) {
      User user = it.next();
      if ( user.isSelf() || myUserModel.hasUser(user)) {
        it.remove();
      }
    }


    if (users.size() < 1) {
      showNoUsersFoundMessage();
      return;
    }

    UsersInfo usersInfo = myIdeFacade.chooseUsersToBeAdded(users, myUserModel.getGroups());
    User[] toBeAdded = usersInfo.getUsers();
    for (User user : toBeAdded) {
      String group = usersInfo.getGroup();
      if (UserModel.AUTO_GROUP.equals(group)) {
        String[] userProjects = user.getProjects();
        group = userProjects.length > 0 ? userProjects[0] : UserModel.DEFAULT_GROUP;
      }
      user.setGroup(group, myUserModel);
      myUserModel.addUser(user);
    }

  }
View Full Code Here

TOP

Related Classes of jetbrains.communicator.core.users.User

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.