-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathIAuditModel.java
More file actions
34 lines (30 loc) · 1 KB
/
IAuditModel.java
File metadata and controls
34 lines (30 loc) · 1 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
package com.uid2.shared.audit;
import io.vertx.core.json.JsonObject;
/**
* An AuditModel contains fields that collectively logs all necessary details of an action
* that reads or writes sensitive information in the uid2-admin server. AuditModel objects should
* be <b>unmodifiable</b> and answer the following questions:
*
* • what happened?
* • when did it happen?
* • who initiated it?
* • on what did it happen?
* • where was it observed?
* • from where was it initiated?
* • to where was it going?
*/
public interface IAuditModel {
/**
* Converts the AuditModel to JSON format to be used in document-store databases.
* Every field should be a key in the resulting JSON object.
*
* @return a JSON representation of this AuditModel.
*/
JsonObject writeToJson();
/**
* Converts the AuditModel into a readable String format to be used in text logs.
*
* @return a String representation of this AuditModel.
*/
String writeToString();
}