Package net.sf.pmr.core.service

Examples of net.sf.pmr.core.service.UserService


  public ActionForward add(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response)
      throws Exception {
     
    // get the user service
    UserService userService = CoreObjectFactory.getUserService();
    // get the form
    UserProjectForm userProjectForm = (UserProjectForm) form;

    // call the service
    userService.addUserToProject(userProjectForm.getUserPersistanceId(), userProjectForm.getBasicProjectPersistanceId());

    // return to the detail
      return mapping.findForward("userList");
     
  }
View Full Code Here


    // TODO Faire une m�thode de s�curit� pour v�rifier le user (voir les spec J2EE)

      // TODO regarder le ActionSupport pour struts de spring
     
    // get the user service
    UserService userService = CoreObjectFactory.getUserService();
   
    // set the userList in request for display in the page
    request.setAttribute("userList", userService.findAll());
   
        // populate the summary
        Summary.populate(request);
   
    return mapping.findForward("userList");
View Full Code Here

  public ActionForward detail(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response)
      throws Exception {

      // get the user service
    UserService userService = CoreObjectFactory.getUserService();
   
    // find the user ... if needed
        if (StringUtils.isNotEmpty( (String) request.getParameter("persistanceId"))) {

            User user = userService.findByPersistanceId(Integer.parseInt(request.getParameter("persistanceId").toString()));
           
            // Populate the form
            UserForm userForm = (UserForm) form;
           
            userForm.setFirstName(user.getFirstName());
View Full Code Here

  public ActionForward save(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response)
      throws Exception {
     
    // get the user service
    UserService userService = CoreObjectFactory.getUserService();
    // get the form
    UserForm userForm = (UserForm) form;
   
    // TODO faire une seul m�thode userService.save
   
    // save the user
    Errors errors = null;
      errors = userService.addOrUpdate(userForm.getPersistanceId(), userForm.getFirstName(), userForm.getLastName(), userForm.getLogin(), userForm.getPassword(), userForm.getEmail(), userForm.getPersistanceVersion());       
   
    // Convert into struts action errors
    ActionMessages actionMessages = new ActionMessages();
   
    if (errors.hasErrors()) {
View Full Code Here

     * populate teh summary
     */
    public final static void populate(HttpServletRequest request) {
       
        // get the user service
        UserService userService = CoreObjectFactory.getUserService();
        // get the project repository
        ProjectService projectService = CoreObjectFactory.getProjectService();
       
        // set the number of user in the request
        request.setAttribute("numberOfUser", userService.countAll());
        // set the number of project in the request
        request.setAttribute("numberOfProject", projectService.countAll());
       
    }
View Full Code Here

TOP

Related Classes of net.sf.pmr.core.service.UserService

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.