示例#1
0
 // @return a csv listing of the full name of each participant
 public String getParticipantNames() {
   List<Participant> pList = sortFullParticipantListByName();
   StringBuilder csvList = new StringBuilder();
   for (Participant p : pList) {
     if (csvList.length() > 0) csvList.append(",");
     csvList.append(p.getFullName());
   }
   return csvList.toString();
 }
示例#2
0
 public Map<String, String> getParticipantIdentifiers(Identifier idType) {
   Map<String, String> idMap = new Hashtable<String, String>();
   for (Participant p : getParticipants()) {
     String nameValue;
     switch (idType) {
       case FullName:
         nameValue = p.getFullName();
         break;
       case ReverseFullName:
         nameValue = p.getLastName() + ", " + p.getFirstName();
         break;
       case LastName:
         nameValue = p.getLastName();
         break;
       default:
         nameValue = p.getUserID();
     }
     idMap.put(p.getID(), nameValue);
   }
   return idMap;
 }