Package org.nxplanner.domain

Examples of org.nxplanner.domain.Task


        iteration.getUserStories().add(story);
        return story;
    }

    protected Task newTask(UserStory story) {
        Task task = new Task();
        task.setStory(story);
        task.setId(nextId++);
        task.setName(TASK_PREFIX + story.getId());
        story.getTasks().add(task);
        return task;
    }
View Full Code Here


            this.isCompleted = isCompleted;
            this.isActive = isActive;
        }

        public boolean evaluate(Object o) {
            final Task task = ((Task)o);
            return (isCompleted == null || (isCompleted.booleanValue() == task.isCompleted())) &&
                    (isActive == null || (isActive.booleanValue() == task.getTimeEntries().size() > 0));
        }
View Full Code Here

            this.isCompleted = isCompleted;
            this.isActive = isActive;
        }

        public boolean evaluate(Object o) {
            final Task task = ((Task)o);
            return (isCompleted == null || (isCompleted.booleanValue() == task.isCompleted())) &&
                    (isActive == null || (isActive.booleanValue() == task.getTimeEntries().size() > 0));
        }
View Full Code Here

    public void testPopulateTask() throws Exception {
        Project project = newProject();
        Iteration iteration = newIteration(project);
        UserStory story = newUserStory(iteration);
        Task task = newTask(story);
        commitCloseAndOpenSession();
        DomainContext context = new DomainContext();
        context.populate(task);
        assertEquals(project.getId(), context.getProjectId());
        assertEquals(project.getName(), context.getProjectName());
View Full Code Here

            taskTypeCount = new Hashtable();

            Iterator taskItr = getIterationTasks().iterator();

            while (taskItr.hasNext()) {
                Task task = (Task)taskItr.next();

                Integer typeCount = (Integer)taskTypeCount.get(task.getType());
                if (typeCount == null) {
                    typeCount = new Integer(0);
                }

                taskTypeCount.put(task.getType(), new Integer(typeCount.intValue() + 1));
            }
        }

        return taskTypeCount;
    }
View Full Code Here

            taskDispositionCount = new Hashtable();

            Iterator taskItr = getIterationTasks().iterator();

            while (taskItr.hasNext()) {
                Task task = (Task)taskItr.next();

                Integer dispositionCount = (Integer)taskDispositionCount.get(task.getDisposition());
                if (dispositionCount == null) {
                    dispositionCount = new Integer(0);
                }

                taskDispositionCount.put(task.getDisposition(), new Integer(dispositionCount.intValue() + 1));
            }
        }

        return taskDispositionCount;
    }
View Full Code Here

            taskTypeEstimatedHours = new Hashtable();

            Iterator taskItr = getIterationTasks().iterator();

            while (taskItr.hasNext()) {
                Task task = (Task)taskItr.next();

                if (task.isCompleted() == false) {
                    continue;
                }

                Double estimatedHours = (Double)taskTypeEstimatedHours.get(task.getType());
                if (estimatedHours == null) {
                    estimatedHours = new Double(task.getEstimatedHours());
                } else {
                    double oldHours = estimatedHours.doubleValue();
                    estimatedHours = new Double(oldHours += task.getEstimatedHours());
                }

                taskTypeEstimatedHours.put(task.getType(), estimatedHours);
            }
        }

        return taskTypeEstimatedHours;
    }
View Full Code Here

            taskDispositionEstimatedHours = new Hashtable();

            Iterator taskItr = getIterationTasks().iterator();

            while (taskItr.hasNext()) {
                Task task = (Task)taskItr.next();

                if (task.isCompleted() == false) {
                    continue;
                }

                Double estimatedHours = (Double)taskDispositionEstimatedHours.get(task.getDisposition());
                if (estimatedHours == null) {
                    estimatedHours = new Double(task.getEstimatedHours());
                } else {
                    double oldHours = estimatedHours.doubleValue();
                    estimatedHours = new Double(oldHours += task.getEstimatedHours());
                }

                taskDispositionEstimatedHours.put(task.getDisposition(), estimatedHours);
            }
        }

        return taskDispositionEstimatedHours;
    }
View Full Code Here

            taskTypeActualHours = new Hashtable();

            Iterator taskItr = getIterationTasks().iterator();

            while (taskItr.hasNext()) {
                Task task = (Task)taskItr.next();

                if (task.isCompleted() == false) {
                    continue;
                }

                Double actualHours = (Double)taskTypeActualHours.get(task.getType());
                if (actualHours == null) {
                    actualHours = new Double(task.getActualHours());
                } else {
                    double oldHours = actualHours.doubleValue();
                    actualHours = new Double(oldHours += task.getActualHours());
                }

                taskTypeActualHours.put(task.getType(), actualHours);
            }
        }

        return taskTypeActualHours;
    }
View Full Code Here

            taskDispositionActualHours = new Hashtable();

            Iterator taskItr = getIterationTasks().iterator();

            while (taskItr.hasNext()) {
                Task task = (Task)taskItr.next();

                if (task.isCompleted() == false) {
                    continue;
                }

                Double actualHours = (Double)taskDispositionActualHours.get(task.getDisposition());
                if (actualHours == null) {
                    actualHours = new Double(task.getActualHours());
                } else {
                    double oldHours = actualHours.doubleValue();
                    actualHours = new Double(oldHours += task.getActualHours());
                }

                taskDispositionActualHours.put(task.getDisposition(), actualHours);
            }
        }

        return taskDispositionActualHours;
    }
View Full Code Here

TOP

Related Classes of org.nxplanner.domain.Task

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.