public void replaceUserIds(Map<String, String> old2newId) { List<CfUser> users = getCfUsers(); for (CfUser user : users) { String newName = old2newId.get(user.getid()); if (newName != null) { cfContent.replaceStringInDescription(user.getid(), newName); user.setid(newName); } else { System.err.println("No new name for " + user.getid()); } } }
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; }