Package net.sf.pmr.struts.agilePlanning.story.form

Examples of net.sf.pmr.struts.agilePlanning.story.form.StoryForm


        // get the service
        StoryService storyService = AgilePlanningObjectFactory.getStoryService();

        // get the form
        StoryForm storyform = (StoryForm) form;
       
        // delete the story
        Errors errors = storyService.delete(storyform.getPersistanceId(), storyform.getPersistanceVersion());

        // Convert into struts action errors
        ActionMessages actionMessages = new ActionMessages();

        if (errors.hasErrors()) {
View Full Code Here


            Story story = storyService.findByPersistanceId(Integer
                    .parseInt((String) request.getParameter("persistanceId")));

            // populate the form
            StoryForm storyForm = (StoryForm) form;

            storyForm.setDescription(story.getDescription());
            storyForm.setDaysEstimated(story.getDaysEstimated());
            storyForm.setShortDescription(story.getShortDescription());
            storyForm.setPersistanceId(story.getPersistanceId());
            storyForm.setPersistanceVersion(story.getPersistanceVersion());
            storyForm.setBusinessValueId(story.getBusinessValue().getId());
            storyForm.setRiskLevelId(story.getRiskLevel().getId());
            storyForm.setDaysCompleted(story.daysCompleted());
            storyForm.setDaysRemaining(story.daysRemaining());
            storyForm.setPercentCompleted(story.percentCompleted());
            storyForm.setDifferenceInPercentBetweenEstimateAndTaskCharge(story.differenceInPercentBetweenEstimateAndTaskCharge());
            storyForm.setDifferenceOfDaysBetweenEstimateAndTaskCharge(story.differenceOfDaysBetweenEstimateAndTaskCharge());
            storyForm.setDifferenceInPercentBetweenEstimateAndTaskEstimate(story.differenceInPercentBetweenEstimateAndTaskEstimate());
            storyForm.setDifferenceOfDaysBetweenEstimateAndTaskEstimate(story.differenceOfDaysBetweenEstimateAndTaskEstimate());

        }

        // get the list of riskLevel to populate the list box
        Set<RiskLevel> riskLevels = storyService.findAllRiskLevel();
View Full Code Here

        // get the service
        StoryService storyService = AgilePlanningObjectFactory
                .getStoryService();

        // get the form
        StoryForm storyform = (StoryForm) form;

        // TODO faire une seul m�thode storyService.save ?
        Errors errors = null;
        // save the story
        if (storyform.getPersistanceId() == 0) {
            // add
            // get the current basicProject from the session
            Integer basicProjectPersistanceId = (Integer) request.getSession()
                    .getAttribute("basicProject.persistanceId");
            errors = storyService.add(basicProjectPersistanceId.intValue(),
                    storyform.getShortDescription(),
                    storyform.getDescription(), storyform.getDaysEstimated(),
                    storyform.getBusinessValueId(), storyform.getRiskLevelId());
        } else {
            // update
             errors = storyService.update(storyform.getShortDescription(),
             storyform.getDescription(), storyform.getDaysEstimated(),
             storyform.getBusinessValueId(), storyform.getRiskLevelId(),
             storyform.getPersistanceId(), storyform.getPersistanceVersion());
        }

        // Convert into struts action errors
        ActionMessages actionMessages = new ActionMessages();
View Full Code Here

TOP

Related Classes of net.sf.pmr.struts.agilePlanning.story.form.StoryForm

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.