Esempio n. 1
0
  private ItemChangeMeetingResponse handleSingleResponse(UserDataRequest udr, MeetingResponse item)
      throws CollectionNotFoundException, ProcessingEmailException, ConversionException {

    MSEmail email = retrieveMailWithMeetingRequest(udr, item);

    ItemChangeMeetingResponse meetingResponse = new ItemChangeMeetingResponse();

    if (email != null) {
      handle(meetingResponse, udr, email, item.getUserResponse());
      deleteInvitationEmail(udr, item);
    } else {
      meetingResponse.setStatus(MeetingResponseStatus.INVALID_MEETING_RREQUEST);
    }

    meetingResponse.setReqId(item.getReqId());
    return meetingResponse;
  }
Esempio n. 2
0
  private void handle(
      ItemChangeMeetingResponse meetingResponse,
      UserDataRequest udr,
      MSEmail email,
      AttendeeStatus userResponse)
      throws ConversionException {

    meetingResponse.setStatus(MeetingResponseStatus.SUCCESS);
    try {
      String calId = calendarBackend.handleMeetingResponse(udr, email, userResponse);
      if (!AttendeeStatus.DECLINE.equals(userResponse)) {
        meetingResponse.setCalId(calId);
      }
    } catch (ItemNotFoundException e) {
      logger.error(e.getMessage(), e);
      meetingResponse.setStatus(MeetingResponseStatus.SERVER_ERROR);
    } catch (UnexpectedObmSyncServerException e) {
      logger.error(e.getMessage(), e);
      meetingResponse.setStatus(MeetingResponseStatus.SERVER_ERROR);
    } catch (DaoException e) {
      logger.error(e.getMessage(), e);
      meetingResponse.setStatus(MeetingResponseStatus.SERVER_ERROR);
    } catch (CollectionNotFoundException e) {
      logger.error(e.getMessage(), e);
      meetingResponse.setStatus(MeetingResponseStatus.INVALID_MEETING_RREQUEST);
    }
  }