-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTask.java
119 lines (107 loc) · 3.28 KB
/
Task.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
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
import java.util.ArrayList;
import java.util.UUID;
//test
public class Task extends Column{
// Class variables
private UUID id;
private String taskName;
private String taskDesc;
private int taskPrio;
private Category taskCategory;
private ArrayList<Comment> taskThread;
private boolean inProgress;
private int taskPrivacy;
private String color;
/**
* Constructor for Task
* @param taskName Name of the Task
* @param taskDesc Description of the Task
* @param taskPrio Priority of the Task
* @param taskCategory Category of the Task
* @param taskThread Thread of Comments for the Task
* @param inProgress Whether the Task is in progress or not
* @param taskPrivacy Privacy level of the Task
* @param color Color of the Task
*/
public Task(String taskName, String taskDesc, int taskPrio, Category taskCategory, ArrayList<Comment> taskThread, boolean inProgress, int taskPrivacy, String color) {
super(taskName);
this.id = UUID.randomUUID();
this.taskName = taskName;
this.taskDesc = taskDesc;
this.taskPrio = taskPrio;
this.taskCategory = taskCategory;
this.taskThread = taskThread;
this.inProgress = inProgress;
this.taskPrivacy = taskPrivacy;
this.color = color;
}
public Task(UUID id, String taskName, String taskDesc, int taskPrio, Category taskCategory, ArrayList<Comment> taskThread, boolean inProgress, int taskPrivacy, String color) {
super(taskName);
this.id = id;
this.taskName = taskName;
this.taskDesc = taskDesc;
this.taskPrio = taskPrio;
this.taskCategory = taskCategory;
this.taskThread = taskThread;
this.inProgress = inProgress;
this.taskPrivacy = taskPrivacy;
this.color = color;
}
/**
* Changes inProgress variable to false, representing that the Task is complete
*/
public void markComplete() {
inProgress = false;
}
/**
* Checks the privacy level of the User and compares it to the privacy level of the Task
* @param userType The User being checked upon to see if they have the correct privacy level
* @return boolean whether they have the correct privacy level or not
*/
public boolean checkPrivacy(User userType) {
/*
if(userType.getPrivacy() == taskPrivacy)
return true;
else
return false;
*/
return false;
}
public String getTaskName() {
return taskName;
}
public UUID getId() {
return id;
}
public String getTaskDes() {
return taskDesc;
}
public String getTaskPrio() {
return ""+taskPrio+"";
}
public Category getCategory() {
return taskCategory;
}
public ArrayList<Comment> getComments() {
return taskThread;
}
public boolean getInProgress() {
return inProgress;
}
public String getInProgressString() {
return ""+inProgress;
}
public int getTaskPrivacy() {
return taskPrivacy;
}
public String getTaskPrivacyString() {
return ""+taskPrivacy+"";
}
public String getColor() {
return color;
}
/*public ArrayList<Comment> addComment() {
User user;
return Comment(user.getUserName(), comme);
} */
}