[Lada-commits] [PATCH 05 of 10] Added fields for status and user roles/functions

Wald Commits scm-commit at wald.intevation.org
Thu Nov 12 12:20:13 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1447326819 -3600
# Node ID 244c54d1695781a9b1cc06b234155aa69bfa07cc
# Parent  d49ac8d5f3f79915ea45186af0cc7ef079b956a1
Added fields for status and user roles/functions.

diff -r d49ac8d5f3f7 -r 244c54d16957 src/main/java/de/intevation/lada/model/Messung.java
--- a/src/main/java/de/intevation/lada/model/Messung.java	Thu Nov 12 12:12:11 2015 +0100
+++ b/src/main/java/de/intevation/lada/model/Messung.java	Thu Nov 12 12:13:39 2015 +0100
@@ -47,7 +47,6 @@
     @Column(name="probe_id")
     private Integer probeId;
 
-    @Column(name="status")
     private Integer status;
 
     @Transient
@@ -115,10 +114,16 @@
         this.probeId = probeId;
     }
 
+    /**
+     * @return the status
+     */
     public Integer getStatus() {
         return status;
     }
 
+    /**
+     * @param status the status to set
+     */
     public void setStatus(Integer status) {
         this.status = status;
     }
diff -r d49ac8d5f3f7 -r 244c54d16957 src/main/java/de/intevation/lada/model/land/LMessung.java
--- a/src/main/java/de/intevation/lada/model/land/LMessung.java	Thu Nov 12 12:12:11 2015 +0100
+++ b/src/main/java/de/intevation/lada/model/land/LMessung.java	Thu Nov 12 12:13:39 2015 +0100
@@ -45,6 +45,9 @@
     private Timestamp treeModified;
 
     @Transient
+    private Boolean statusEdit;
+
+    @Transient
     private Timestamp parentModified;
 
     public LMessung() {
@@ -66,6 +69,14 @@
         this.treeModified = treeModified;
     }
 
+    public Boolean getStatusEdit() {
+        return statusEdit;
+    }
+
+    public void setStatusEdit(Boolean statusEdit) {
+        this.statusEdit = statusEdit;
+    }
+
     public Timestamp getParentModified() {
         if (this.parentModified == null && this.probe != null) {
             return this.probe.getTreeModified();
@@ -99,4 +110,5 @@
     }
 
     public void setMessungsIdAlt(Integer messungsIdAlt) {}
+
 }
diff -r d49ac8d5f3f7 -r 244c54d16957 src/main/java/de/intevation/lada/util/auth/UserInfo.java
--- a/src/main/java/de/intevation/lada/util/auth/UserInfo.java	Thu Nov 12 12:12:11 2015 +0100
+++ b/src/main/java/de/intevation/lada/util/auth/UserInfo.java	Thu Nov 12 12:13:39 2015 +0100
@@ -20,6 +20,8 @@
     private List<String> messstellen;
     private List<String> netzbetreiber;
     private List<String> roles;
+    private List<Integer> funktionen;
+    private Integer statusRole;
 
     public UserInfo() {
         messstellen = new ArrayList<String>();
@@ -81,4 +83,43 @@
     public void setRoles(List<String> roles) {
         this.roles = roles;
     }
+
+    /**
+     * @return the funktionen
+     */
+    public List<Integer> getFunktionen() {
+        return this.funktionen;
+    }
+
+    /**
+     * @return the funktionen
+     */
+    public List<String> getFunktionenAsString() {
+        List<String> retVal = new ArrayList<String>();
+        for (int i = 0; i < this.funktionen.size(); i++) {
+            retVal.add(this.funktionen.get(i).toString());
+        }
+        return retVal;
+    }
+
+    /**
+     * @param funktionen the funktionen to set
+     */
+    public void setFunktionen(List<Integer> funktionen) {
+        this.funktionen = funktionen;
+    }
+
+    /**
+     * @return the statusRole
+     */
+    public Integer getStatusRole() {
+        return statusRole;
+    }
+
+    /**
+     * @param statusRole the statusRole to set
+     */
+    public void setStatusRole(Integer statusRole) {
+        this.statusRole = statusRole;
+    }
 }


More information about the Lada-commits mailing list