Exemple #1
0
  private String importICalendar(
      final AccessToken token, final Request request, XmlResponder responder, String clientId)
      throws ImportICalendarException, ServerFault, NotAllowedException {

    final String calendar = request.getParameter("calendar");
    final String ics = request.getParameter("ics");

    int countEvent = binding.importICalendar(token, calendar, ics, clientId);
    return responder.sendInt(countEvent);
  }
Exemple #2
0
  private String getEventObmIdFromExtId(AccessToken at, Request request, XmlResponder responder)
      throws ServerFault, EventNotFoundException, NotAllowedException {

    EventObmId id =
        binding.getEventObmIdFromExtId(at, getCalendar(request), getExtId(request, "extId"));
    if (id != null) {
      return responder.sendInt(id.getObmId());
    }
    return responder.sendError("not found");
  }
Exemple #3
0
 private String createEvent(AccessToken at, Request request, XmlResponder responder)
     throws ServerFault, SAXException, IOException, FactoryConfigurationError,
         EventAlreadyExistException, NotAllowedException, PermissionException {
   EventObmId ev =
       binding.createEvent(
           at,
           getCalendar(request),
           getEvent(request),
           getNotificationOption(request),
           getClientId(request));
   return responder.sendInt(ev.getObmId());
 }