コード例 #1
0
  public String getAttendeeString(Appointment appointment) {

    String attendeeString = "";

    Reservation raplaReservation = appointment.getReservation();
    Allocatable[] raplaPersons = raplaReservation.getPersons();

    for (int i = 0; i < raplaPersons.length; i++) {
      if (!isReserved(raplaPersons[i], appointment)) continue;

      attendeeString += raplaPersons[i].getName(raplaLocale.getLocale());
      attendeeString = attendeeString.trim();

      if (i != raplaPersons.length - 1) {
        attendeeString += ", ";
      } else {
        attendeeString = " [" + attendeeString + "]";
      }
    }

    return attendeeString;
  }