Package org.apache.openmeetings.db.entity.calendar

Examples of org.apache.openmeetings.db.entity.calendar.Appointment


    form.add(calendar);
    add(refreshTimer);
  }
 
  private Appointment getDefault() {
    Appointment a = new Appointment();
    a.setRemind(getAppointmentReminderTypDao().get(3L)); //TODO: Make configurable
    a.setOwner(getBean(UserDao.class).get(getUserId()));
    a.setTitle(WebSession.getString(1444));
    log.debug(" -- getDefault -- Current model " + a);
    return a;
  }
View Full Code Here


    if (room.getAppointment() == false)
      return null;

    try {
      Appointment ment = appointmentLogic.getAppointmentByRoom(room_id);

      return ment;
    } catch (Exception e) {
      log.error("getAppointMentDataForRoom " + e.getMessage());
      return null;
View Full Code Here

 
      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 );
View Full Code Here

          .getTodaysAppointmentsForUser(users_id);
      List<Room> result = new ArrayList<Room>();

      if (points != null) {
        for (int i = 0; i < points.size(); i++) {
          Appointment ment = points.get(i);

          Long rooms_id = ment.getRoom().getRooms_id();
          Room rooom = roomDao.get(rooms_id);

          if (!rooom.getRoomtype().getRoomtypes_id()
              .equals(room_types_id))
            continue;
View Full Code Here

            .getTodaysAppointmentsForUser(users_id);
        List<Room> result = new ArrayList<Room>();

        if (appointments != null) {
          for (int i = 0; i < appointments.size(); i++) {
            Appointment ment = appointments.get(i);

            Long rooms_id = ment.getRoom().getRooms_id();
            Room rooom = roomDao.get(rooms_id);

            rooom.setCurrentusers(this
                .getRoomClientsListByRoomId(rooom.getRooms_id()));
            result.add(rooom);
View Full Code Here

        if (rooms_id <= 0) {
          return rooms_id;
        }

        Appointment a = new Appointment();
        a.setTitle("appointmentName");
        a.setOwner(userDao.get(users_id));
        a.setLocation("appointmentLocation");
        a.setDescription("appointmentDescription");
        a.setStart(dFrom);
        a.setEnd(dTo);
        a.setCategory(appointmentCategoryDao.get(1L));
        a.setRemind(appointmentReminderTypDao.get(reminderTypeId));
        a.setRoom(roomDao.get(rooms_id));
        a.setPasswordProtected(isPasswordProtected);
        a.setPassword(password);
        a.setLanguageId(1L); //TODO check
        appointmentDao.update(a, getBaseUrl(), users_id); //FIXME verify !!!

        return rooms_id;

      } else {
View Full Code Here

    try {
      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);

      if (AuthLevelUtil.checkWebServiceLevel(user_level)) {
        Appointment a = appointmentLogic.getAppointmentByRoom(room_id);

        if (email == null || a == null) {
          return -1L;
        }
        for (MeetingMember mm : a.getMeetingMembers()) {
          if (email.equals(mm.getUser().getAdresses().getEmail())) {
            return mm.getId();
          }
        }
        MeetingMember mm = new MeetingMember();
        mm.setAppointment(a);
        mm.setUser(userDao.getContact(email, firstname, lastname, language_id, jNameTimeZone, users_id));
        a.getMeetingMembers().add(mm);
        appointmentDao.update(a, baseUrl, users_id);

        return mm.getId(); //FIXME check to return ID
      } else {
        return -2L;
View Full Code Here

      } else {

        // If this is an Appointment then the Moderator will be set to
        // the Invitor

        Appointment ment = appointmentLogic.getAppointmentByRoom(room_id);

        Long userIdInRoomClient = currentClient.getUser_id();

        boolean found = false;
        boolean moderator_set = false;

        // Check if current user is set to moderator
        for (MeetingMember member : ment.getMeetingMembers()) {

          // only persistent users can schedule a meeting
          // user-id is only set for registered users
          if (member.getUser() != null) {
            log.debug("checking user " + member.getUser().getFirstname()
                + " for moderator role - ID : "
                + member.getUser().getUser_id());

            if (member.getUser().getUser_id().equals(userIdInRoomClient)) {
              found = true;

              if (ment.getOwner().getUser_id() == member.getUser().getUser_id()) {
                log.debug("User "
                    + userIdInRoomClient
                    + " is moderator due to flag in MeetingMember record");
                currentClient.setIsMod(true);
View Full Code Here

      log.debug("saveAppointMent users_id:" + users_id);

      Long user_level = userManager.getUserLevelByID(users_id);

      if (AuthLevelUtil.checkUserLevel(user_level)) {
        Appointment a = appointmentLogic.getAppointment(appointmentName, appointmentLocation, appointmentDescription,
            appointmentstart, appointmentend, isDaily, isWeekly, isMonthly, isYearly, categoryId, remind,
            mmClient, roomType, baseUrl, languageId, isPasswordProtected, password, roomId, users_id);
        return appointmentDao.update(a, baseUrl, users_id).getId();
      } else {
        log.error("saveAppointment : wrong user level");
View Full Code Here

      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);
      if (AuthLevelUtil.checkUserLevel(user_level)) {

        Appointment a = appointmentDao.get(appointmentId);
        if (!AuthLevelUtil.checkAdminLevel(user_level) && !a.getOwner().getUser_id().equals(users_id)) {
          throw new AxisFault("The Appointment cannot be updated by the given user");
        }
        if (!a.getStart().equals(appointmentstart) || !a.getEnd().equals(appointmentend)) {
          a.setStart(appointmentstart);
          a.setEnd(appointmentend);
          WebSession.get().setBaseUrl(baseurl); //TODO verify !!!!!
          //FIXME this might change the owner!!!!!
          return appointmentDao.update(a, baseurl, users_id).getId();
        }         
      }
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.entity.calendar.Appointment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.