Package org.apache.openmeetings.db.entity.user

Examples of org.apache.openmeetings.db.entity.user.User


   */
  public User getUserByActivationHash(String hash) {
    TypedQuery<User> query = em.createQuery("SELECT u FROM User as u WHERE u.activatehash = :activatehash"
        + " AND u.deleted = false", User.class);
    query.setParameter("activatehash", hash);
    User u = null;
    try {
      u = query.getSingleResult();
    } catch (NoResultException e) {
      // u=null}
    }
View Full Code Here


      currentClient.setUsercolor(colorObj);

      // Inject externalUserId if nothing is set yet
      if (currentClient.getExternalUserId() == null) {
        if (currentClient.getUser_id() != null) {
          User us = usersDao.get(currentClient.getUser_id());
          if (us != null) {
            currentClient.setExternalUserId(us.getExternalUserId());
            currentClient.setExternalUserType(us.getExternalUserType());
          }
        }
      }

      // This can be set without checking for Moderation Flag
View Full Code Here

      // only fill this value from User-Record
      // cause invited users have no associated User, so
      // you cannot set the firstname,lastname from the UserRecord
      if (userId != null) {
        User us = usersDao.get(userId);
       
        if (us != null) {
          currentClient.setExternalUserId(us.getExternalUserId());
          currentClient.setExternalUserType(us.getExternalUserType());
        }
        if (us != null && us.getPictureuri() != null) {
          // set Picture-URI
          currentClient.setPicture_uri(us.getPictureuri());
        }
      }
      this.sessionManager.updateClientByStreamId(streamid,
          currentClient, false, null);
      return currentClient;
View Full Code Here

      // Update Session Data
      log.debug("UDPATE SESSION " + SID + ", " + userId);
      sessiondataDao.updateUserWithoutSession(SID, userId);

      User user = userManager.getUserById(userId);

      if (user != null) {
        currentClient.setExternalUserId(user.getExternalUserId());
        currentClient.setExternalUserType(user.getExternalUserType());
      }

      // only fill this value from User-Record
      // cause invited users have non
      // you cannot set the firstname,lastname from the UserRecord
      User us = usersDao.get(userId);
      if (us != null && us.getPictureuri() != null) {
        // set Picture-URI
        currentClient.setPicture_uri(us.getPictureuri());
      }
      this.sessionManager.updateClientByStreamId(streamid,
          currentClient, false, null);
      return currentClient;
    } catch (Exception err) {
View Full Code Here

    assertNotNull("Cann't add appointment", id);
    return ap;
  }

  public User getUser(int rnd) throws Exception {
    User u = new User();
    // add user
    u.setFirstname("firstname" + rnd);
    u.setLastname("lastname" + rnd);
    u.setLogin("login" + rnd);
    u.updatePassword(configurationDao, "pass" + rnd);
    u.setLanguage_id(1L);
    return u;
  }
View Full Code Here

    u.setLanguage_id(1L);
    return u;
  }

  public User createUser(int rnd) throws Exception {
    User u = getUser(rnd);
    u = userDao.update(u, null);
    assertNotNull("Can't add user", u);
    return u;
  }
View Full Code Here

    cfg.ical_timeZone = timeZone;
    importInitvalues.loadAll(cfg, false);
  }

  public User createUserContact(int rnd, Long ownerId) {
    User user = userDao.getContact("email" + rnd, "firstname" + rnd, "lastname" + rnd, ownerId);
    user = userDao.update(user, ownerId);
    assertNotNull("Can't add user contact", user);
    return user;
  }
View Full Code Here

   * @return - id of the logged in user, -1 in case of the error
   */
  public Long loginUser(String SID, String username, String userpass) throws AxisFault {
    try {
      log.debug("Login user SID : " + SID);
      User u = userDao.login(username, userpass);
      if (u == null) {
        return -1L;
      }
     
      Boolean bool = sessiondataDao.updateUser(SID, u.getUser_id(), false, u.getLanguage_id());
      if (bool == null) {
        // Exception
        return -1L;
      } else if (!bool) {
        // invalid Session-Object
        return -35L;
      }
     
      return u.getUser_id();
    } catch (OmException oe) {
      if (oe.getCode() != null) {
        return oe.getCode();
      }
    } catch (Exception err) {
View Full Code Here

        if (user_id == null || user_id < 0) {
          return user_id;
        }

        User user = userDao.get(user_id);

        // activate the User
        user.getRights().add(Right.Dashboard);
        user.getRights().add(Right.Login);
        user.getRights().add(Right.Room);
        user.setUpdatetime(new Date());

        userDao.update(user, users_id);

        return user_id;
View Full Code Here

        if (user_id == null || user_id < 0) {
          return user_id;
        }

        User user = userDao.get(user_id);

        // activate the User
        user.getRights().add(Right.Login);
        user.setUpdatetime(new Date());

        userDao.update(user, users_id);

        return user_id;
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.entity.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.