Package org.sonatype.security.usermanagement

Examples of org.sonatype.security.usermanagement.UserNotFoundException


      catch (LdapDAOException e) {
        log.debug("User: " + userId + " not found, cause: " + e.getMessage(), e);
        throw new UserNotFoundTransientException(userId, e.getMessage(), e);
      }
    }
    throw new UserNotFoundException(userId);
  }
View Full Code Here


        if (user != null) {
          return user.getStatus();
        }
      }
      catch (final NoSuchUserManagerException e) {
        throw new UserNotFoundException(userId, e.getMessage(), e);
      }
      catch (final UserNotFoundTransientException e) {
        log.debug("Ignoring transient user error: {}", e);
        return UserStatus.disabled;
      }
      catch (final UserNotFoundException e) {
        throw e; // pass back original cause unchanged
      }
      catch (final RuntimeException e) {
        log.debug("Ignoring transient user error: {}", e);
        return UserStatus.disabled;
      }
    }
    throw new UserNotFoundException(userId);
  }
View Full Code Here

      throws UserNotFoundException
  {
    User existingUser = this.getUser(user.getUserId());

    if (existingUser == null) {
      throw new UserNotFoundException(user.getUserId());
    }

    return user;
  }
View Full Code Here

      throws UserNotFoundException
  {
    User existingUser = this.getUser(userId);

    if (existingUser == null) {
      throw new UserNotFoundException(userId);
    }

    this.getUsers().remove(existingUser);

  }
View Full Code Here

    for (User user : this.listUsers()) {
      if (user.getUserId().equals(userId)) {
        return user;
      }
    }
    throw new UserNotFoundException(userId);
  }
View Full Code Here

        }
      }
    }

    if (!foundUser) {
      throw new UserNotFoundException(userId);
    }
    // clear the authz realm caches
    eventBus.post(new AuthorizationConfigurationChanged());
  }
View Full Code Here

        // we should NEVER bet here
        this.logger.warn("UserManager: '" + userManager.getSource()
            + "' was not found, but is in the list of UserManagers", e);
      }
    }
    throw new UserNotFoundException(userId);
  }
View Full Code Here

    // this is the UserManager that owns the user
    UserManager userManager = userManagerFacade.getUserManager(source);
    User user = userManager.getUser(userId);

    if (user == null) {
      throw new UserNotFoundException(userId);
    }

    // add roles from other user managers
    this.addOtherRolesToUser(user);
View Full Code Here

        break;
      }
    }

    if (!found) {
      throw new UserNotFoundException(email);
    }

    resetPassword(userId);
  }
View Full Code Here

    if (userIds.size() > 0) {

      this.getSecurityEmailer().sendForgotUsername(email, userIds);
    }
    else {
      throw new UserNotFoundException(email);
    }

  }
View Full Code Here

TOP

Related Classes of org.sonatype.security.usermanagement.UserNotFoundException

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.