Package org.apache.openmeetings.persistence.beans.calendar

Examples of org.apache.openmeetings.persistence.beans.calendar.Appointment


          endtime);

      IcalHandler handler = new IcalHandler(
          IcalHandler.ICAL_METHOD_REQUEST);

      Appointment point = appointmentLogic
          .getAppointMentById(appointMentId);

      // Transforming Meeting Members

      HashMap<String, String> attendeeList = handler.getAttendeeData(
          email, username, invitor);

      Vector<HashMap<String, String>> atts = new Vector<HashMap<String, String>>();
      atts.add(attendeeList);

      // Defining Organizer
      User user = userManager.getUserById(organizer_userId);

      HashMap<String, String> organizerAttendee = handler
          .getAttendeeData(email, username, invitor);
      String replyToEmail = null;
      if (user != null) {
        replyToEmail = user.getAdresses().getEmail();
        organizerAttendee = handler.getAttendeeData(replyToEmail, user.getLogin(), invitor);
      }

      // Create ICal Message
      String meetingId = handler.addNewMeeting(starttime, endtime,
          point.getAppointmentName(), atts, invitation_link,
          organizerAttendee, point.getIcalId(), timezone);

      // Writing back meetingUid
      if (point.getIcalId() == null || point.getIcalId().length() < 1) {
        point.setIcalId(meetingId);

        appointmentDaoImpl.updateAppointment(point);
      }

      log.debug(handler.getICalDataAsString());
View Full Code Here


 
  public Appointment read(InputNode node) throws Exception {
    long oldId = getlongValue(node);
    long newId = idMap.containsKey(oldId) ? idMap.get(oldId) : oldId;
   
    Appointment a = appointmentDao.getAppointmentByIdBackup(newId);
    return a == null ? new Appointment() : a;
  }
View Full Code Here

  public Appointment createAppointment() throws Exception {
    assertNotNull("Can't access to appointment dao implimentation", appointmentDao);

    // add new appointment
    Appointment ap = new Appointment();

    ap.setAppointmentName("appointmentName");
    ap.setAppointmentLocation("appointmentLocation");

    Date appointmentstart = new Date();
    Date appointmentend = new Date();
    appointmentend.setTime(appointmentstart.getTime() + 3600);

    ap.setAppointmentStarttime(appointmentstart);
    ap.setAppointmentEndtime(appointmentend);
    ap.setAppointmentDescription("appointmentDescription");
    ap.setStarttime(new Date());
    ap.setDeleted(false);
    ap.setIsDaily(false);
    ap.setIsWeekly(false);
    ap.setIsMonthly(false);
    ap.setIsYearly(false);
    ap.setIsPasswordProtected(false);

    ap.setUserId(usersDao.get(1L));
    ap.setIsConnectedEvent(false);
    Long id = appointmentDao.addAppointmentObj(ap);
    assertNotNull("Cann't add appointment", id);
    return ap;
  }
View Full Code Here

      Long user_level = userManager.getUserLevelByID(users_id);
      if (authLevelUtil.checkUserLevel(user_level)) {

        log.debug("updateAppointment");

        Appointment app = appointmentLogic.getAppointMentById(appointmentId);
        Room room = app.getRoom();
        if (roomId > 0) {
          if ( room.getRooms_id() != roomId) {
            app.setRoom(roomDao.get(roomId));
            appointmentDao.updateAppointment(app);
            boolean isAppRoom = room.getAppointment();
            if (isAppRoom) {
              roomDao.delete(room, users_id);
            }
View Full Code Here

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

        Appointment appointment = new Appointment();

        Appointment appStored = appointmentDao.getAppointmentByRoomId(
            users_id, room_id);

        appointment.setAppointmentStarttime(appStored
            .getAppointmentStarttime());
        appointment.setAppointmentEndtime(appStored
            .getAppointmentEndtime());

        return appointment;
      }
View Full Code Here

      if (member == null) {
        log.error("could not find meeting member!");
        return null;
      }

      Appointment point = member.getAppointment();
      point = appointmentLogic.getAppointMentById(point
          .getAppointmentId());

      if (point == null) {
        log.error("could not retrieve appointment!");
        return null;
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);

        List<MeetingMember> members = meetingMemberDao
            .getMeetingMemberByAppointmentId(ment
                .getAppointmentId());

        Long userIdInRoomClient = currentClient.getUser_id();

        boolean found = false;
View Full Code Here

      TypedQuery<Appointment> query = em.createQuery(hql, Appointment.class);
      query.setParameter("deleted", true);
      query.setParameter("appointmentId", appointmentId);

      Appointment appoint = null;
      try {
        appoint = query.getSingleResult();
      } catch (NoResultException ex) {
      }
      return appoint;
View Full Code Here

          + "WHERE a.appointmentId = :appointmentId ";

      TypedQuery<Appointment> query = em.createQuery(hql, Appointment.class);
      query.setParameter("appointmentId", appointmentId);

      Appointment appoint = null;
      try {
        appoint = query.getSingleResult();
      } catch (NoResultException ex) {
      }
View Full Code Here

      Long categoryId, Long remind, Room room, Long language_id,
      Boolean isPasswordProtected, String password,
      Boolean isConnectedEvent, String jNameTimeZone) {
    try {

      Appointment ap = new Appointment();

      ap.setAppointmentName(appointmentName);
      ap.setAppointmentLocation(appointmentLocation);

      log.debug("addAppointment appointmentstart :1: "
          + CalendarPatterns
              .getDateWithTimeByMiliSecondsWithZone(appointmentstart));
      log.debug("addAppointment appointmentend :1: "
          + CalendarPatterns
              .getDateWithTimeByMiliSecondsWithZone(appointmentend));

      ap.setAppointmentStarttime(appointmentstart);
      ap.setAppointmentEndtime(appointmentend);
      ap.setAppointmentDescription(appointmentDescription);
      ap.setRemind(appointmentReminderTypDaoImpl
          .getAppointmentReminderTypById(remind));
      ap.setStarttime(new Date());
      ap.setIsReminderEmailSend(false);
      ap.setDeleted(false);
      ap.setIsDaily(isDaily);
      ap.setIsWeekly(isWeekly);
      ap.setIsMonthly(isMonthly);
      ap.setIsYearly(isYearly);
      ap.setLanguage_id(language_id);
      ap.setIsPasswordProtected(isPasswordProtected);
      ap.setPassword(password);
      ap.setUserId(usersDao.get(userId));
      ap.setAppointmentCategory(appointmentCategoryDaoImpl
          .getAppointmentCategoryById(categoryId));
      ap.setRoom(room);
      ap.setIsConnectedEvent(isConnectedEvent);

      ap = em.merge(ap);

      return ap.getAppointmentId();
    } catch (Exception ex2) {
      log.error("[addAppointment]: ", ex2);
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.persistence.beans.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.