1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.itracker.services;
20
21 import org.itracker.*;
22 import org.itracker.model.*;
23
24 import java.util.*;
25
26 public interface IssueService {
27
28 Issue getIssue(Integer issueId);
29
30
31
32
33 List<Issue> getAllIssues();
34
35
36 Long getNumberIssues();
37
38
39
40
41
42
43
44 List<Issue> getIssuesWithStatus(int status);
45
46
47
48
49
50
51
52
53 List<Issue> getIssuesWithStatusLessThan(int status);
54
55
56
57
58
59
60
61 List<Issue> getIssuesWithSeverity(int severity);
62
63 List<Issue> getIssuesByProjectId(Integer projectId);
64
65 List<Issue> getIssuesByProjectId(Integer projectId, int status);
66
67 List<Issue> getIssuesCreatedByUser(Integer userId);
68
69 List<Issue> getIssuesCreatedByUser(Integer userId, boolean availableProjectsOnly);
70
71 List<Issue> getIssuesOwnedByUser(Integer userId);
72
73 List<Issue> getIssuesOwnedByUser(Integer userId, boolean availableProjectsOnly);
74
75 List<Issue> getIssuesWatchedByUser(Integer userId);
76
77 List<Issue> getIssuesWatchedByUser(Integer userId, boolean availableProjectsOnly);
78
79 List<Issue> getUnassignedIssues();
80
81 List<Issue> getUnassignedIssues(boolean availableProjectsOnly);
82
83 public List<Issue> getNextIssues(Integer issueId);
84 public List<Issue> getPreviousIssues(Integer issueId);
85
86
87
88
89
90
91
92
93
94 Issue createIssue(Issue issue, Integer projectId, Integer userId, Integer createdById)
95 throws ProjectException;
96
97
98
99
100
101
102
103 Issue updateIssue(Issue issue, Integer userId) throws ProjectException;
104
105 Issue systemUpdateIssue(Issue issue, Integer userId) throws ProjectException;
106
107
108
109
110
111
112
113
114
115 Issue moveIssue(Issue issue, Integer projectId, Integer userId);
116
117
118
119
120
121
122 boolean assignIssue(Integer issueId, Integer userId);
123
124
125
126
127
128
129
130 boolean assignIssue(Integer issueId, Integer userId, Integer assignedByUserId);
131
132
133
134
135 boolean setIssueFields(Integer issueId, List<IssueField> fields);
136
137 boolean setIssueComponents(Integer issueId, HashSet<Integer> componentIds, Integer userId);
138
139 boolean setIssueVersions(Integer issueId, HashSet<Integer> versionIds, Integer userId);
140
141 boolean addIssueHistory(IssueHistory history);
142
143 boolean addIssueRelation(Integer issueId, Integer relatedIssueId, IssueRelation.Type relationType, Integer userId);
144
145 boolean addIssueAttachment(IssueAttachment attachment, byte[] data);
146
147
148
149
150
151
152
153
154 boolean setIssueAttachmentData(Integer attachmentId, byte[] data);
155
156
157
158
159
160
161
162
163
164
165
166
167 boolean setIssueAttachmentData(String fileName, byte[] data);
168
169
170
171 boolean removeIssueAttachment(Integer attachmentId);
172
173
174 Integer removeIssueHistoryEntry(Integer entryId, Integer userId);
175
176 void removeIssueRelation(Integer relationId, Integer userId);
177
178 Project getIssueProject(Integer issueId);
179
180 List<Component> getIssueComponents(Integer issueId);
181
182 HashSet<Integer> getIssueComponentIds(Integer issueId);
183
184 List<Version> getIssueVersions(Integer issueId);
185
186 HashSet<Integer> getIssueVersionIds(Integer issueId);
187
188 User getIssueCreator(Integer issueId);
189
190 User getIssueOwner(Integer issueId);
191
192 IssueRelation getIssueRelation(Integer relationId);
193
194 List<IssueActivity> getIssueActivity(Integer issueId);
195
196 List<IssueActivity> getIssueActivity(Integer issueId, boolean notificationSent);
197
198 List<IssueAttachment> getAllIssueAttachments();
199
200 Long getAllIssueAttachmentSize();
201
202 Long getAllIssueAttachmentCount();
203
204
205 IssueAttachment getIssueAttachment(Integer attachmentId);
206
207
208
209
210
211
212
213 byte[] getIssueAttachmentData(Integer attachmentId);
214
215 List<IssueAttachment> getIssueAttachments(Integer issueId);
216
217 int getIssueAttachmentCount(Integer issueId);
218
219
220
221
222
223
224
225 IssueHistory getLastIssueHistory(Integer issueId);
226
227 List<IssueHistory> getIssueHistory(Integer issueId);
228
229 int getOpenIssueCountByProjectId(Integer projectId);
230
231 int getResolvedIssueCountByProjectId(Integer projectId);
232
233 int getTotalIssueCountByProjectId(Integer projectId);
234
235 Date getLatestIssueDateByProjectId(Integer projectId);
236
237 boolean canViewIssue(Integer issueId, User user);
238
239 boolean canViewIssue(Issue issue, User user);
240
241 public List<Issue> searchIssues(IssueSearchQuery queryModel, User user, Map<Integer, Set<PermissionType>> userPermissions) throws IssueSearchException;
242
243
244 }