1 /** 2 * Copyright 2011 The Kuali Foundation Licensed under the 3 * Educational Community License, Version 2.0 (the "License"); you may 4 * not use this file except in compliance with the License. You may 5 * obtain a copy of the License at 6 * 7 * http://www.osedu.org/licenses/ECL-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, 10 * software distributed under the License is distributed on an "AS IS" 11 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 12 * or implied. See the License for the specific language governing 13 * permissions and limitations under the License. 14 */ 15 16 package org.kuali.mobility.events.controllers; 17 18 import java.text.SimpleDateFormat; 19 20 import javax.servlet.http.HttpServletRequest; 21 22 import org.kuali.mobility.security.user.api.User; 23 import org.kuali.mobility.shared.Constants; 24 //import org.kuali.mobility.user.entity.User; 25 import org.springframework.stereotype.Controller; 26 import org.springframework.ui.Model; 27 import org.springframework.web.bind.annotation.RequestMapping; 28 import org.springframework.web.bind.annotation.RequestMethod; 29 import org.springframework.web.bind.annotation.RequestParam; 30 31 //import edu.iu.es.espd.ccl.oauth.CalendarEventOAuthService; 32 //import edu.iu.es.espd.ccl.oauth.CalendarViewEvent; 33 //import edu.iu.es.espd.ccl.oauth.EditEvent; 34 //import edu.iu.es.espd.ccl.oauth.Filter; 35 //import edu.iu.es.espd.ccl.oauth.Filters; 36 //import edu.iu.es.espd.ccl.oauth.ListViewEvents; 37 //import edu.iu.es.espd.ccl.oauth.MeetingInvite; 38 //import edu.iu.es.espd.ccl.oauth.MeetingStatusChange; 39 //import edu.iu.es.espd.ccl.oauth.MonthViewEvents; 40 //import edu.iu.es.espd.ccl.oauth.PageLevelException; 41 //import edu.iu.es.espd.ccl.oauth.PendingMeetings; 42 //import edu.iu.es.espd.ccl.oauth.ViewDetailedEvent; 43 44 @Controller 45 @RequestMapping("/calendar") 46 public class CalendarController { 47 48 // @Autowired 49 // private CalendarEventOAuthService calendarEventOAuthService; 50 // 51 // public void setCalendarEventOAuthService(CalendarEventOAuthService calendarEventOAuthService) { 52 // this.calendarEventOAuthService = calendarEventOAuthService; 53 // } 54 55 @RequestMapping(method = RequestMethod.GET) 56 public String home(HttpServletRequest request, Model uiModel, @RequestParam(required = false) String date) { 57 return month(request, uiModel, date); 58 } 59 60 @RequestMapping(value = "/month", method = RequestMethod.GET) 61 public String month(HttpServletRequest request, Model uiModel, @RequestParam(required = false) String date) { 62 User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 63 SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); 64 SimpleDateFormat my = new SimpleDateFormat("yyyyMM"); 65 // Calendar selectedDate = Calendar.getInstance(); 66 // try { 67 // if (date != null) { 68 // selectedDate.setTime(my.parse(date)); 69 // } 70 // } catch (ParseException e) { 71 // 72 // } 73 // try { 74 // Filter filter = (Filter) request.getSession().getAttribute("calendar.event.filterId"); 75 // MonthViewEvents monthEvents = calendarEventOAuthService.retrieveMonthEvents(user.getLoginName(), selectedDate.getTime(), filter != null ? filter.getFilterId() : null); 76 // uiModel.addAttribute("viewData", monthEvents.getViewData()); 77 // uiModel.addAttribute("appData", monthEvents.getAppData()); 78 // 79 // int days = selectedDate.getActualMaximum(Calendar.DATE); 80 // 81 // Calendar startDate = (Calendar) selectedDate.clone(); 82 // startDate.set(Calendar.DATE, selectedDate.getActualMinimum(Calendar.DATE)); 83 // days += startDate.get(Calendar.DAY_OF_WEEK) - 1; 84 // 85 // Calendar endDate = (Calendar) selectedDate.clone(); 86 // endDate.set(Calendar.DATE, selectedDate.getActualMaximum(Calendar.DATE)); 87 // days += 7 - endDate.get(Calendar.DAY_OF_WEEK); 88 // 89 // startDate.set(Calendar.DAY_OF_WEEK, 1); 90 // Map<String, MobileDayOfMonth> daysInMonth = new LinkedHashMap<String, MobileDayOfMonth>(); 91 // 92 // uiModel.addAttribute("selectedDate", sdf.format(selectedDate.getTime())); 93 // for (int i = 0; i < days; i++) { 94 // MobileDayOfMonth mobileDayOfMonth = new MobileDayOfMonth(startDate.get(Calendar.DATE)); 95 // mobileDayOfMonth.setCurrentMonth(startDate.get(Calendar.MONTH) == selectedDate.get(Calendar.MONTH)); 96 // if (!mobileDayOfMonth.isCurrentMonth()) { 97 // mobileDayOfMonth.setBeforeCurrentMonth(startDate.get(Calendar.MONTH) < selectedDate.get(Calendar.MONTH)); 98 // } 99 // mobileDayOfMonth.setMonthYear(my.format(startDate.getTime())); 100 // mobileDayOfMonth.setDayOfWeek(startDate.get(Calendar.DAY_OF_WEEK)); 101 // daysInMonth.put(sdf.format(startDate.getTime()), mobileDayOfMonth); 102 // startDate.add(Calendar.DATE, 1); 103 // } 104 // 105 // for (Iterator iterator = monthEvents.getEvents().entrySet().iterator(); iterator.hasNext();) { 106 // Map.Entry<String, List<CalendarViewEvent>> entry = (Map.Entry<String, List<CalendarViewEvent>>) iterator.next(); 107 // MobileDayOfMonth dayInMonth = daysInMonth.get(entry.getKey()); 108 // dayInMonth.setHasEvents(true); 109 // dayInMonth.setEvents(entry.getValue()); 110 // } 111 // uiModel.addAttribute("events", daysInMonth); 112 // 113 // Calendar previousCalendar = (Calendar) selectedDate.clone(); 114 // previousCalendar.set(Calendar.DATE, 1); 115 // previousCalendar.getTime(); 116 // previousCalendar.add(Calendar.MONTH, -1); 117 // 118 // Calendar nextCalendar = (Calendar) selectedDate.clone(); 119 // nextCalendar.set(Calendar.DATE, 1); 120 // nextCalendar.getTime(); 121 // nextCalendar.add(Calendar.MONTH, 1); 122 // 123 // uiModel.addAttribute("previousMonth", my.format(previousCalendar.getTime())); 124 // uiModel.addAttribute("nextMonth", my.format(nextCalendar.getTime())); 125 // uiModel.addAttribute("monthYear", my.format(selectedDate.getTime())); 126 // uiModel.addAttribute("today", sdf.format(new Date())); 127 // uiModel.addAttribute("filter", filter); 128 // } catch (PageLevelException pageLevelException) { 129 // uiModel.addAttribute("message", pageLevelException.getMessage()); 130 // return "calendar/message"; 131 // } 132 return "calendar/month"; 133 } 134 135 @RequestMapping(value = "/list", method = RequestMethod.GET) 136 public String list(HttpServletRequest request, Model uiModel, @RequestParam(required = false) String date) { 137 User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 138 SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); 139 // Calendar selectedDate = Calendar.getInstance(); 140 // try { 141 // if (date != null) { 142 // selectedDate.setTime(sdf.parse(date)); 143 // } 144 // } catch (ParseException e) { 145 // 146 // } 147 // try { 148 // Calendar endDate = (Calendar) selectedDate.clone(); 149 // Calendar previousDate = (Calendar) selectedDate.clone(); 150 // Filter filter = (Filter) request.getSession().getAttribute("calendar.event.filterId"); 151 // ListViewEvents listViewEvents = calendarEventOAuthService.retrieveViewEventsList(user.getLoginName(), selectedDate.getTime(), filter != null ? filter.getFilterId() : null); 152 // 153 // Calendar currentEndDate = (Calendar) selectedDate.clone(); 154 // currentEndDate.add(Calendar.DATE, listViewEvents.getAppData().getListViewFutureDaysLimit()); 155 // endDate.add(Calendar.DATE, listViewEvents.getAppData().getListViewFutureDaysLimit() * 2); 156 // previousDate.add(Calendar.DATE, -listViewEvents.getAppData().getListViewFutureDaysLimit()); 157 // 158 // SimpleDateFormat my = new SimpleDateFormat("yyyyMM"); 159 // 160 // uiModel.addAttribute("selectedDate", sdf.format(selectedDate.getTime())); 161 // uiModel.addAttribute("monthSelectedDate", my.format(selectedDate.getTime())); 162 // uiModel.addAttribute("beginDate", sdf.format(selectedDate.getTime())); 163 // uiModel.addAttribute("endDate", sdf.format(endDate.getTime())); 164 // uiModel.addAttribute("currentEndDate", sdf.format(currentEndDate.getTime())); 165 // uiModel.addAttribute("previousDate", sdf.format(previousDate.getTime())); 166 // uiModel.addAttribute("days", listViewEvents.getAppData().getListViewFutureDaysLimit()); 167 // uiModel.addAttribute("viewData", listViewEvents.getViewData()); 168 // uiModel.addAttribute("appData", listViewEvents.getAppData()); 169 // uiModel.addAttribute("events", listViewEvents.getEvents()); 170 // uiModel.addAttribute("filter", filter); 171 // } catch (PageLevelException pageLevelException) { 172 // uiModel.addAttribute("message", pageLevelException.getMessage()); 173 // return "calendar/message"; 174 // } 175 return "calendar/list"; 176 } 177 178 @RequestMapping(value = "/listEvents", method = RequestMethod.GET) 179 public String listEvents(HttpServletRequest request, Model uiModel, @RequestParam(required = true) String date, @RequestParam(required = true) String beginDate, @RequestParam(required = true) String endDate) { 180 User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 181 SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); 182 // Calendar selectedDate = Calendar.getInstance(); 183 // Calendar beginCalendar = Calendar.getInstance(); 184 // Calendar endCalendar = Calendar.getInstance(); 185 // try { 186 // if (date != null) { 187 // selectedDate.setTime(sdf.parse(date)); 188 // } 189 // if (beginDate != null) { 190 // beginCalendar.setTime(sdf.parse(beginDate)); 191 // } 192 // if (endDate != null) { 193 // endCalendar.setTime(sdf.parse(endDate)); 194 // } 195 // } catch (ParseException e) { 196 // return list(request, uiModel, date); 197 // } 198 // try { 199 // Filter filter = (Filter) request.getSession().getAttribute("calendar.event.filterId"); 200 // ListViewEvents listViewEvents = calendarEventOAuthService.retrieveViewEventsList(user.getLoginName(), selectedDate.getTime(), beginCalendar.getTime(), endCalendar.getTime(), filter != null ? filter.getFilterId() : null); 201 // 202 // Calendar currentEndDate = (Calendar) endCalendar.clone(); 203 // Calendar previousDate = (Calendar) beginCalendar.clone(); 204 // previousDate.add(Calendar.DATE, -listViewEvents.getAppData().getListViewFutureDaysLimit()); 205 // endCalendar.add(Calendar.DATE, listViewEvents.getAppData().getListViewFutureDaysLimit()); 206 // 207 // SimpleDateFormat my = new SimpleDateFormat("yyyyMM"); 208 // uiModel.addAttribute("selectedDate", sdf.format(selectedDate.getTime())); 209 // uiModel.addAttribute("monthSelectedDate", my.format(selectedDate.getTime())); 210 // uiModel.addAttribute("beginDate", sdf.format(beginCalendar.getTime())); 211 // uiModel.addAttribute("endDate", sdf.format(endCalendar.getTime())); 212 // uiModel.addAttribute("currentEndDate", sdf.format(currentEndDate.getTime())); 213 // uiModel.addAttribute("previousDate", sdf.format(previousDate.getTime())); 214 // uiModel.addAttribute("days", listViewEvents.getAppData().getListViewFutureDaysLimit()); 215 // uiModel.addAttribute("viewData", listViewEvents.getViewData()); 216 // uiModel.addAttribute("appData", listViewEvents.getAppData()); 217 // uiModel.addAttribute("events", listViewEvents.getEvents()); 218 // uiModel.addAttribute("filter", filter); 219 // } catch (PageLevelException pageLevelException) { 220 // uiModel.addAttribute("message", pageLevelException.getMessage()); 221 // return "calendar/message"; 222 // } 223 return "calendar/list"; 224 } 225 226 @RequestMapping(value = "/filters", method = RequestMethod.GET) 227 public String filters(HttpServletRequest request, Model uiModel) { 228 User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 229 // try { 230 // Filters filters = calendarEventOAuthService.retrieveFilters(user.getLoginName()); 231 // uiModel.addAttribute("filters", filters.getFilters()); 232 // 233 // Filter filter = (Filter) request.getSession().getAttribute("calendar.event.filterId"); 234 // if (filter != null) { 235 // uiModel.addAttribute("filter", filter); 236 // } else { 237 // uiModel.addAttribute("filter", new Filter()); 238 // } 239 // } catch (PageLevelException pageLevelException) { 240 // uiModel.addAttribute("message", pageLevelException.getMessage()); 241 // return "calendar/message"; 242 // } 243 return "calendar/filters"; 244 } 245 246 // @RequestMapping(value = "/selectFilter", method = RequestMethod.POST) 247 // public String selectFilter(HttpServletRequest request, Model uiModel, @ModelAttribute("filter") Filter filter) { 248 // User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 249 // try { 250 // if (filter.getFilterId() != null && !"".equals(filter.getFilterId().trim())) { 251 // Filter filterFound = calendarEventOAuthService.retrieveFilter(user.getLoginName(), filter.getFilterId()); 252 // request.getSession().setAttribute("calendar.event.filterId", filterFound); 253 // } 254 // } catch (PageLevelException pageLevelException) { 255 // uiModel.addAttribute("message", pageLevelException.getMessage()); 256 // return "calendar/message"; 257 // } 258 // return "redirect:/calendar/month"; 259 // } 260 261 @RequestMapping(value = "/removeFilter", method = RequestMethod.GET) 262 public String removeFilter(HttpServletRequest request, Model uiModel) { 263 request.getSession().removeAttribute("calendar.event.filterId"); 264 return "redirect:/calendar/month"; 265 } 266 267 @RequestMapping(value = "/event", method = RequestMethod.GET) 268 public String event(HttpServletRequest request, Model uiModel, @RequestParam(required = true) Long eventId, @RequestParam(required = false) String date, @RequestParam(required = false) Long occurrenceId) { 269 User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 270 // SimpleDateFormat sdf = new SimpleDateFormat("MMddyyyy"); 271 // Date selectedDate = null; 272 // try { 273 // if (date != null) { 274 // selectedDate = sdf.parse(date); 275 // if (occurrenceId != null) { 276 // uiModel.addAttribute("occurrenceDate", date); 277 // selectedDate = null; 278 // } 279 // } 280 // } catch (ParseException e) { 281 // 282 // } 283 // try { 284 // ViewDetailedEvent event = calendarEventOAuthService.retrieveViewEventDetails(user.getLoginName(), eventId, selectedDate); 285 // // uiModel.addAttribute("selectedDate", 286 // // sdf.format(selectedDate.getTime())); 287 // if (occurrenceId != null) { 288 // uiModel.addAttribute("occurrenceId", occurrenceId); 289 // } 290 // uiModel.addAttribute("event", event); 291 // } catch (PageLevelException pageLevelException) { 292 // uiModel.addAttribute("message", pageLevelException.getMessage()); 293 // return "calendar/message"; 294 // } 295 return "calendar/eventView"; 296 } 297 298 @RequestMapping(value = "/createEvent", method = RequestMethod.GET) 299 public String createEvent(HttpServletRequest request, Model uiModel, @RequestParam(required = false) String date) { 300 User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 301 // SimpleDateFormat sdf = new SimpleDateFormat("MMddyyyy"); 302 // Date selectedDate = null; 303 // try { 304 // if (date != null) { 305 // selectedDate = sdf.parse(date); 306 // } 307 // } catch (ParseException e) { 308 // 309 // } 310 // try { 311 // EditEvent event = calendarEventOAuthService.retrieveNewEvent(user.getLoginName(), selectedDate); 312 // uiModel.addAttribute("event", event); 313 // } catch (PageLevelException pageLevelException) { 314 // uiModel.addAttribute("message", pageLevelException.getMessage()); 315 // return "calendar/message"; 316 // } 317 return "calendar/editEvent"; 318 } 319 320 @RequestMapping(value = "/editEvent", method = RequestMethod.GET) 321 public String editEvent(HttpServletRequest request, Model uiModel, @RequestParam(required = true) Long eventId, @RequestParam(required = false) Long seriesId, @RequestParam(required = false) String date) { 322 User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 323 SimpleDateFormat sdf = new SimpleDateFormat("MMddyyyy"); 324 // Date selectedDate = null; 325 // try { 326 // if (date != null) { 327 // selectedDate = sdf.parse(date); 328 // } 329 // } catch (ParseException e) { 330 // 331 // } 332 // try { 333 // EditEvent event = calendarEventOAuthService.retrieveEditEvent(user.getLoginName(), eventId, seriesId, selectedDate); 334 // uiModel.addAttribute("event", event); 335 // if (seriesId == null) { 336 // uiModel.addAttribute("seriesId", event.getSeriesId()); 337 // } else { 338 // uiModel.addAttribute("seriesId", seriesId); 339 // } 340 // } catch (PageLevelException pageLevelException) { 341 // uiModel.addAttribute("message", pageLevelException.getMessage()); 342 // return "calendar/message"; 343 // } 344 return "calendar/editEvent"; 345 } 346 347 // @RequestMapping(value = "/saveEvent", method = RequestMethod.POST) 348 // public String saveEvent(HttpServletRequest request, @ModelAttribute("event") EditEvent event, BindingResult result, SessionStatus status, Model uiModel) { 349 // User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 350 // EditEvent eventReturned = null; 351 // try { 352 // eventReturned = calendarEventOAuthService.saveEvent(user.getLoginName(), event, event.getEventId()); 353 // if (eventReturned.getResponseCode() == HttpStatus.UNPROCESSABLE_ENTITY.value()) { 354 // Errors errors = ((Errors) result); 355 // for (Iterator iterator = eventReturned.getErrors().entrySet().iterator(); iterator.hasNext();) { 356 // Map.Entry<String, List<String>> entry = (Map.Entry<String, List<String>>) iterator.next(); 357 // for (String error : entry.getValue()) { 358 // errors.rejectValue(entry.getKey(), "", error); 359 // } 360 // } 361 // event.setDefaultCategories(eventReturned.getDefaultCategories()); 362 // return "calendar/editEvent"; 363 // } 364 // } catch (PageLevelException pageLevelException) { 365 // uiModel.addAttribute("message", pageLevelException.getMessage()); 366 // return "calendar/message"; 367 // } 368 // return "redirect:/calendar/month"; 369 // } 370 371 @RequestMapping(value = "/deleteEvent", method = RequestMethod.GET) 372 public String deleteEvent(HttpServletRequest request, @RequestParam(required = true) Long eventId, @RequestParam(required = false) Long seriesId, @RequestParam(required = false) String date, Model uiModel) { 373 User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 374 SimpleDateFormat sdf = new SimpleDateFormat("MMddyyyy"); 375 // Date selectedDate = null; 376 // try { 377 // if (date != null) { 378 // selectedDate = sdf.parse(date); 379 // } 380 // } catch (ParseException e) { 381 // 382 // } 383 // try { 384 // calendarEventOAuthService.deleteEvent(user.getLoginName(), eventId, seriesId, selectedDate); 385 // } catch (PageLevelException pageLevelException) { 386 // uiModel.addAttribute("message", pageLevelException.getMessage()); 387 // return "calendar/message"; 388 // } 389 return "redirect:/calendar/month"; 390 } 391 392 @RequestMapping(value = "/invite", method = RequestMethod.GET) 393 public String invite(HttpServletRequest request, Model uiModel, @RequestParam(required = true) Long eventId, @RequestParam(required = false) String referer, @RequestParam(required = false) Long seriesId, @RequestParam(required = false) Long occurrenceId, @RequestParam(required = false) String date, @RequestParam(required = false) String occurrenceDate) { 394 User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 395 SimpleDateFormat sdf = new SimpleDateFormat("MMddyyyy"); 396 // Date selectedDate = null; 397 // try { 398 // if (date != null) { 399 // selectedDate = sdf.parse(date); 400 // } 401 // } catch (ParseException e) { 402 // 403 // } 404 // try { 405 // MeetingInvite invite = calendarEventOAuthService.retrieveMeeting(user.getLoginName(), eventId, seriesId, selectedDate); 406 // uiModel.addAttribute("invite", invite); 407 // if (occurrenceId != null) { 408 // uiModel.addAttribute("occurrenceId", occurrenceId); 409 // } 410 // if (occurrenceDate != null) { 411 // Date occurDate = null; 412 // try { 413 // occurDate = sdf.parse(occurrenceDate); 414 // } catch (ParseException e) { 415 // 416 // } 417 // uiModel.addAttribute("date", sdf.format(occurDate)); 418 // } 419 // uiModel.addAttribute("referer", referer); 420 // } catch (PageLevelException pageLevelException) { 421 // uiModel.addAttribute("message", pageLevelException.getMessage()); 422 // return "calendar/message"; 423 // } 424 return "calendar/invite"; 425 } 426 427 @RequestMapping(value = "/meetingAction", method = RequestMethod.GET) 428 public String meetingAction(HttpServletRequest request, Model uiModel, @RequestParam(required = true) Long eventId, @RequestParam(required = true) String type, @RequestParam(required = false) Long seriesId, @RequestParam(required = false) Long occurrenceId, @RequestParam(required = false) String date, @RequestParam(required = false) String referer) { 429 User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 430 // try { 431 // if (type != null) { 432 // if (type.equals("R")) { 433 // calendarEventOAuthService.removeMeeting(user.getLoginName(), eventId); 434 // } else if (type.equals("K")) { 435 // calendarEventOAuthService.keepMeeting(user.getLoginName(), eventId); 436 // } else { 437 // MeetingStatusChange meetingStatusChange = new MeetingStatusChange(); 438 // meetingStatusChange.setEventId(eventId); 439 // meetingStatusChange.setStatus(type); 440 // calendarEventOAuthService.updateMeetingStatus(user.getLoginName(), meetingStatusChange); 441 // } 442 // } 443 // } catch (PageLevelException pageLevelException) { 444 // uiModel.addAttribute("message", pageLevelException.getMessage()); 445 // return "calendar/message"; 446 // } 447 // if ("D".equals(type) || "R".equals(type) || "K".equals(type)) { 448 // return "redirect:/calendar/month"; 449 // } else if (seriesId != null && date != null) { 450 // return "redirect:/calendar/invite?eventId=" + eventId + "&seriesId=" + seriesId + "&date=" + date + (referer != null ? "&referer=" + referer : ""); 451 // } 452 return "redirect:/calendar/invite?eventId=" + eventId + (occurrenceId != null ? "&occurrenceId=" + occurrenceId : "") + (date != null ? "&date=" + date : "") + (referer != null ? "&referer=" + referer : ""); 453 } 454 455 @RequestMapping(value = "/pendingMeetings", method = RequestMethod.GET) 456 public String pendingMeetings(HttpServletRequest request, Model uiModel) { 457 User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 458 // try { 459 // PendingMeetings pendingMeetings = calendarEventOAuthService.retrievePendingMeetings(user.getLoginName()); 460 // uiModel.addAttribute("pendingMeetings", pendingMeetings.getPendingMeetings()); 461 // } catch (PageLevelException pageLevelException) { 462 // uiModel.addAttribute("message", pageLevelException.getMessage()); 463 // return "calendar/message"; 464 // } 465 return "calendar/pendingMeetings"; 466 } 467 468 @RequestMapping(value = "/options", method = RequestMethod.GET) 469 public String options(HttpServletRequest request, Model uiModel) { 470 // Filter filter = (Filter) request.getSession().getAttribute("calendar.event.filterId"); 471 // uiModel.addAttribute("filter", filter); 472 return "calendar/options"; 473 } 474 475 @RequestMapping(value = "/refresh", method = RequestMethod.GET) 476 public String refresh(HttpServletRequest request, Model uiModel) { 477 User user = (User) request.getSession().getAttribute(Constants.KME_USER_KEY); 478 // try { 479 // calendarEventOAuthService.reloadPersonalCache(user.getLoginName()); 480 // } catch (PageLevelException pageLevelException) { 481 // uiModel.addAttribute("message", pageLevelException.getMessage()); 482 // return "calendar/message"; 483 // } 484 // uiModel.addAttribute("message", "Your calendar has been refreshed."); 485 return "calendar/message"; 486 } 487 488 }