|
|
|
|
@ -41,6 +41,7 @@ import org.springframework.util.Assert;
@@ -41,6 +41,7 @@ import org.springframework.util.Assert;
|
|
|
|
|
* (wrappers for AuditEvent). |
|
|
|
|
* |
|
|
|
|
* @author Dave Syer |
|
|
|
|
* @author Nakul Mishra |
|
|
|
|
* @see AuditEventRepository |
|
|
|
|
*/ |
|
|
|
|
@JsonInclude(Include.NON_EMPTY) |
|
|
|
|
@ -85,10 +86,9 @@ public class AuditEvent implements Serializable {
@@ -85,10 +86,9 @@ public class AuditEvent implements Serializable {
|
|
|
|
|
public AuditEvent(Date timestamp, String principal, String type, |
|
|
|
|
Map<String, Object> data) { |
|
|
|
|
Assert.notNull(timestamp, "Timestamp must not be null"); |
|
|
|
|
Assert.notNull(principal, "Principal must not be null"); |
|
|
|
|
Assert.notNull(type, "Type must not be null"); |
|
|
|
|
this.timestamp = timestamp; |
|
|
|
|
this.principal = principal; |
|
|
|
|
this.principal = principal != null ? principal : ""; |
|
|
|
|
this.type = type; |
|
|
|
|
this.data = Collections.unmodifiableMap(data); |
|
|
|
|
} |
|
|
|
|
|