-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystem-architechture.puml
206 lines (117 loc) · 5.92 KB
/
system-architechture.puml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
@startuml
class OjApplication {
public static void main(String[] args)
}
interface AnnouncementService {
List<AnnouncementDTO> findAnnouncements(int page, int size)
AnnouncementDTO findAnnouncementById(String id);
AnnouncementDTO create(AnnouncementDTO announcementDTO);
AnnouncementDTO update(AnnouncementDTO announcementDTO);
AnnouncementDTO delete(String id);
}
interface AuthenticationService {
User register(UserDTO userDTO);
User forgotPassword(String password);
String login(String username, String password);
String refresh(String token);
void counter(AuthLogDTO authLogDTO);
}
interface ContestService {
ContestDTO create(ContestDTO contestDTO);
void delete(String id);
ContestDTO update(ContestDTO contestDTO);
ContestDTO partUpdate(ContestDTO contestDTO);
ContestDTO findById(String id);
List<RankingUserDTO> addUsersByGroups(List<String> groupIdList, String contestId);
List<RankingUserDTO> getUsers(String id);
List<RankingUserDTO> addUsers(List<String> userIdList, String contestId);
void deleteUsers(List<String> userIdList, String id);
PageDTO<ContestDTO> findCriteria(Integer page, Integer size, ContestQuery contestQuery);
List<ProblemDTO> addProblems(List<String> problemIdList, String contestId);
void addProblem(String problemId, String contestId, Integer score);
void deleteProblems(List<String> problemIdList, String contestId);
List<ProblemDTO> findAllProblems(String id);
ProblemDTO findOneProblem(String contestId, String problemId);
ContestDTO setContestStatus(String id, ContestOption option);
void joinContest(String id, String password);
RankingDTO getRanking(String id, RankingQuery query);
Workbook exportRanking(String id, RankingQuery query);
}
interface FileUploadService {
String uploadFile(MultipartFile file, HttpServletRequest request);
String saveFile(String tempPath, String relativeDirectory);
}
interface GroupService {
GroupDTO findById(String id) throws GroupException;
List<GroupDTO> findAllGroups() throws GroupException;
PageDTO<GroupDTO> findCriteria(GroupQuery groupQuery, Integer page, Integer size);
GroupDTO create(GroupDTO groupDTO) throws GroupException;
GroupDTO update(GroupDTO groupDTO) throws GroupException, AuthorizationException;
GroupDTO delete(String id) throws GroupException, AuthorizationException;
List<JwtUser> addMembers(String id, List<String> usersId) throws UserException, GroupException, AuthorizationException;
List<JwtUser> deleteMembers(String id, List<String> userId) throws GroupException, UserException, AuthorizationException;
Workbook resetMembersPassword(String id) throws GroupException;
}
interface MeService {
User update(User user) throws HaveSuchItemException;
User changePassword(ChangePasswordDTO changePasswordDTO) throws ValidateException;
}
interface ProblemService {
List<ProblemDTO> findProblemNoCriteria(Integer page, Integer size);
PageDTO<ProblemDTO> findProblemCriteria(Integer page, Integer size, ProblemQuery problemQuery);
ProblemDTO findProblemById(String id) throws ProblemException;
ProblemDTO findProblemByTitle(String title);
ProblemDTO create(ProblemDTO problemDTO) throws ProblemException;
ProblemDTO update(ProblemDTO problemDTO) throws ProblemException;
ProblemDTO delete(String id) throws ProblemException;
}
interface RecommendService {
List<ProblemDTO> recommend(RecommendOptionDTO recommendOptionDTO);
}
interface SecurityQuestionService {
SecurityQuestionDTO getOne(String username) throws NoSuchItemException;
List<SecurityQuestionDTO> getAll();
Boolean deleteAll() throws NoSuchItemException;
Boolean saveAnswer(List<SecurityQuestionDTO> securityQuestionDTOList)
throws SecurityQuestionException;
Boolean checkAnswer(SecurityQuestionDTO securityQuestionDTO, String username)
throws NoSuchItemException, NoSuchAlgorithmException;
}
interface SubmissionService {
SubmissionDTO findById(String id) throws SubmissionException, ContestException;
PageDTO<SubmissionDTO> findByContest(String id, Integer page, Integer size)
throws ContestException;
PageDTO<SubmissionDTO> findByUser(Integer page, Integer size, Boolean isPractice);
List<SubmissionDTO> findByPracticeProblem(String problemId) throws ProblemException;
List<SubmissionDTO> findByContestProblem(String contestId, String problemId) throws ProblemException, ContestException;
SubmissionDTO createContestSubmission(SubmissionDTO submissionDTO)
throws ContestException, ProblemException, SubmissionException;
SubmissionDTO createPracticeSubmission(SubmissionDTO submissionDTO)
throws ProblemException, SubmissionException;
SubmissionDTO rejudgeSubmission(String id, Result result) throws SubmissionException;
PageDTO<SubmissionDTO> findAll(Integer page, Integer size, SubmissionQuery submissionQuery)
throws ProblemException, UserException;
void counter(SubmissionDTO submissionDTO) throws ProblemException, UserException;
}
interface UserService {
PageDTO<JwtUser> getUserRanking(Integer page, Integer size);
PageDTO<JwtUser> getAllUsers(Integer page, Integer size, UserQuery userQuery);
JwtUser getOne(String id) throws UserException;
JwtUser create(UserDTO userDTO) throws UserException;
JwtUser update(UserDTO userDTO) throws UserException;
void delete(List<String> id) throws UserException;
PageDTO<JwtUser> generateUser(String groupId, Long quantity) throws GroupException;
PageDTO<JwtUser> generateUser(String groupId, File excel) throws GroupException, FileException;
}
OjApplication -right- UserService
OjApplication -right- ContestService
OjApplication -right- AnnouncementService
OjApplication -right- AuthenticationService
OjApplication -right- FileUploadService
OjApplication -right- GroupService
OjApplication -right- MeService
OjApplication -right- ProblemService
OjApplication -right- RecommendService
OjApplication -right- SecurityQuestionService
OjApplication -right- SubmissionService
@enduml