Package net.sf.pmr.agilePlanning.service

Examples of net.sf.pmr.agilePlanning.service.ReleaseService


        }
        request.setAttribute("basicProject.numberOfIteration", Integer.valueOf(numberOfIteration));
       
        // Afficher le nombre de release
        int numberOfRelease = 0;
        ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();
        if (myWorkspaceForm.getProjectId() > 0) {
           numberOfRelease = releaseService.findByProjectPersistanceId(myWorkspaceForm.getProjectId()).size();
        }
        request.setAttribute("basicProject.numberOfRelease", Integer.valueOf(numberOfRelease));               

  }
View Full Code Here


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

        // get the  service
        ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();
       
        // list the releases for the current project
        Set<Release> releases = releaseService.findByProjectPersistanceId(((Integer) request.getSession().getAttribute("basicProject.persistanceId")).intValue());
       
        Set<ReleaseView> releasesView = new HashSet<ReleaseView>();

        // copy the properties from the release to the view
        for (Release release : releases) {
View Full Code Here

            throws Exception {

        // TODO Faire une m�thode de s�curit� pour v�rifier le user

        // get the  service
        ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();       
       
        // find the release... if needed
        if (StringUtils.isNotEmpty( (String) request.getParameter("persistanceId"))) {
     
            Release release = releaseService.findByPersistanceId(Integer.parseInt((String)request.getParameter("persistanceId")));

            // populate the form
            ReleaseForm releaseForm = (ReleaseForm) form;
           
            releaseForm.setDate(release.getDate());
View Full Code Here

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

        // get the service
      ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();
     
        // list the stories for the release
      Set<Story> stories = releaseService.findStoriesToAdd(Integer.parseInt(request.getSession().getAttribute("basicProject.persistanceId").toString()));
     
      // build the set of storyViews
      Set<StoryView> storyViews = this.buildStoryViewsFromStories(stories);
     
        // put the storyViews in the request
View Full Code Here

        }
     
    }
     
      // 3. Enfin, on appel le service d'ajout
        ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();
       
        // TODO : recupérer la persistanveVersion dans la request !!!
       
        Release release = releaseService.findByPersistanceId(Integer.parseInt(request.getParameter("releasePersistanceId")));
       
        long persistanceVersion = release.getPersistanceVersion();
       
       
        // ajout
        Errors errors = releaseService.addStories(storiesToAdd, Integer.parseInt(request.getParameter("releasePersistanceId")), persistanceVersion);

        // traitement des erreurs...
        // ... si des erreurs sont trouvée...
        if (errors.hasErrors()) {
View Full Code Here

        }
     
    }
     
      // 3. Enfin, on appel le service de suppression
        ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();
       
        // TODO : recupérer la persistanveVersion dans la request !!!
       
        Release release = releaseService.findByPersistanceId(Integer.parseInt(request.getParameter("releasePersistanceId")));
       
        long persistanceVersion = release.getPersistanceVersion();
       
       
        // ajout
        Errors errors = releaseService.removeStories(storiesToRemove, Integer.parseInt(request.getParameter("releasePersistanceId")), persistanceVersion);

        // traitement des erreurs...
        // ... si des erreurs sont trouvée...
        if (errors.hasErrors()) {
View Full Code Here

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

        // get the  service
        ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();
       
        // get the form
        ReleaseForm releaseform = (ReleaseForm) form;

        // TODO faire une seul méthode iterationService.saveOrUpdate ?
        Errors errors = null;
        // get the current basicProject from the session
        Integer basicProjectPersistanceId = (Integer) request.getSession().getAttribute("basicProject.persistanceId");
        // save the iteration
        if (releaseform.getPersistanceId() == 0) {
            // add
            errors = releaseService.add(basicProjectPersistanceId.intValue(), releaseform.getNumber(), releaseform.getDate());   
        } else {
            // update
            errors = releaseService.update(releaseform.getNumber(), releaseform.getDate(), releaseform.getPersistanceId(), releaseform.getPersistanceVersion());
        }

        // Convert into struts action errors
        if (errors.hasErrors()) {
            ActionMessages actionMessages = ActionMessageUtils.convertFromKeopsErrorsToActionMessages(errors);
View Full Code Here

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

        // get the  service
        ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();
       
        // get the form
        ReleaseForm releaseform = (ReleaseForm) form;

        Errors errors = null;
        // delete the iteration
        errors = releaseService.delete(releaseform.getPersistanceId(), releaseform.getPersistanceVersion());

        // Convert into struts action errors
        if (errors.hasErrors()) {
            ActionMessages actionMessages = ActionMessageUtils.convertFromKeopsErrorsToActionMessages(errors);
            saveErrors(request, actionMessages);
View Full Code Here

           // iterationForm.setReleasePersistanceId(iteration.getRelease().getPersistanceId());
           
        }
       
        // populate the release list box
        ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();
        Set<Release> releases = releaseService.findByProjectPersistanceId(((Integer) request.getSession().getAttribute("basicProject.persistanceId")).intValue());
        // Ajout d'un ligne vide
        Release release = new ReleaseImpl();
        release.setProject(null);
        release.setDate(null);
        release.setNumber("-");
View Full Code Here

    private void populateSummary(final HttpServletRequest request) {
       
        // Get the services
        StoryService storyService = AgilePlanningObjectFactory.getStoryService();
        IterationService iterationService = AgilePlanningObjectFactory.getIterationService();
        ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();
       
        request.setAttribute("numberOfStory", new Integer(storyService.findByProjectPersistanceId(((Integer) request.getSession().getAttribute("basicProject.persistanceId")).intValue()).size()));
        request.setAttribute("numberOfIteration", new Integer(iterationService.findByProjectPersistanceId(((Integer) request.getSession().getAttribute("basicProject.persistanceId")).intValue()).size()));
        request.setAttribute("numberOfRelease", new Integer(releaseService.findByProjectPersistanceId(((Integer) request.getSession().getAttribute("basicProject.persistanceId")).intValue()).size()));
       
    }
View Full Code Here

TOP

Related Classes of net.sf.pmr.agilePlanning.service.ReleaseService

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.