1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 package net.sf.pmr.agilePlanning.service;
36
37 import java.util.Set;
38
39 import net.sf.pmr.agilePlanning.domain.story.Story;
40 import net.sf.pmr.agilePlanning.domain.story.task.Task;
41 import net.sf.pmr.keopsframework.domain.validation.Errors;
42
43 /***
44 * @author Arnaud Prost (arnaud.prost@gmail.com)
45 */
46 public interface StoryService {
47
48 /***
49 * find stories for a projet (using his persistanceId)
50 * @param projectPersistanceId ProjectPersistanceId
51 * @return Iteration
52 */
53 Set findByProjectPersistanceId(final int projectPersistanceId);
54
55 /***
56 * find story by its persistance Id
57 * @param persistanceId persistanceId
58 * @return Story
59 */
60 Story findByPersistanceId(final int persistanceId);
61
62 /***
63 * Add a story
64 * @param agileProjectPersistanceId id of the agileProject
65 * @param shortDescription short description of the story
66 * @param description description of the story
67 * @param estimate first estimate
68 * @param iterationPersistanceId persistance id of the iteration
69 * @return errors errors
70 */
71 Errors add(final int agileProjectPersistanceId, final String shortDescription, final String description, final int estimate, final int iterationPersistanceId);
72
73 /***
74 * Update a story
75 * @param agileProjectPersistanceId id of the agileProject
76 * @param shortDescription short description of the story
77 * @param description description of the story
78 * @param estimate first estimate
79 * @param iterationPersistanceId persistance id of the iteration
80 * @param persistanceId of the story
81 * @param persistanceVersion persistance version
82 * @return errors errors
83 */
84 Errors update(final int agileProjectPersistanceId, final String shortDescription, final String description, final int estimate,
85 final int iterationPersistanceId, final int persistanceId, final long persistanceVersion);
86
87 /***
88 // * Delete a story
89 // * @param persistanceId of the story
90 // * @param persistanceVersion persistance version
91 // * @return errors errors
92 // */
93
94
95 /***
96 * find task by its persistance Id
97 * @param persistanceId persistanceId
98 * @return Task
99 */
100 Task findTaskByPersistanceId(final int persistanceId);
101
102 /***
103 * Add a task
104 * @param storyPersistanceId id of the story
105 * @param persistanceId of the task (0 if the task is new)
106 * @param numberOfIdealDays of the task
107 * @param shortDescription short description of the task
108 * @param devopperPersistanceId for the task
109 * @return errors errors
110 */
111 Errors addTask(final int storyPersistanceId, final int numberOfIdealDays, final String shortDescription, final int devopperPersistanceId);
112
113 /***
114 * Update a task
115 * @param storyPersistanceId id of the story
116 * @param numberOfIdealDays of the task
117 * @param shortDescription short description of the task
118 * @param developperPersistanceId for the task
119 * @param persistanceId of the task
120 * @param persistanceVersion persistance version
121 * @return errors errors
122 */
123 Errors updateTask(final int storyPersistanceId, final int numberOfIdealDays, final String shortDescription, final int developperPersistanceId,
124 final int persistanceId, final long persistanceVersion);
125
126 }