01: package com.technoetic.xplanner.domain.ext;
02:
03: import com.technoetic.xplanner.domain.Iteration;
04: import com.technoetic.xplanner.domain.UserStory;
05:
06: import java.util.Collection;
07: import java.util.HashSet;
08: import java.util.Iterator;
09:
10: //DEBT: We may need to fold this into Iteration. See if there are other places that use this otherwise keep it this way
11: public class IterationTasks extends Iteration {
12:
13: Iteration iteration;
14:
15: public IterationTasks(Iteration iteration) {
16: this .iteration = iteration;
17: }
18:
19: public Collection getIterationTasks() {
20: Collection iterationTasks = new HashSet();
21: Iterator storyIterator = iteration.getUserStories().iterator();
22: while (storyIterator.hasNext()) {
23: UserStory userStory = (UserStory) storyIterator.next();
24: Collection storyTasks = userStory.getTasks();
25: iterationTasks.addAll(storyTasks);
26: }
27: return iterationTasks;
28: }
29: }
|