Package com.nevernote.service

Examples of com.nevernote.service.UsersService.findById()


    List<Notes> all = ns.findAll();
    List<Notes> userNotes = new ArrayList<Notes>();
    System.out.println("***************I did get the right ID, right?**************");
    System.out.println(id);
   
    Users target = us.findById(id);
   
    System.out.println("***************this should be the right user**************");
    if(target==null){
      System.out.println("ARGH!!! NO USER FOUND!!! F-ING NULL?");
    }else{
View Full Code Here


    PreferencesService preferenceService = ctx.getBean("preferencesService", PreferencesService.class);

    BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor();
    String encryptedPassword = passwordEncryptor.encryptPassword(request.getParameter("pw"));

    if(usersService.findById(request.getParameter("un")) != null) {
      request.setAttribute("registrationMessage", "Username is already taken please regiser with another user name.");
      String url = "/Register.jsp";
      RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(url);
      dispatcher.forward(request, response);
      return;
View Full Code Here

    PreferencesService preferencesService = ctx.getBean("preferencesService", PreferencesService.class);
    UsersService usersService = ctx.getBean("usersService", UsersService.class);
   
    //Pulls user session and confirms they are logged in
    Users u = (Users) session.getAttribute("userSession");
    Users userFromDB = usersService.findById(u.getId());
    if(userFromDB == null){
      response.sendRedirect("Login.jsp");
    }
    if (!userFromDB.getEnabled()) {
      response.sendRedirect("Login.jsp");
View Full Code Here

    NotesService notesService = ctx.getBean("notesService", NotesService.class);
    UsersService usersService = ctx.getBean("usersService", UsersService.class);
   
    //Pulls user session and confirms they are logged in
    Users u = (Users) session.getAttribute("userSession");
    Users userFromDB = usersService.findById(u.getId());
    if (userFromDB == null) {
      response.sendRedirect("Login.jsp");
    }
    if (!userFromDB.getEnabled()) {
      response.sendRedirect("Login.jsp");
View Full Code Here

    if (!"root".equals(user.getId())) {
      response.sendRedirect("Login.jsp");
    }

    String userId = request.getParameter("disable");
    Users userToDisable = us.findById(userId);
    userToDisable.setEnabled(false);
    us.save(userToDisable.getId(), userToDisable);

    response.sendRedirect("AdminDashServlet");
  }
View Full Code Here

    if (!"root".equals(user.getId())) {
      response.sendRedirect("Login.jsp");
    }

    String userId = request.getParameter("enable");
    Users userToEnable = us.findById(userId);
    userToEnable.setEnabled(true);
    us.save(userToEnable.getId(), userToEnable);

    response.sendRedirect("AdminDashServlet");
  }
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.