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

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


      a.setOwner(userDao.get(users_id));
      a.setPasswordProtected(isPasswordProtected);
      a.setPassword(password);
      a.setMeetingMembers(new ArrayList<MeetingMember>());
      for (String singleClient : mmClient) {
        MeetingMember mm = appointmentLogic.getMeetingMember(users_id, languageId, singleClient);
        mm.setAppointment(a);
        a.getMeetingMembers().add(mm);
      }
      return appointmentDao.update(a, users_id).getId();
    } catch (Exception err) {
      log.error("[updateAppointment]", err);
View Full Code Here


    a1.setTitle("AppointmentByRange_a1");

    Appointment a2 = getAppointment(now.getTime(), a1End.getTime());
    a2.setTitle("AppointmentByRange_a2");
    a2.setMeetingMembers(new ArrayList<MeetingMember>());
    MeetingMember mm1 = new MeetingMember();
    mm1.setUser(createUserContact(rnd.nextInt(), userId));
    mm1.setAppointment(a2);
    a2.getMeetingMembers().add(mm1);
   
    Appointment a3 = getAppointment(now.getTime(), a1End.getTime());
    a3.setTitle("AppointmentByRange_a3");
    a3.setMeetingMembers(new ArrayList<MeetingMember>());
    MeetingMember mm2 = new MeetingMember();
    mm2.setUser(createUserContact(rnd.nextInt(), userId));
    mm2.setAppointment(a3);
    a3.getMeetingMembers().add(mm2);
    MeetingMember mm3 = new MeetingMember();
    mm3.setUser(createUserContact(rnd.nextInt(), userId));
    mm3.setAppointment(a3);
    a3.getMeetingMembers().add(mm3);
   
    a1 = appointmentDao.update(a1, userId);
    a2 = appointmentDao.update(a2, userId);
    a3 = appointmentDao.update(a3, userId);
View Full Code Here

        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, users_id);

        return mm.getId(); //FIXME check to return ID
      } else {
        return -2L;
      }
    } catch (Exception err) {
      log.error("[addExternalMeetingMemberRemindToRoom] ", err);
View Full Code Here

    InputNode listNode1 = root1.getNext(); //HACK to handle external attendee's firstname, lastname, email
    if (listNodeName.equals(listNode.getName())) {
      InputNode item = listNode.getNext();
      InputNode item1 = listNode1.getNext(); //HACK to handle external attendee's firstname, lastname, email
      while (item != null) {
        MeetingMember mm = ser.read(MeetingMember.class, item, false);

        boolean needToSkip1 = true;
        if (mm.getUser() == null) {
          mm.setUser(new User());
        }
        if (mm.getUser().getUser_id() == null) {
          //HACK to handle external attendee's firstname, lastname, email
          boolean contactValid = false;
          do {
            if (Type.contact == mm.getUser().getType() && "firstname".equals(item1.getName())) {
              mm.getUser().setFirstname(item1.getValue());
            }
            if (Type.contact == mm.getUser().getType() && "lastname".equals(item1.getName())) {
              mm.getUser().setLastname(item1.getValue());
            }
            if ("email".equals(item1.getName())) {
              String email = item1.getValue();
              if (mm.getAppointment() != null && mm.getAppointment().getOwner() != null) {
                mm.setUser(usersDao.getContact(email, mm.getAppointment().getOwner()));
              }
              contactValid = true;
            }
            item1 = listNode1.getNext(); //HACK to handle old om_time_zone
          } while (item1 != null && !"meetingmember".equals(item1.getName()));
          if (!contactValid) {
            mm = null;
          }
          needToSkip1 = false;
        }
        if (needToSkip1) {
          do {
            item1 = listNode1.getNext(); //HACK to handle Address inside user
          } while (item1 != null && !"meetingmember".equals(item1.getName()));
        }
        item = listNode.getNext();
        if (mm != null && !mm.isDeleted() && mm.getUser() != null && mm.getAppointment() != null && mm.getAppointment().getId() != null) {
          mm.setId(null);
          list.add(mm);
        }
      }
    }
    return list;
View Full Code Here

    a.setOwner(userDao.get(users_id));
    a.setPasswordProtected(isPasswordProtected);
    a.setPassword(password);
    a.setMeetingMembers(new ArrayList<MeetingMember>());
    for (String singleClient : mmClient) {
      MeetingMember mm = getMeetingMember(users_id, languageId, singleClient);
      mm.setAppointment(a);
      a.getMeetingMembers().add(mm);
    }
    return a;
  }
View Full Code Here

    try {
      return meetingMemberDao.get(Long.valueOf(params[0]));
    } catch (Exception e) {
      //no-op
    }
    MeetingMember mm = new MeetingMember();
    try {
      mm.setUser(userDao.get(Long.valueOf(params[4])));
    } catch (Exception e) {
      //no-op
    }
    if (mm.getUser() == null) {
      mm.setUser(userDao.getContact(params[3], params[1], params[2], langId, params[5], userId));
    }
   
    return mm;
  }
View Full Code Here

          }
        }
       
        //remove users
        for (Iterator<MeetingMember> i = attendees.iterator(); i.hasNext();) {
          MeetingMember m = i.next();
          if (!currentIds.contains(m.getUser().getUser_id())) {
            i.remove();
          }
        }
        Set<Long> originalIds = new HashSet<Long>();
        for (MeetingMember m : attendees) {
          originalIds.add(m.getUser().getUser_id());
        }
        //add users
        for (User u : attendeesModel.getObject()) {
          if (u.getUser_id() == null || !originalIds.contains(u.getUser_id())) {
            MeetingMember mm = new MeetingMember();
            mm.setUser(u);
            mm.setDeleted(false);
            mm.setInserted(a.getInserted());
            mm.setUpdated(a.getUpdated());
            mm.setAppointment(a);
            attendees.add(mm);
          }
        }
        a.setMeetingMembers(attendees);
        getBean(AppointmentDao.class).update(a, getUserId());
View Full Code Here

          a.getRoom().setNumberOfPartizipants(100L);
          a.getRoom().setAllowUserQuestions(true);
          a.getRoom().setAllowFontStyles(true);
        }
        for (String email : recipients) {
          MeetingMember mm = new MeetingMember();
          mm.setAppointment(a);
          mm.setUser(userDao.getContact(email, users_id));
          a.getMeetingMembers().add(mm);
        }
        a = appointmentDao.update(a, users_id);
        for (MeetingMember mm : a.getMeetingMembers()) {
          User to = mm.getUser();
          Room room = a.getRoom();
         
          //TODO should be reviewed
          if (!to.getUser_id().equals(from.getUser_id())) {
            // One message to the Send
View Full Code Here

    }
    for (long id : mmIds) {
      invitationManager.processInvitation(a, meetingMemberDao.get(id), MessageType.Cancel);
    }
    //notify owner
    MeetingMember owner = new MeetingMember();
    owner.setUser(a.getOwner());
    if (a.getId() == null) {
      invitationManager.processInvitation(a, owner, MessageType.Create);
    } else if (a.isDeleted()) {
      invitationManager.processInvitation(a, owner, MessageType.Cancel);
    } else if (sendMail) {
View Full Code Here

    a1.setTitle("AppointmentByRange_a1");

    Appointment a2 = getAppointment(now.getTime(), a1End.getTime());
    a2.setTitle("AppointmentByRange_a2");
    a2.setMeetingMembers(new ArrayList<MeetingMember>());
    MeetingMember mm1 = new MeetingMember();
    mm1.setUser(createUserContact(rnd.nextInt(), userId));
    mm1.setAppointment(a2);
    a2.getMeetingMembers().add(mm1);
   
    Appointment a3 = getAppointment(now.getTime(), a1End.getTime());
    a3.setTitle("AppointmentByRange_a3");
    a3.setMeetingMembers(new ArrayList<MeetingMember>());
    MeetingMember mm2 = new MeetingMember();
    mm2.setUser(createUserContact(rnd.nextInt(), userId));
    mm2.setAppointment(a3);
    a3.getMeetingMembers().add(mm2);
    MeetingMember mm3 = new MeetingMember();
    mm3.setUser(createUserContact(rnd.nextInt(), userId));
    mm3.setAppointment(a3);
    a3.getMeetingMembers().add(mm3);
   
    a1 = appointmentDao.update(a1, OM_URL, userId);
    a2 = appointmentDao.update(a2, OM_URL, userId);
    a3 = appointmentDao.update(a3, OM_URL, userId);
View Full Code Here

TOP

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

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.