| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
package org.itracker.model; |
| 20 |
|
|
| 21 |
|
import org.apache.commons.lang.builder.ToStringBuilder; |
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
@author |
| 35 |
|
|
|
|
|
| 0% |
Uncovered Elements: 35 (35) |
Complexity: 15 |
Complexity Density: 0.83 |
|
| 36 |
|
public class IssueActivity extends AbstractEntity { |
| 37 |
|
|
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
private static final long serialVersionUID = 1L; |
| 42 |
|
|
| 43 |
|
|
| 44 |
|
private Issue issue; |
| 45 |
|
|
| 46 |
|
|
| 47 |
|
private User user; |
| 48 |
|
|
| 49 |
|
|
| 50 |
|
private String description = ""; |
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
private boolean notificationSent = false; |
| 56 |
|
|
| 57 |
|
private IssueActivityType activityType = IssueActivityType.ISSUE_CREATED; |
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 69 |
0
|
public IssueActivity() {... |
| 70 |
|
|
| 71 |
|
} |
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
@param |
| 79 |
|
@param |
| 80 |
|
@param |
| 81 |
|
@param |
| 82 |
|
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 83 |
0
|
public IssueActivity(Issue issue, User user, IssueActivityType type) {... |
| 84 |
0
|
setIssue(issue); |
| 85 |
0
|
setUser(user); |
| 86 |
0
|
setActivityType(type); |
| 87 |
|
} |
| 88 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 89 |
0
|
public Issue getIssue() {... |
| 90 |
0
|
return issue; |
| 91 |
|
} |
| 92 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 93 |
0
|
public void setIssue(Issue issue) {... |
| 94 |
0
|
if (issue == null) { |
| 95 |
0
|
throw new IllegalArgumentException("null issue"); |
| 96 |
|
} |
| 97 |
0
|
this.issue = issue; |
| 98 |
|
} |
| 99 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 100 |
0
|
public User getUser() {... |
| 101 |
0
|
return user; |
| 102 |
|
} |
| 103 |
|
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 104 |
0
|
public void setUser(User user) {... |
| 105 |
0
|
if (user == null) { |
| 106 |
0
|
throw new IllegalArgumentException("null user"); |
| 107 |
|
} |
| 108 |
0
|
this.user = user; |
| 109 |
|
} |
| 110 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 111 |
0
|
public void setActivityType(IssueActivityType type) {... |
| 112 |
|
|
| 113 |
|
|
| 114 |
0
|
this.activityType = type; |
| 115 |
|
} |
| 116 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 117 |
0
|
public IssueActivityType getActivityType() {... |
| 118 |
0
|
return this.activityType; |
| 119 |
|
} |
| 120 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 121 |
0
|
public String getDescription() {... |
| 122 |
0
|
return description; |
| 123 |
|
} |
| 124 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 125 |
0
|
public void setDescription(String description) {... |
| 126 |
0
|
this.description = description; |
| 127 |
|
} |
| 128 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 129 |
0
|
public boolean getNotificationSent() {... |
| 130 |
0
|
return notificationSent; |
| 131 |
|
} |
| 132 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 133 |
0
|
public void setNotificationSent(boolean sent) {... |
| 134 |
0
|
this.notificationSent = sent; |
| 135 |
|
} |
| 136 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 137 |
0
|
public String toString() {... |
| 138 |
0
|
return new ToStringBuilder(this).append("id", getId()) |
| 139 |
|
.append("issue", getIssue()).append("user", getUser()).append("type", |
| 140 |
|
getActivityType()).append("createDate", getCreateDate()) |
| 141 |
|
.toString(); |
| 142 |
|
|
| 143 |
|
} |
| 144 |
|
|
| 145 |
|
} |