-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNoteAppService.java
More file actions
102 lines (87 loc) · 3.22 KB
/
NoteAppService.java
File metadata and controls
102 lines (87 loc) · 3.22 KB
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
package com.noteapp.common.service;
import com.noteapp.note.service.INoteService;
import com.noteapp.note.service.IShareNoteService;
import com.noteapp.note.service.io.FileIOService;
import com.noteapp.user.service.IAdminService;
import com.noteapp.user.service.IUserService;
import com.noteapp.user.service.security.VerificationMailService;
/**
* Cung cấp các service ở mức tổng quan của NoteApp System
* @author Nhóm 17
* @see IUserService
* @see IAdminService
* @see INoteService
* @see IShareNoteService
* @see VerificationMailService
* @see FileIOService
*/
public class NoteAppService {
private IUserService userService;
private IAdminService adminService;
private INoteService noteService;
private IShareNoteService shareNoteService;
private VerificationMailService verificationMailService;
private FileIOService fileIOService;
public NoteAppService() {
userService = null;
adminService = null;
noteService = null;
shareNoteService = null;
verificationMailService = null;
fileIOService = null;
}
public IUserService getUserService() throws NoteAppServiceException {
if (userService == null) {
throw new CausedBySystemException("Service has not inited!");
}
return userService;
}
public void setUserService(IUserService userService) {
this.userService = userService;
}
public IAdminService getAdminService() throws NoteAppServiceException {
if (adminService == null) {
throw new CausedBySystemException("Service has not inited!");
}
return adminService;
}
public void setAdminService(IAdminService adminService) {
this.adminService = adminService;
}
public INoteService getNoteService() throws NoteAppServiceException {
if (noteService == null) {
throw new CausedBySystemException("Service has not inited!");
}
return noteService;
}
public void setNoteService(INoteService noteService) {
this.noteService = noteService;
}
public IShareNoteService getShareNoteService() throws NoteAppServiceException {
if (shareNoteService == null) {
throw new CausedBySystemException("Service has not inited!");
}
return shareNoteService;
}
public void setShareNoteService(IShareNoteService shareNoteService) {
this.shareNoteService = shareNoteService;
}
public VerificationMailService getVerificationMailService() throws NoteAppServiceException {
if (verificationMailService == null) {
throw new CausedBySystemException("Service has not inited!");
}
return verificationMailService;
}
public void setVerificationMailService(VerificationMailService verificationMailService) {
this.verificationMailService = verificationMailService;
}
public FileIOService getFileIOService() throws NoteAppServiceException {
if (fileIOService == null) {
throw new CausedBySystemException("Service has not inited!");
}
return fileIOService;
}
public void setFileIOService(FileIOService fileIOService) {
this.fileIOService = fileIOService;
}
}