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

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


      OmTimeZone timezone,
      Boolean forceTimeZoneCheck, String userOffers, String userSearchs,
      Boolean showContactData, Boolean showContactDataToContacts, List<Long> orgIds) {
    try {

      User users = new User();
      users.setFirstname(firstname);
      users.setLogin(login);
      users.setLastname(lastname);
      users.setAge(age);
      users.setAdresses(adress);
      users.setSendSMS(sendSMS);
      users.setAvailible(availible);
      users.setLastlogin(new Date());
      users.setLasttrans(new Long(0));
      users.setLevel_id(level_id);
      users.setStatus(status);
      users.setSalutations_id(1L);
      users.setStarttime(new Date());
      users.setActivatehash(hash);
      users.setOmTimeZone(timezone);
      users.setForceTimeZoneCheck(forceTimeZoneCheck);

      users.setUserOffers(userOffers);
      users.setUserSearchs(userSearchs);
      users.setShowContactData(showContactData);
      users.setShowContactDataToContacts(showContactDataToContacts);

      // this is needed cause the language is not a needed data at
      // registering
      if (language_id != 0) {
        users.setLanguage_id(new Long(language_id));
      } else {
        users.setLanguage_id(null);
      }
      users.updatePassword(cryptManager, configurationDao, userpass);
      users.setRegdate(new Date());
      users.setDeleted(false);
     
      //new user add organizations without checks
      if (orgIds != null) {
        List<Organisation_Users> orgList = users.getOrganisation_users();
        for (Long orgId : orgIds) {
          orgList.add(organisationManager.getOrgUser(orgId, null));
        }
      }
      return addUser(users);
View Full Code Here


      List<MeetingMember> meetingsRemoteMembers = meetingMemberDao
          .getMeetingMemberByAppointmentId(ap.getAppointmentId());

      // Adding Invitor Name
      User user = userManager.getUserById(users_id);
      String invitorName = user.getFirstname() + " " + user.getLastname()
          + " [" + user.getAdresses().getEmail() + "]";

      // Send notification of updated Event
      for (MeetingMember memberRemote : meetingsRemoteMembers) {

        // Notify member of changes
View Full Code Here

   *            the timezone of the current user is copied to the new default
   *            one (if the current user has one)
   * @return
   */
  public User getNewUserInstance(User currentUser) {
    User user = new User();
    user.setSalutations_id(1L); // TODO: Fix default selection to be
                  // configurable
    user.setLevel_id(1L);
    user.setLanguage_id(configurationDao.getConfValue(
        "default_lang_id", Long.class, "1"));
    user.setOmTimeZone(omTimeZoneDaoImpl.getDefaultOmTimeZone(currentUser));
    user.setForceTimeZoneCheck(false);
    user.setSendSMS(false);
    user.setAge(new Date());
    Address adresses = new Address();
    adresses.setStates(stateDaoImpl.getStateById(1L));
    user.setAdresses(adresses);
    user.setStatus(1);
    user.setShowContactData(false);
    user.setShowContactDataToContacts(false);

    return user;
  }
View Full Code Here

      Long user_level = userManager.getUserLevelByID(users_id);

      if (authLevelUtil.checkUserLevel(user_level)) {
       
        User us = userManager.getUserById(users_id);
       
        // Refactor the given time ignoring the Date is always UTC!
        TimeZone timezone = timezoneUtil.getTimezoneByUser(us);
       
        //Transform the user time in a local time of the server
View Full Code Here

        log.debug("updateAppointment");

        log.debug("appointmentId " + appointmentId);
       
        User us = userManager.getUserById(users_id);
       
        // Refactor the given time ignoring the Date is always UTC!
        TimeZone timezone = timezoneUtil.getTimezoneByUser(us);
       
        //Transform the user time in a local time of the server
        //machines locale timeZone and store that to the db
        Date appointmentstart = new Date(TimezoneUtil.getCalendarInTimezone(appointmentstartStr, timezone).getTime().getTime());
        Date appointmentend = new Date(TimezoneUtil.getCalendarInTimezone(appointmentendStr, timezone).getTime().getTime());

        log.debug("up timezone "+timezone);
        log.debug("up appointmentstartStr "+appointmentstartStr);
        log.debug("up appointmentendStr "+appointmentendStr);
        log.debug("up appointmentstart "+appointmentstart);
        log.debug("up appointmentend   "+appointmentend);

        appointmentLogic
            .getAppointMentById(appointmentId);

        User user = userManager.getUserById(users_id);
       
        return appointmentDao.updateAppointmentByTime(appointmentId,
            appointmentstart, appointmentend, users_id, baseurl,
            language_id, user.getOmTimeZone().getIcal());

      }
    } catch (Exception err) {
      log.error("[updateAppointment]", err);
      err.printStackTrace();
View Full Code Here

            room.setRoomtype(rt);
 
            roomDao.update(room, users_id);
          }
        }
        User user = userManager.getUserById(users_id);
       
        // Refactor the given time ignoring the Date is always UTC!
        TimeZone timezone = timezoneUtil.getTimezoneByUser(user);
       
        //Transform the user time in a local time of the server
        //machines locale timeZone and store that to the db
        Date appointmentstart = new Date(TimezoneUtil.getCalendarInTimezone(appointmentstartStr, timezone).getTime().getTime());
        Date appointmentend = new Date(TimezoneUtil.getCalendarInTimezone(appointmentendStr, timezone).getTime().getTime());

        log.debug("up2 timezone "+timezone);
        log.debug("up2 appointmentstartStr "+appointmentstartStr);
        log.debug("up2 appointmentendStr "+appointmentendStr);
        log.debug("up2 appointmentstart "+appointmentstart);
        log.debug("up2 appointmentend "+appointmentend);

        return appointmentDao.updateAppointment(appointmentId,
            appointmentName, appointmentDescription,
            appointmentstart, appointmentend, isDaily, isWeekly,
            isMonthly, isYearly, categoryId, remind, mmClient,
            users_id, baseUrl, language_id, isPasswordProtected, password, user
                .getOmTimeZone().getIcal(), appointmentLocation);
      }
    } catch (Exception err) {
      log.error("[updateAppointment]", err);
      err.printStackTrace();
View Full Code Here

      Map<String, Object> returnMap = new HashMap<String, Object>();

      returnMap.put("appointment", appointment);

      User us = userManager.getUserById(currentClient.getUser_id());
      TimeZone timezone = timezoneUtil.getTimezoneByUser(us);

      returnMap.put("appointment", appointment);

      returnMap.put(
View Full Code Here

   * @throws Exception
   */
  private boolean checkUserAlreadyStored(Long userIdToAdd, List<?> usersStored)
      throws Exception {
    for (Iterator<?> it2 = usersStored.iterator(); it2.hasNext();) {
      User us = (User) it2.next();
      if (us.getUser_id().equals(userIdToAdd)) {
        log.debug("userIdToAdd found: " + userIdToAdd);
        return true;
      }
    }
    return false;
View Full Code Here

        if (!this.checkUserAlreadyStored(userIdToAdd, usersStored))
          usersToAdd.add(userIdToAdd);
      }

      for (Iterator it = usersStored.iterator(); it.hasNext();) {
        User us = (User) it.next();
        Long userIdStored = us.getUser_id();
        log.debug("userIdStored: " + userIdStored);
        if (!this.checkUserShouldBeStored(userIdStored, users))
          usersToDel.add(userIdStored);
      }
View Full Code Here

    return orgUser;
  }
 
  public Long addOrganisationUserObj(Long user_id, Organisation_Users orgUser) {
    try {
      User u = usersDao.get(user_id);
     
      orgUser.setStarttime(new Date());
      orgUser = em.merge(orgUser);

      //user should be updated to have recent organisation_users list
      List<Organisation_Users> l = u.getOrganisation_users();
      l.add(orgUser);
      u.setOrganisation_users(l);
      usersDao.update(u, -1L);
     
      return orgUser.getOrganisation_users_id();
    } catch (Exception ex2) {
      log.error("[addUserToOrganisation]", ex2);
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.