Package org.openmeetings.app.persistence.beans.calendar

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


   
    if(room.getAppointment() == false)
      return null;
   
    try{
      Appointment ment = AppointmentLogic.getInstance().getAppointmentByRoom(room_id);
     
     
      return ment;
    }catch(Exception e){
      log.error("getAppointMentDataForRoom " + e.getMessage());
View Full Code Here


   
    if(room.getAppointment() == false)
      return null;
   
    try{
      Appointment appointment = AppointmentLogic.getInstance().getAppointmentByRoom(room_id);
     
      Map returnMap = new HashMap();
     
      returnMap.put("appointment", appointment);
     
      Users us = Usermanagement.getInstance().getUserById(currentClient.getUser_id());
     
      String jNameTimeZone = null;
      if (us != null && us.getOmTimeZone() != null) {
        jNameTimeZone = us.getOmTimeZone().getJname();
      } else {
        Configuration conf = Configurationmanagement.getInstance().getConfKey(3L, "default.timezone");
        if (conf != null) {
          jNameTimeZone = conf.getConf_value();
        }
      }
     
      OmTimeZone omTimeZone = OmTimeZoneDaoImpl.getInstance().getOmTimeZone(jNameTimeZone);
     
      Calendar cal = Calendar.getInstance();
      cal.setTimeZone(TimeZone.getTimeZone(omTimeZone.getIcal()));
      int offset = cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
     
      Date starttime = new Date(appointment.getAppointmentStarttime().getTime() + offset);
      Date endtime = new Date(appointment.getAppointmentEndtime().getTime() + offset);
     
      returnMap.put("appointment", appointment);
     
      returnMap.put("start", CalendarPatterns.getDateWithTimeByMiliSeconds(starttime));
      returnMap.put("end", CalendarPatterns.getDateWithTimeByMiliSeconds(endtime));
View Full Code Here

       List<Appointment> points = AppointmentLogic.getInstance().getTodaysAppointmentsForUser(users_id);
       List<Rooms> result = new ArrayList<Rooms>();
      
       if(points != null){
        for(int i = 0; i < points.size(); i++){
          Appointment ment = points.get(i);
         
          Long rooms_id = ment.getRoom().getRooms_id();
          Rooms rooom = Roommanagement.getInstance().getRoomById(rooms_id);
         
          if(!rooom.getRoomtype().getRoomtypes_id().equals(room_types_id))
            continue;
         
View Full Code Here

        List<Appointment> appointments = AppointmentLogic.getInstance().getTodaysAppointmentsForUser(users_id);
        List<Rooms> result = new ArrayList<Rooms>();

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

            Long rooms_id = ment.getRoom().getRooms_id();
            Rooms rooom = Roommanagement.getInstance().getRoomById(rooms_id);

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

        log.debug("updateAppointment");

        log.debug("appointmentId " + appointmentId);

        Appointment app = AppointmentLogic.getInstance()
            .getAppointMentById(appointmentId);

        Users user = Usermanagement.getInstance().getUserById(users_id);
       
        return AppointmentLogic.getInstance().updateAppointmentByTime(
View Full Code Here

        log.debug("updateAppointment");

        RoomTypes rt = Roommanagement.getInstance().getRoomTypesById(
            roomType);

        Appointment app = AppointmentLogic.getInstance()
            .getAppointMentById(appointmentId);

        Rooms room = app.getRoom();
        if (room != null) {

          room.setComment(appointmentDescription);
          room.setName(appointmentName);
          room.setRoomtype(rt);
View Full Code Here

//        Appointment app = AppointmentLogic.getInstance()
//            .getAppointMentById(appointmentId);
//        Roommanagement.getInstance().deleteRoom(app.getRoom());
       
        Appointment appointment = new Appointment();

        Appointment appStored = AppointmentDaoImpl.getInstance().getAppointmentByRoomId(
                              users_id, room_id);

        Users user = Usermanagement.getInstance().getUserById(users_id);
       
        TimeZone timeZone = TimeZone.getTimeZone(user.getOmTimeZone().getIcal());
       
        Calendar cal = Calendar.getInstance();
        cal.setTimeZone(timeZone);
        int offset = cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
       
        //System.out.println("CalendarServlet offset "+offset );
        //System.out.println("CalendarServlet TimeZone "+TimeZone.getDefault().getID() );
        //log.debug("addAppointment offset :: "+offset);
       
        appointment.setAppointmentStarttime(new Date(appStored.getAppointmentStarttime().getTime() + offset));
        appointment.setAppointmentEndtime(new Date(appStored.getAppointmentEndtime().getTime() + offset));
       
       
        return appointment;
      }
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.getUser(1L));
    ap.setIsConnectedEvent(false);
    Long id = appointmentDao.addAppointmentObj(ap);
    assertNotNull("Cann't add appointment", id);
    return ap;
  }
View Full Code Here

          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
      Users user = userManagement.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

        log.debug("updateAppointment");

        RoomTypes rt = roommanagement.getRoomTypesById(roomType);

        Appointment app = appointmentLogic
            .getAppointMentById(appointmentId);

        Rooms room = app.getRoom();
        if (room != null) {

          room.setComment(appointmentDescription);
          room.setName(appointmentName);
          room.setRoomtype(rt);
View Full Code Here

TOP

Related Classes of org.openmeetings.app.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.