-
Notifications
You must be signed in to change notification settings - Fork 2
/
MeetUSCFacade.java
64 lines (50 loc) · 1.63 KB
/
MeetUSCFacade.java
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
import java.util.*;
class MeetUSCFacade
{
private User currentUser;
public MeetUSCFacade()
{
}
public User addUser (String userName, String password, String firstName, String lastName)
{
currentUser = UserList.getInstance().addUser(userName, password, firstName, lastName);
return currentUser;
}
public Group addGroup(String name, String description, ArrayList<Category> category)
{
return GroupList.getInstance().addGroup(name, description, category);
}
public Event addEvent(String name, String description, ArrayList<Category> categories)
{
return EventList.getInstance().addEvent(name, description, categories);
}
public ArrayList<String> getJoinedGroups()
{
return currentUser.getJoinedGroups();
}
public User login(String userName, String password)
{
currentUser = UserList.getInstance().login(userName, password);
return currentUser;
}
public ArrayList<Event> searchEventByCategory(Category category)
{
return EventList.getInstance().searchByCategory(category);
}
public ArrayList<Event> searchEventsByName(String name)
{
return EventList.getInstance().searchByName(name);
}
public ArrayList<Group> searchGroupByCategory(Category category)
{
return GroupList.getInstance().searchGroupByCategory(category);
}
public ArrayList<Group> searchGroupByName(String name)
{
return GroupList.getInstance().searchForGroupByName(name);
}
public ArrayList<User> getAllUsersTest()
{
return UserList.getInstance().getAllUsers();
}
}