Examples of UserNotFoundException


Examples of com.philip.journal.login.service.exception.UserNotFoundException

    @Override
    public User authenticateUser(final Map<String, Object> session, final String username, final String pPassword)
    {
        final User user = getDaoFacade().getUserDAO().readByUsername(username);
        if (user == null) {
            throw new UserNotFoundException(username);
        } else {
            final String password = pPassword == null ? "" : pPassword;
            if (PasswordUtil.getInstance().checkPassword(user, password) || password.equals(user.getPassword())) {
                session.put(Constant.CURRENT_USER, user);
                return user;
View Full Code Here

Examples of com.porterhead.rest.user.exception.UserNotFoundException

            user = userRepository.findByUuid(userIdentifier);
        } else {
            user = userRepository.findByEmailAddress(userIdentifier);
        }
        if (user == null) {
            throw new UserNotFoundException();
        }
        return user;
    }
View Full Code Here

Examples of com.streamreduce.core.service.exception.UserNotFoundException

    @Override
    public User getUserFromInvite(String inviteKey, String accountId) throws UserNotFoundException {
        User u = userDAO.findInvitedUser(inviteKey, accountId);
        if (u == null) {
            throw new UserNotFoundException(inviteKey + "+" + accountId);
        }
        // Create the event stream entry
        eventService.createEvent(EventId.READ, u, null);
        return u;
    }
View Full Code Here

Examples of edu.ubb.warp.exception.UserNotFoundException

      statement.setInt(1, userID);
      ResultSet result = statement.executeQuery();
      if (result.next()) {
        user = getUserFromResult(result);
      } else {
        throw new UserNotFoundException();
      }
    } catch (SQLException e) {
      throw new DAOException();
    }
    return user;
View Full Code Here

Examples of eu.planets_project.ifr.core.security.api.services.UserManager.UserNotFoundException

        // Catch the runtime exception and set user to null
        log.info("User doesn't exist so setting to null");
        user = null;
      }
      log.info("testing for user == null");
      if( user == null ) throw new UserNotFoundException();
      log.info("User ID = " + user.getId().toString());
      log.info("User name = " + user.getUsername());
    } catch (Exception e) {
      log.info(e.getClass().getName()+": "+e.getMessage());
    }
View Full Code Here

Examples of eu.scape_project.pw.idp.excpetions.UserNotFoundException

     */
    public void activateUser(IdpUser user) throws UserNotFoundException {
        IdpUser foundUser = em.find(IdpUser.class, user.getId());
        if (foundUser == null) {
            log.error("Error activating user. User {} not found.", user.getUsername());
            throw new UserNotFoundException("Error activating user. User " + user.getUsername() + "not found.");
        }
        foundUser.setStatus(IdpUserState.ACTIVE);
        foundUser.setActionToken("");
        em.persist(foundUser);
        log.info("Activated user with username {}.", foundUser.getUsername());
View Full Code Here

Examples of it.nibbles.test.exceptions.UserNotFoundException

    private UserRepository userRepository;

    public User findUser(String name) {
        User user = userRepository.findByName(name);
        if (user == null) {
            throw new UserNotFoundException(name);
        }
        return user;
    }
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.UserNotFoundException

        if (getUser(newUsername) != null) {
            throw new UserAlreadyExistsException(newUsername);
        }
        User user = getUser(oldUsername);
        if (user == null) {
            throw new UserNotFoundException(oldUsername);
        }
        String group = getGroup(user).getName();
        if (group == null) {
            throw new GroupNotFoundException(null);
        }
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.UserNotFoundException

        if (username == null || password == null || "".equals(password)) {
            throw new IllegalArgumentException("Username or Password cannot be null or \"\" ");
        }
        User user = getUser(username);
        if (user == null) {
            throw new UserNotFoundException(username);

        }
        user.getCredentials().put("password", password);
    }
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.UserNotFoundException

        Group newGroup = (Group) m_useradmin.getRole(group);
        if (newGroup == null) {
            throw new GroupNotFoundException(group);
        }
        if (user == null) {
            throw new UserNotFoundException(username);
        }
        getGroup(user).removeMember(user);
        newGroup.addMember(user);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.