Examples of StoryService


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

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

        // 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

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

     * @param request request
     */
    private void populateListForProjectSummary(final HttpServletRequest request) {

        // Get the services
        StoryService storyService = AgilePlanningObjectFactory.getStoryService();
        IterationService iterationService = AgilePlanningObjectFactory.getIterationService();
        ReleaseService releaseService = AgilePlanningObjectFactory.getReleaseService();

        // number of story
        request.setAttribute("numberOfStory", new Integer(storyService
                .findByProjectPersistanceId(((Integer) request.getSession().getAttribute("basicProject.persistanceId")).intValue()).size()));
       
        // number of iteration
        request.setAttribute("numberOfIteration", new Integer(
            iterationService.findByProjectPersistanceId(((Integer) request.getSession().getAttribute("basicProject.persistanceId")).intValue()).size()));
View Full Code Here

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

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

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

        // list the charges for the current task
        int taskPersistanceId = 0;
        if ( StringUtils.isNotEmpty(request.getParameter("taskPersistanceId"))) {
            taskPersistanceId = Integer.parseInt(request.getParameter("taskPersistanceId"));
        }
        int storyPersistanceId = 0;
        if ( StringUtils.isNotEmpty(request.getParameter("storyPersistanceId"))) {
          storyPersistanceId = Integer.parseInt(request.getParameter("storyPersistanceId"));
        }
       
        Task task = storyService.findTaskByPersistanceId(taskPersistanceId);

        // put the tasks in the request
        request.setAttribute("chargeList", task.getCharges());

        // populate summary
View Full Code Here

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

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

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

        // populate the form
        ChargeForm chargeForm = (ChargeForm) form;
        chargeForm.setStoryPersistanceId(Integer.parseInt((String) request.getParameter("storyPersistanceId")));
        chargeForm.setTaskPersistanceId(Integer.parseInt((String) request.getParameter("taskPersistanceId")));
       
        // find the Story... if needed
        if (StringUtils.isNotEmpty((String) request.getParameter("persistanceId"))) {

            Charge charge = storyService.findChargeByPersistanceId(Integer.parseInt((String) request.getParameter("persistanceId")));

            chargeForm.setDay(charge.getDay());
            chargeForm.setDaysNeededToFinish(charge.getDaysNeededToFinish());
            chargeForm.setTimeUsedToday(charge.getTimeUsedToday());
            chargeForm.setPersistanceVersion(charge.getPersistanceVersion());
View Full Code Here

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

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

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

        // get the form
        ChargeForm chargeForm = (ChargeForm) form;

        // TODO faire une seul m�thode taskService.save ?
        // save the story
        if (chargeForm.getPersistanceId() == 0) {
            // add
            storyService.addCharge(chargeForm.getStoryPersistanceId(),
                            chargeForm.getTaskPersistanceId(),
                            ((User) request.getSession().getAttribute("user")).getPersistanceId(),
                            chargeForm.getDay(),
                            chargeForm.getTimeUsedToday(),
                            chargeForm.getDaysNeededToFinish());
        } else {
            // update
            storyService.updateCharge(chargeForm.getDay(),
                          chargeForm.getTimeUsedToday(),
                          chargeForm.getDaysNeededToFinish(),
                          chargeForm.getStoryPersistanceId(),
                          chargeForm.getTaskPersistanceId(),
                          chargeForm.getPersistanceId(),
View Full Code Here

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

     * @param request request
     */
    private void populateSummary(final HttpServletRequest request, final int storyPersistanceId, final int taskPersistanceId) {

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

        request.setAttribute("numberOfCharge", Integer.valueOf(storyService.findTaskByPersistanceId(taskPersistanceId).getCharges().size()) );
        request.setAttribute("storyPersistanceId", storyPersistanceId);
        request.setAttribute("taskPersistanceId", taskPersistanceId);
        request.setAttribute("story.shortDescription", storyService.findByPersistanceId(storyPersistanceId).getShortDescription());
        request.setAttribute("task.shortDescription", storyService.findTaskByPersistanceId(taskPersistanceId).getShortDescription());
       

    }
View Full Code Here

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

     * @param request request
     */
    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

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

     * @param request request
     */
    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
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.