Package org.fao.geonet.repository

Examples of org.fao.geonet.repository.UserRepository.findOne()


   * @throws UserNotFoundEx  if the id does not reference a user
   */
  public static User updatePasswordWithNew(boolean matchOldPassword, String oldPassword,
      String newPassword, Integer iUserId, ApplicationContext appContext) throws SQLException, UserNotFoundEx {
      UserRepository repo = appContext.getBean(UserRepository.class);
        User user = repo.findOne(iUserId);
        if (user == null) {
            throw new UserNotFoundEx(""+iUserId);
        }

        PasswordEncoder encoder = encoder(appContext);
View Full Code Here


        List<User> owners = new ArrayList<User>();
        UserRepository userRepo = this.context.getBean(UserRepository.class);

        for (Metadata md : metadata) {
            int ownerId = md.getSourceInfo().getOwner();
            owners.add(userRepo.findOne(ownerId));
        }

        processList(owners, subject, status, changeDate, changeMessage, mdChanged);

    }
View Full Code Here

    if (userId == null)
      throw new UserNotFoundEx(null);

        final UserRepository userRepository = context.getBean(UserRepository.class);
        final User user = userRepository.findOne(userId);

        user.setName(name)
                .setKind(kind)
                .setOrganisation(organ)
                .setSurname(surname);
View Full Code Here

        final UserGroupRepository userGroupRepository = context.getBean(UserGroupRepository.class);

        if (myProfile == Profile.Administrator || myProfile == Profile.UserAdmin || myUserId.equals(id)) {

      // -- get the profile of the user id supplied
            User user = userRepository.findOne(Integer.valueOf(id));
      if (user == null) {
        throw new IllegalArgumentException("user "+id+" doesn't exist");
            }

      String  theProfile = user.getProfile().name();
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.