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

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


    try {
      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);
      if (AuthLevelUtil.checkUserLevel(user_level)) {

        User user = userManager.getUserById(users_id);
        long language_id = (user == null) ? 1 : user.getLanguage_id();
        List<AppointmentReminderTyps> res = appointmentReminderTypDao
            .getAppointmentReminderTypList(language_id);

        if (res == null || res.size() < 1) {
          log.debug("no remindertyps found!");
View Full Code Here


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

        User user = userManagement.getUserById(user_id);

        // activate the User
        user.setStatus(1);
        user.setUpdatetime(new Date());

        userManagement.updateUser(user);

        return user_id;
View Full Code Here

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

        User user = userManagement.getUserById(user_id);

        // activate the User
        user.setStatus(1);
        user.setUpdatetime(new Date());

        userManagement.updateUser(user);

        return user_id;
View Full Code Here

      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManagement.getUserLevelByID(users_id);

      if (AuthLevelUtil.checkAdminLevel(user_level)) {

        User testUser = userManagement.getUserByExternalIdAndType(
            externalUserId, externalUserType);

        if (testUser != null) {
          throw new Exception("User does already exist!");
        }

        // This will send no email to the users
        Long user_id = userManagement.registerUserNoEmail(username,
            userpass, lastname, firstname, email, new Date(),
            street, additionalname, fax, zip, states_id, town,
            language_id, "", false, true, // generate SIP Data if the config is enabled
            jNameTimeZone);

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

        User user = userManagement.getUserById(user_id);

        // activate the User
        user.setStatus(1);
        user.setUpdatetime(new Date());
        user.setExternalUserId(externalUserId);
        user.setExternalUserType(externalUserType);

        userManagement.updateUser(user);

        return user_id;
View Full Code Here

      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManagement.getUserLevelByID(users_id);

      if (AuthLevelUtil.checkAdminLevel(user_level)) {

        User userExternal = userManagement.getUserByExternalIdAndType(
            externalUserId, externalUserType);

        Long userId = userExternal.getUser_id();

        // Setting user deleted
        usersDao.deleteUserID(userId);

        return userId;
View Full Code Here

    if (pbl != null) {
      rl.addAll(pbl);
    }

    Long users_id = sessiondataDao.checkSession(SID);
    User u = userManager.getUserById(users_id);
    for (Organisation_Users ou : u.getOrganisation_users()) {
      List<RoomOrganisation> rol = conferenceService.getRoomsByOrganisationWithoutType(SID
          , ou.getOrganisation().getOrganisation_id().longValue());
      if (rol != null) {
        for (RoomOrganisation ro : rol) {
          rl.add(ro.getRoom());
View Full Code Here

  public String getInvitationHash(String SID, String username, Long room_id) {
    Long users_id = this.sessiondataDao.checkSession(SID);
    Long user_level = this.userManager.getUserLevelByID(users_id);
   
    if (AuthLevelUtil.checkUserLevel(user_level)) {
      User invitee = userDao.getContact(username, username, username, users_id);
      Invitation invitation = invitationManager.getInvitation(invitee, roomDao.get(room_id),
              false, "", Valid.OneTime
              , userDao.get(users_id), 1L, null, null, null);
 
      return ((invitation == null) ? null : invitation.getHash());
View Full Code Here

    List<User> users = adminUserDao.getAllUsers();
    assertNotNull("User list should not be null ", users);
    assertFalse("User list should not be empty ", users.isEmpty());
   
    Random random = new Random();
    User contact = createUserContact(random.nextInt(), getUserId());
    String email = contact.getAdresses().getEmail();
    List<User> l = adminUserDao.get(email, false);
    // check that contact is visible for admin
    assertNotNull("Contact list should not be null for admin ", l);
    assertFalse("Contact list should not be empty for admin ", l.isEmpty());
   
    // check that contact is visible for owner
    l = usersDao.get(email, getUserId());
    assertTrue("Contact list should not be empty for owner ", !l.isEmpty());   
    //delete contact
    adminUserDao.delete(contact, getUserId());
    l = adminUserDao.get(email, false);
    assertTrue("Contact list should be empty after deletion", l.isEmpty());

    User u = createUser(random.nextInt());
    User u1 = createUser(random.nextInt());
    contact = createUserContact(random.nextInt(), u.getUser_id());
    email = contact.getAdresses().getEmail();
    // check that contact is not visible for user that is not owner of this contact
    l = usersDao.get(email, u1.getUser_id());
    assertTrue("Contact list should be empty for another user", l.isEmpty());
    //delete contact
    adminUserDao.delete(contact, u.getUser_id());
    l = adminUserDao.get(email, false);
    assertTrue("Contact list should be empty after deletion", l.isEmpty());
View Full Code Here

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

  public User createUser(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);
    Long user_id = userManager.addUser(u);
    assertTrue("Cann't add user", user_id > 0);
    u = userManager.getUserByIdAndDeleted(user_id);
    assertNotNull("User should not be null", 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("Cann't add user", user);
    return user;
  }
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.