[Lada-commits] [PATCH 3 of 3] Added action to probe audit trail
Wald Commits
scm-commit at wald.intevation.org
Wed Mar 8 09:44:23 CET 2017
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1488962651 -3600
# Node ID db46646375e3b452b4f96dc719b664cc6d033579
# Parent c2df9c848e9d04542b510741e6c87924d2399a30
Added action to probe audit trail.
diff -r c2df9c848e9d -r db46646375e3 src/main/java/de/intevation/lada/model/land/AuditTrailProbe.java
--- a/src/main/java/de/intevation/lada/model/land/AuditTrailProbe.java Wed Mar 08 09:43:46 2017 +0100
+++ b/src/main/java/de/intevation/lada/model/land/AuditTrailProbe.java Wed Mar 08 09:44:11 2017 +0100
@@ -41,6 +41,9 @@
@Column(name="tstamp")
private Timestamp tstamp;
+ @Column(name="action")
+ private String action;
+
@Column(name="messungs_id")
private Integer messungsId;
@@ -80,6 +83,14 @@
this.tstamp = tstamp;
}
+ public String getAction() {
+ return action;
+ }
+
+ public void setAction(String action) {
+ this.action = action;
+ }
+
public Integer getMessungsId() {
return this.messungsId;
}
diff -r c2df9c848e9d -r db46646375e3 src/main/java/de/intevation/lada/rest/AuditTrailService.java
--- a/src/main/java/de/intevation/lada/rest/AuditTrailService.java Wed Mar 08 09:43:46 2017 +0100
+++ b/src/main/java/de/intevation/lada/rest/AuditTrailService.java Wed Mar 08 09:44:11 2017 +0100
@@ -194,6 +194,7 @@
ObjectNode node = mapper.createObjectNode();
node.put("timestamp", audit.getTstamp().getTime());
node.put("type", audit.getTableName());
+ node.put("action", audit.getAction());
ObjectNode data = (ObjectNode)audit.getChangedFields();
data = translateIds(data);
node.putPOJO("changedFields", data);
@@ -301,6 +302,7 @@
ObjectNode node = mapper.createObjectNode();
node.put("timestamp", audit.getTstamp().getTime());
node.put("type", audit.getTableName());
+ node.put("action", audit.getAction());
ObjectNode data = (ObjectNode)audit.getChangedFields();
node.putPOJO("changedFields", data);
if ("kommentar_m".equals(audit.getTableName())) {
More information about the Lada-commits
mailing list