changeset 1308:db46646375e3

Added action to probe audit trail.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 08 Mar 2017 09:44:11 +0100
parents c2df9c848e9d
children d531e8e8afa2
files src/main/java/de/intevation/lada/model/land/AuditTrailProbe.java src/main/java/de/intevation/lada/rest/AuditTrailService.java
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
     }
--- 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())) {
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)