Package org.nxplanner.domain

Examples of org.nxplanner.domain.UserStory


    public List fetchEditableStories() throws HibernateException, AuthenticationException {
        List allStories = getSession().find(EDITABLE_ITERATIONS_QUERY_STRING);
        List acceptedStories = new ArrayList();
        for (int i = 0; i < allStories.size(); i++) {
            UserStory it = (UserStory) allStories.get(i);
            if (accept(it)) {
                acceptedStories.add(it);
            }
        }
        return acceptedStories;
View Full Code Here


    }

    private void write(Iteration iteration, Document document, Rectangle pageRectangle, PdfWriter docWriter)
            throws DocumentException {
        for (Iterator iterator = iteration.getUserStories().iterator(); iterator.hasNext();) {
            UserStory userStory = (UserStory) iterator.next();
            write(userStory, document, pageRectangle, docWriter);
        }
    }
View Full Code Here

        stream.close();

    }

    private static UserStory newStory(String name, Person customer, double estimatedHours, Collection tasks) {
        UserStory story = new UserStory();
        story.setName(name);
        story.setCustomer(customer);
        story.setEstimatedHours(estimatedHours);
        story.setTasks(tasks);
        return story;
    }
View Full Code Here

    protected List getOptions() throws HibernateException, AuthenticationException {
        UserStoryRepository userStoryRepository = getUserStoryRepository();
        List stories = userStoryRepository.fetchEditableStories();
        List options = new ArrayList();
        for (int i = 0; i < stories.size(); i++) {
            UserStory s = (UserStory) stories.get(i);
            options.add(new StoryModel(new IterationModel(userStoryRepository.getIteration(s)), s));
        }
        return options;
    }
View Full Code Here

    protected List getOptions() throws HibernateException, AuthenticationException {
        UserStoryRepository userStoryRepository = getUserStoryRepository();
        List stories = userStoryRepository.fetchEditableStories();
        List options = new ArrayList();
        for (int i = 0; i < stories.size(); i++) {
            UserStory s = (UserStory) stories.get(i);
            options.add(new StoryModel(new IterationModel(userStoryRepository.getIteration(s)), s));
        }
        return options;
    }
View Full Code Here

         reportStream = PdfReportExporter.class.getClassLoader().getResourceAsStream("org/nxplanner/export/reports/JRIteration.jasper");
         parameters.put("IterationName", iteration.getName());
         parameters.put("IterationStartDate", iteration.getStartDate());
         parameters.put("IterationEndDate", iteration.getEndDate());
      } else if (object instanceof UserStory) {
         UserStory story = (UserStory)object;

         try {
            ds = new UserStoryDataSource(story, session);
         } catch (HibernateException he) {
            throw new ExportException(he);
         }

         reportStream = PdfReportExporter.class.getClassLoader().getResourceAsStream("org/nxplanner/export/reports/JRStory.jasper");
         parameters.put("StoryName", story.getName());
         Person cust = story.getCustomer(); parameters.put("StoryCustomerName", (cust != null) ? cust.getName() : null);
         parameters.put("StoryEstimatedHours", new java.lang.Double(story.getEstimatedHours()));
         parameters.put("StoryDescription", story.getDescription());
      } else if (object instanceof Task) {
         Task task = (Task)object;

         try {
            ds = new TaskDataSource(task, session);
View Full Code Here

         if (task.getAcceptorId() != userId && task.getPairId() != userId && !currentlyActive) { return next(); }

         iterationName = (String)result[1];
         iterationStart = (Date)result[2];
         iterationEnd = (Date)result[3];
         UserStory story = (UserStory)result[4];
         storyName = story.getName();
         storyEstimate = new Double(story.getEstimatedHours());

         return true;
      }
View Full Code Here

        task3.setTimeEntries(new ArrayList());
        tasks = new ArrayList();
        tasks.add(task1);
        tasks.add(task2);
        tasks.add(task3);
        story = new UserStory();
        story.setTasks(tasks);
    }
View Full Code Here

        Task task2 = new Task();
        ArrayList tasks = new ArrayList();
        FieldAccessor.set(task2, "timeEntries", new ArrayList());
        tasks.add(task1);
        tasks.add(task2);
        UserStory story = new UserStory();
        story.setEstimatedHours(8.0);
        FieldAccessor.set(story, "tasks", tasks);
        double adjustedEstimated = story.getAdjustedEstimatedHours();

        assertEquals("wrong adjusted estimated hours", 8.0, adjustedEstimated, 0);
    }
View Full Code Here

// 0 + 2 + 6
        assertEquals("wrong remaining hours", 8.0, remainingHours, 0.0);
    }

    public void testRemainingHoursWithNoTasks() {
        UserStory noTaskStory = new UserStory();
        double estimatedHours = 10.0;
        noTaskStory.setEstimatedHours(estimatedHours);
        assertEquals("wrong remaining hours when no tasks", estimatedHours, noTaskStory.getRemainingHours(), 0.0);
    }
View Full Code Here

TOP

Related Classes of org.nxplanner.domain.UserStory

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.