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.model.*;
22
23 import java.util.Date;
24 import java.util.List;
25 import java.util.Locale;
26 import java.util.Set;
27
28
29 public interface ProjectService {
30
31 public Project getProject(Integer projectId);
32
33 public List<Project> getAllProjects();
34
35 public List<Project> getAllAvailableProjects();
36
37 public Component getProjectComponent(Integer componentId);
38
39 public Component updateProjectComponent(Component component);
40
41 public Component addProjectComponent(Integer projectId, Component component);
42
43 public boolean removeProjectComponent(Integer projectId, Integer componentId);
44
45 public Version getProjectVersion(Integer versionId);
46
47 public Version updateProjectVersion(Version version);
48
49 public Version addProjectVersion(Integer projectId, Version version);
50
51 public boolean removeProjectVersion(Integer projectId, Integer versionId);
52
53 public List<User> getProjectOwners(Integer projectId);
54
55 public List<User> getListOfProjectOwners(Integer projectId);
56
57 public boolean setProjectOwners(Project project, Set<Integer> newOwners);
58
59 public List<CustomField> getProjectFields(Integer projectId);
60
61 public List<CustomField> getListOfProjectFields(Integer projectId);
62
63 public List<CustomField> getProjectFields(Integer projectId, Locale locale);
64
65 public boolean setProjectFields(Project project, Set<Integer> newFields);
66
67 public ProjectScript getProjectScript(Integer scriptId);
68
69 public List<ProjectScript> getProjectScripts();
70
71 public ProjectScript updateProjectScript(ProjectScript projectScript);
72
73 public ProjectScript addProjectScript(Integer projectId, ProjectScript projectScript);
74
75 public boolean removeProjectScript(Integer projectId, Integer scriptId);
76
77
78
79
80
81
82
83 public Long countIssuesByComponent(Integer componentId);
84
85 public Long getTotalNumberIssuesByProject(Integer projectId);
86
87 public Long getTotalNumberOpenIssuesByProject(Integer projectId);
88
89 public Long getTotalNumberResolvedIssuesByProject(Integer projectId);
90
91
92
93
94
95
96
97 public Long countIssuesByVersion(Integer versionId);
98
99
100
101
102
103
104
105
106
107
108 public Long[] getProjectStats(Integer projectId);
109
110 public Date getLatestIssueUpdatedDateByProjectId(Integer projectId);
111
112 Project createProject(Project project, Integer userId);
113
114
115
116
117
118
119 Project updateProject(Project project, Integer userId);
120
121
122
123
124
125
126
127 Boolean isUniqueProjectName(String projectName, Integer updatedProjectId);
128
129 }