コード例 #1
0
ファイル: RemoveWaiter.java プロジェクト: kyoto-u/openpanda
  /**
   * This method perform Remove process for removing attendee from the waiting list in the
   * event/meeting.
   *
   * @param meeting a SignupMeeting object.
   * @param timeslot a SignupTimeslot object.
   * @param waiter a SignupAttendee object.
   * @return a SignupMeeting object, which is a refreshed updat-to-date data.
   * @throws Exception throw if anything goes wrong.
   */
  public SignupMeeting removeFromWaitingList(
      SignupMeeting meeting, SignupTimeslot timeslot, SignupAttendee waiter) throws Exception {
    try {

      handleVersion(meeting, timeslot, waiter);
      if (ToolManager.getCurrentPlacement() != null) {
        String signupEventType =
            isOrganizer
                ? SignupEventTypes.EVENT_SIGNUP_REMOVE_ATTENDEE_WL_L
                : SignupEventTypes.EVENT_SIGNUP_REMOVE_ATTENDEE_WL_S;
        Utilities.postEventTracking(
            signupEventType,
            ToolManager.getCurrentPlacement().getContext()
                + " meetingId:"
                + meeting.getId()
                + " -removed from wlist on TS:"
                + SignupDateFormat.format_date_h_mm_a(timeslot.getStartTime()));
      }
      logger.debug(
          "Meeting Name:"
              + meeting.getTitle()
              + " - UserId:"
              + currentUserId
              + " - has removed attendee(userId):"
              + waiter.getAttendeeUserId()
              + " from waiting list"
              + " at timeslot started at:"
              + SignupDateFormat.format_date_h_mm_a(timeslot.getStartTime()));
    } catch (PermissionException pe) {
      throw new SignupUserActionException(Utilities.rb.getString("no.permissoin.do_it"));
    } finally {
      meeting = reloadMeeting(meeting.getId());
    }
    // TODO calendar event id;
    return meeting;
  }