Package org.apache.openmeetings.persistence.beans.user

Examples of org.apache.openmeetings.persistence.beans.user.User


          + " where u.activatehash = :activatehash"
          + " AND u.deleted <> :deleted";
      TypedQuery<User> query = em.createQuery(hql, User.class);
      query.setParameter("activatehash", hash);
      query.setParameter("deleted", true);
      User u = null;
      try {
        u = query.getSingleResult();
      } catch (NoResultException e) {
        // u=null}
      }
View Full Code Here


          invitation.setInvitationWasUsed(false);
        }

        invitation.setDeleted(false);

        User us = usersDao.get(createdBy);
        String hashRaw = "HASH" + (System.currentTimeMillis());
        invitation.setHash(MD5.do_checksum(hashRaw));

        invitation.setInvitedBy(us);
        invitation.setInvitedname(username);
        invitation.setInvitedEMail(email);
        invitation.setRoom(roomDao.get(rooms_id));
        invitation.setConferencedomain(conferencedomain);
        invitation.setStarttime(new Date());
        invitation.setAppointmentId(appointmentId);

        invitation = em.merge(invitation);
        long invitationId = invitation.getInvitations_id();

        invitation.setInvitations_id(invitationId);

        if (invitationId > 0) {

          if (sendMail) {
            this.sendInvitionLink(us.getAdresses().getEmail(),
                username, message, baseurl,
                email, subject, invitation.getHash(),
                validFrom, validTo, language_id, fromUserField);
          }
View Full Code Here

  public void cancelInvitation(Appointment appointment, MeetingMember member,
      Long canceling_user_id, Long language_id) {

    log.debug("cancelInvitation");

    User user;

    try {
      user = userManager.getUserById(canceling_user_id);
    } catch (Exception e) {
      log.error("cancelInvitation Cancelling user cant be retrieved");
      return;
    }

    if (appointment.getRemind() == null) {
      log.error("Appointment " + appointment.getAppointmentName()
          + " has no ReminderType!");
      return;
    }

    User us = member.getUserid();
    TimeZone timezone = null;
    // external users have no user object stored so we will need to get the
    // timezone from the stored string
    if (us != null) {
      timezone = timezoneUtil.getTimezoneByUser(us);
View Full Code Here

  public void updateInvitation(Appointment appointment, MeetingMember member,
      Long canceling_user_id, Long language_id, String invitorName, boolean sendMail) {

    log.debug("updateInvitation");

    User user = userManager.getUserById(canceling_user_id);
    if (user == null) {
      log.error("Cancelling user cant be retrieved");
      return;
    }

    if (appointment.getRemind() == null) {
      log.error("Appointment " + appointment.getAppointmentName()
          + " has no ReminderType!");
      return;
    }

    log.debug("Remindertype : " + appointment.getRemind().getTypId());

    User us = member.getUserid();
    TimeZone timezone = null;
    // external users have no user object stored so we will need to get the
    // timezone from the stored string
    if (us != null) {
      timezone = timezoneUtil.getTimezoneByUser(us);
View Full Code Here

          invitation.setInvitationWasUsed(false);
        }

        invitation.setDeleted(false);

        User us = usersDao.get(createdBy);
        String hashRaw = "InvitationHash"
            + (System.currentTimeMillis());
        log.debug("addInvitationIcalLink : rawHash = " + hashRaw);
        invitation.setHash(MD5.do_checksum(hashRaw));
View Full Code Here

      Date startdate, Date enddate, TimeZone timezone, String subject,
      String message) throws Exception {
    log.debug("sendInvitationIcalCancelMail");

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

    // TODO: Check time zone handling in iCal Mail
    // OmTimeZone omTimeZone = omTimeZoneDaoImpl.getOmTimeZone(jNameTimeZone);

    IcalHandler handler = new IcalHandler(IcalHandler.ICAL_METHOD_CANCEL);

    // refresh appointment
    point = appointmentLogic.getAppointMentById(point.getAppointmentId());

    // Transforming Meeting Members

    HashMap<String, String> attendeeInDerHashMap = handler.getAttendeeData(
        email, userName, invitor);

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

    HashMap<String, String> organizer = handler.getAttendeeData(user
        .getAdresses().getEmail(), user.getLogin(), invitor);

    handler.addNewMeeting(startdate, enddate,
        point.getAppointmentName(), atts,
        subject, organizer, point.getIcalId(), timezone);

    log.debug(handler.getICalDataAsString());

    mailHandler.send(new MailMessage(email, user.getAdresses().getEmail(), subject, message, handler.getIcalAsByteArray()));

    return null;
  }
View Full Code Here

      Long language_id, Date starttime, Date endtime, TimeZone timeZone,
      String subject, String message) throws Exception {
    log.debug("sendInvitationIcalUpdateMail");

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

    IcalHandler handler = new IcalHandler(IcalHandler.ICAL_METHOD_REQUEST);

    // refresh appointment
    point = appointmentLogic.getAppointMentById(point.getAppointmentId());

    // Transforming Meeting Members

    HashMap<String, String> attendeeInDerHashMap = handler.getAttendeeData(
        email, userName, invitor);

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

    HashMap<String, String> organizer = handler.getAttendeeData(user
        .getAdresses().getEmail(), user.getLogin(), invitor);

    handler.addNewMeeting(starttime, endtime, point.getAppointmentName(), atts,
        subject, organizer, point.getIcalId(), timeZone);

    log.debug(handler.getICalDataAsString());

    mailHandler.send(new MailMessage(email, user.getAdresses().getEmail(), subject, message, handler.getIcalAsByteArray()));

    return null;
  }
View Full Code Here

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

   * @return get the user bound to this session
   */
  public User getUserSelf(String SID) {
    try {
      Long users_id = sessiondataDao.checkSession(SID);
      User us = usersDao.get(users_id);
     
      //reset some objects that the client should not know
      us.setSipUser(null);
     
      return us;
    } catch (Exception err) {
      log.error("[getUserSelf]", err);
    }
View Full Code Here

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

        User us = userManager.getUserById(users_id);

        us.setOmTimeZone(omTimeZoneDaoImpl.getOmTimeZone(jname));
        us.setForceTimeZoneCheck(false);
        us.setUpdatetime(new Date());

        userManager.updateUser(us);
       
        return us;
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.persistence.beans.user.User

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.