Package com.nevernote.service

Examples of com.nevernote.service.PreferencesService.findOne()


      //Test Notes results on console
      for (Notes note : userNotes) {
        System.out.println("Here is a file name: " + note.getFileName());
      }
     
      String sortMethod = prefService.findOne(user.getId()).getSort();
      if (sortMethod.equals("ALPHA_ASCENDING")) {
        Collections.sort(userNotes);
      } else if (sortMethod.equals("ALPHA_DESCENDING")) {
        Collections.sort(userNotes, Collections.reverseOrder());
      }
View Full Code Here


    } else {
      session.setAttribute("userNotes", new ArrayList<Notes>());
    }
    System.out.println("No More notes for this user");
   
    Preferences userPref = prefService.findOne(user.getId());

    session.setAttribute("fontColor", ColorScheme.valueOf(userPref.getColors()).getFontColor());
    session.setAttribute("backColor", ColorScheme.valueOf(userPref.getColors()).getBackColor());

    response.sendRedirect("ClientDash.jsp");
View Full Code Here

    String sort = request.getParameter("sort");
    String colors = request.getParameter("color");

    if (sort != null && colors != null) {
      Preferences pref = preferencesService.findOne(u.getId());
      pref.setColors(colors);
      pref.setSort(sort);
      preferencesService.save(pref);
    }
    response.sendRedirect("ClientDashServlet");
View Full Code Here

    }
    if (!userFromDB.getEnabled()) {
      response.sendRedirect("Login.jsp");
    }

    String sort = preferencesService.findOne(u.getId()).getSort();
    String colors = preferencesService.findOne(u.getId()).getColors();
 
    session.setAttribute("sort", sort);
    session.setAttribute("colors", colors);
View Full Code Here

    if (!userFromDB.getEnabled()) {
      response.sendRedirect("Login.jsp");
    }

    String sort = preferencesService.findOne(u.getId()).getSort();
    String colors = preferencesService.findOne(u.getId()).getColors();
 
    session.setAttribute("sort", sort);
    session.setAttribute("colors", colors);

    response.sendRedirect("Preferences.jsp");
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.