if (room.getAppointment() == false) {
throw new IllegalStateException("Room has no appointment");
}
Appointment appointment = appointmentLogic
.getAppointmentByRoom(room_id);
Map<String, Object> returnMap = new HashMap<String, Object>();
returnMap.put("appointment", appointment);
User us = userManager.getUserById(currentClient.getUser_id());
TimeZone timezone = timezoneUtil.getTimeZone(us);
returnMap.put("appointment", appointment);
returnMap.put(
"start",
CalendarPatterns.getDateWithTimeByMiliSeconds(
appointment.getStart(), timezone));
returnMap.put(
"end",
CalendarPatterns.getDateWithTimeByMiliSeconds(
appointment.getEnd(), timezone));
returnMap.put("timeZone", timezone.getDisplayName());
return returnMap;
} catch (Exception e) {
log.error("getAppointMentAndTimeZones " , e );