Esempio n. 1
0
 public CfUser getUserWithRole(String role) {
   for (CfUser user : cfUsers) {
     if (user.getrole().equalsIgnoreCase(role)) {
       return user;
     }
   }
   return null;
 }
Esempio n. 2
0
 public List<CfUser> getUsersWithRole(String role) {
   List<CfUser> users = new Vector<CfUser>();
   for (CfUser user : cfUsers) {
     if (user.getrole().equals(role)) {
       users.add(user);
     }
   }
   return users;
 }
Esempio n. 3
0
 public String getListofUsersAsStringWithRole(String role) {
   String list = "";
   for (CfUser user : cfUsers) {
     if (user.getrole().equalsIgnoreCase(role)) {
       list = list + user.getid() + ", ";
     }
   }
   if (list.endsWith(", ")) {
     list = list.substring(0, list.length() - 2);
   }
   return list;
 }