blob: 673055aa0608f8266e56103f186e337299d8e65c (
plain)
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
|
package model.ca;
import java.time.ZonedDateTime;
/**
* An audit log entry. Audit logs record who did what at when, used for future auditing purposes.
* These logs will never be deleted.
*/
public class AuditLogEntry {
private final String user;
private final ZonedDateTime time;
private final String action;
/**
* EFFECTS: Init the entry with the given user, time, and action.
*/
public AuditLogEntry(String user, ZonedDateTime time, String action) {
this.user = user;
this.time = time;
this.action = action;
}
/**
* EFFECTS: Format log in the time\tuser\taction format.
*/
@Override
public String toString() {
return String.format("%s\t%s\t%s", time, user, action);
}
public String getUser() {
return user;
}
public ZonedDateTime getTime() {
return time;
}
public String getAction() {
return action;
}
}
|