Package net.sf.pmr.core.service

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


        MyWorkspaceForm myWorkspaceForm = (MyWorkspaceForm) form;
       
       // TODO regarder le ActionSupport pour struts de spring
     
      ProjectService projectService = CoreObjectFactory.getProjectService();
       
        Set projectSet = projectService.findForAUser(((User) request.getSession().getAttribute("user")).getPersistanceId());
       
        List projects = new ArrayList(projectSet);
       
        // Positionnement d'un projet par défaut.... si il en existe un dans la
        // liste...
View Full Code Here


     * @param request request
     */
    private void populateListBox(final HttpServletRequest request) {
       
        // get the list of developper for the project to populate the listBox
        ProjectService projectService = CoreObjectFactory.getProjectService();
        Project basicProject = projectService.findByPersistanceId(((Integer) request.getSession()
                                                                                              .getAttribute("basicProject.persistanceId")).intValue());
        Set<User> members = basicProject.getMembers();
        // ajout d'une ligne vide
        User user = new UserImpl();
        user.setCompany(null);
View Full Code Here

      HttpServletRequest request, HttpServletResponse response)
      throws Exception {

   
    // get the project service
    ProjectService projectService = CoreObjectFactory.getProjectService();
   
    // find all projects
    List basicProjects = projectService.findAll();
   
    request.setAttribute("basicProjects", basicProjects);
   
    // populate the form
    UserProjectForm userProjectForm = (UserProjectForm) form;
View Full Code Here

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

    // get the project repository
    ProjectService projectService = CoreObjectFactory.getProjectService();

    // set the userList in request for display in the page
    request.setAttribute("basicProjectList", projectService.findAll());

    // populate the summary
    Summary.populate(request);

    return mapping.findForward("basicProjectList");
View Full Code Here

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

    // get the basicProject service
    ProjectService projectService = CoreObjectFactory.getProjectService();

    // get the form
    BasicProjectForm basicProjectForm = (BasicProjectForm) form;

    // Save or update the BasicProject
    Errors errors = null;
    if (basicProjectForm.getPersistanceId() == 0) {
      // get the current user from the session
      User user = (User) request.getSession().getAttribute("user");
      // add
      errors = projectService.add(basicProjectForm.getCode(),
          basicProjectForm.getName(), user.getPersistanceId());
    } else {
      // update
      errors = projectService.update(basicProjectForm
          .getPersistanceId(), basicProjectForm.getCode(),
          basicProjectForm.getName(), basicProjectForm
              .getPersistanceVersion());
    }
View Full Code Here

   * @return BasicProject
   */
  private Project findProjectByPersistanceId(final HttpServletRequest request) {

    // get the BasicProject Service
    ProjectService projectService = CoreObjectFactory.getProjectService();

    // find the basicProject, if a project is needed
    if (StringUtils.isNotEmpty((String) request
        .getParameter("persistanceId"))) {

      return projectService
          .findByPersistanceId(Integer.parseInt(request.getParameter(
              "persistanceId").toString()));

    } else {
      // else return null
View Full Code Here

    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.ProjectService

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.