Package org.nxplanner.domain

Examples of org.nxplanner.domain.Task


            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

                Integer.toString(continuedStory.getId())) + "\n\n" + story.getDescription());
        continuedStory.setDescription(getResources(request).getMessage("story.continued.from",
                Integer.toString(story.getId()) + "\n\n" + continuedStory.getDescription()));
        Iterator taskIterator = story.getTasks().iterator();
        while (taskIterator.hasNext()) {
            Task task = (Task)taskIterator.next();
            if (!task.isCompleted()) {
                Task continuedTask = new Task();
                BeanUtils.copyProperties(continuedTask, task);
                continuedTask.setCreatedDate(new Date());
                continuedTask.setStory(continuedStory);
                continuedTask.setEstimatedHours(task.getEstimatedHours() - task.getActualHours());
                continuedTask.setTimeEntries(null);
                Integer continuedTaskId = (Integer)session.save(continuedTask);
                HistorySupport.saveEvent(session, continuedTask, HistoricalEvent.CREATED, "continuation",
                        SecurityHelper.getRemoteUserId(request), new Date());
                task.setDescription("Continued as task:" + continuedTask.getId() + "\n\n" + task.getDescription());
                continuedTask.setDescription("Continued from task:" + task.getId() + "\n\n" +
                        continuedTask.getDescription());
            }
        }
        return continuedStory;
    }
View Full Code Here

                Integer.toString(continuedStory.getId())) + "\n\n" + story.getDescription());
        continuedStory.setDescription(getResources(request).getMessage("story.continued.from",
                Integer.toString(story.getId()) + "\n\n" + continuedStory.getDescription()));
        Iterator taskIterator = story.getTasks().iterator();
        while (taskIterator.hasNext()) {
            Task task = (Task)taskIterator.next();
            if (!task.isCompleted()) {
                Task continuedTask = new Task();
                BeanUtils.copyProperties(continuedTask, task);
                continuedTask.setCreatedDate(new Date());
                continuedTask.setStory(continuedStory);
                continuedTask.setEstimatedHours(task.getEstimatedHours() - task.getActualHours());
                continuedTask.setTimeEntries(null);
                Integer continuedTaskId = (Integer)session.save(continuedTask);
                HistorySupport.saveEvent(session, continuedTask, HistoricalEvent.CREATED, "continuation",
                        SecurityHelper.getRemoteUserId(request), new Date());
                task.setDescription("Continued as task:" + continuedTask.getId() + "\n\n" + task.getDescription());
                continuedTask.setDescription("Continued from task:" + task.getId() + "\n\n" +
                        continuedTask.getDescription());
            }
        }
        return continuedStory;
    }
View Full Code Here

import org.nxplanner.domain.Task;


public class TaskDecorator extends TableDecorator {
    public double getPercentCompleted() {
        Task task = getTask();
        return HoursDecorator.getPercentCompletedScore(task.getEstimatedHours(),
                                                       task.getActualHours(),
                                                       task.getRemainingHours(),
                                                       task.isCompleted());
    }
View Full Code Here

                                                       task.getRemainingHours(),
                                                       task.isCompleted());
    }

    public double getRemainingHours() {
        Task task = getTask();
        return HoursDecorator.getRemainingHoursScore(task.getActualHours(), task.getRemainingHours(), task.isCompleted());
    }
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.