[Lada-commits] [PATCH 5 of 7] Organized imports and removed unused logger

Wald Commits scm-commit at wald.intevation.org
Mon Sep 5 10:20:06 CEST 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1473063452 -7200
# Branch schema-update
# Node ID f92c96efa97693d03d96a8794e11ef28b0f27538
# Parent  ea550e9a09a3c3a68a367a80753119fdf486b4ba
Organized imports and removed unused logger.

diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/importer/laf/OrtCreator.java
--- a/src/main/java/de/intevation/lada/importer/laf/OrtCreator.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/OrtCreator.java	Mon Sep 05 10:17:32 2016 +0200
@@ -7,7 +7,6 @@
  */
 package de.intevation.lada.importer.laf;
 
-import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.List;
 
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/model/stammdaten/Filter.java
--- a/src/main/java/de/intevation/lada/model/stammdaten/Filter.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/model/stammdaten/Filter.java	Mon Sep 05 10:17:32 2016 +0200
@@ -6,7 +6,6 @@
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
 import javax.persistence.ManyToOne;
 import javax.persistence.Transient;
 
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/rest/MessprogrammMmtService.java
--- a/src/main/java/de/intevation/lada/rest/MessprogrammMmtService.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/MessprogrammMmtService.java	Mon Sep 05 10:17:32 2016 +0200
@@ -7,9 +7,6 @@
  */
 package de.intevation.lada.rest;
 
-import java.sql.Timestamp;
-import java.util.Date;
-
 import javax.enterprise.context.RequestScoped;
 import javax.inject.Inject;
 import javax.servlet.http.HttpServletRequest;
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/rest/MessprogrammService.java
--- a/src/main/java/de/intevation/lada/rest/MessprogrammService.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/MessprogrammService.java	Mon Sep 05 10:17:32 2016 +0200
@@ -7,8 +7,6 @@
  */
 package de.intevation.lada.rest;
 
-import java.sql.Timestamp;
-import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/rest/MessungService.java
--- a/src/main/java/de/intevation/lada/rest/MessungService.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/MessungService.java	Mon Sep 05 10:17:32 2016 +0200
@@ -182,6 +182,7 @@
             }
             Response r = repository.filter(pBuilder.getQuery(), "land");
             r = authorization.filter(request, r, Messung.class);
+            @SuppressWarnings("unchecked")
             List<Messung> messungen= (List<Messung>)r.getData();
             for (Map<String, Object> entry: result) {
                 Integer pId = Integer.valueOf(entry.get("id").toString());
@@ -349,6 +350,7 @@
     public Response update(
         @Context HttpHeaders headers,
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         Messung messung
     ) {
         if (!authorization.isAuthorized(
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/rest/MesswertService.java
--- a/src/main/java/de/intevation/lada/rest/MesswertService.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/MesswertService.java	Mon Sep 05 10:17:32 2016 +0200
@@ -7,9 +7,6 @@
  */
 package de.intevation.lada.rest;
 
-import java.sql.Timestamp;
-import java.util.Date;
-
 import javax.enterprise.context.RequestScoped;
 import javax.inject.Inject;
 import javax.servlet.http.HttpServletRequest;
@@ -26,8 +23,6 @@
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.UriInfo;
 
-import org.apache.log4j.Logger;
-
 import de.intevation.lada.lock.LockConfig;
 import de.intevation.lada.lock.LockType;
 import de.intevation.lada.lock.ObjectLocker;
@@ -89,12 +84,6 @@
 public class MesswertService {
 
     /**
-     * The logger used in this class.
-     */
-    @Inject
-    private Logger logger;
-
-    /**
      * The data repository granting read/write access.
      */
     @Inject
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/rest/OrtService.java
--- a/src/main/java/de/intevation/lada/rest/OrtService.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/OrtService.java	Mon Sep 05 10:17:32 2016 +0200
@@ -7,9 +7,6 @@
  */
 package de.intevation.lada.rest;
 
-import java.sql.Timestamp;
-import java.util.Date;
-
 import javax.enterprise.context.RequestScoped;
 import javax.inject.Inject;
 import javax.servlet.http.HttpServletRequest;
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/rest/ProbeService.java
--- a/src/main/java/de/intevation/lada/rest/ProbeService.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/ProbeService.java	Mon Sep 05 10:17:32 2016 +0200
@@ -7,8 +7,6 @@
  */
 package de.intevation.lada.rest;
 
-import java.sql.Timestamp;
-import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -31,8 +29,6 @@
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.UriInfo;
 
-import org.apache.log4j.Logger;
-
 import de.intevation.lada.factory.ProbeFactory;
 import de.intevation.lada.lock.LockConfig;
 import de.intevation.lada.lock.LockType;
@@ -107,12 +103,6 @@
 public class ProbeService {
 
     /**
-     * The logger used in this class.
-     */
-    @Inject
-    private Logger logger;
-
-    /**
      * The data repository granting read/write access.
      */
     @Inject
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/rest/StatusService.java
--- a/src/main/java/de/intevation/lada/rest/StatusService.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/StatusService.java	Mon Sep 05 10:17:32 2016 +0200
@@ -27,16 +27,11 @@
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.UriInfo;
 
-import org.apache.log4j.Logger;
-
 import de.intevation.lada.lock.LockConfig;
 import de.intevation.lada.lock.LockType;
 import de.intevation.lada.lock.ObjectLocker;
 import de.intevation.lada.model.land.Messung;
-import de.intevation.lada.model.land.Probe;
 import de.intevation.lada.model.land.StatusProtokoll;
-import de.intevation.lada.model.stammdaten.MessStelle;
-import de.intevation.lada.model.stammdaten.StatusErreichbar;
 import de.intevation.lada.model.stammdaten.StatusKombi;
 import de.intevation.lada.model.stammdaten.StatusReihenfolge;
 import de.intevation.lada.util.annotation.AuthorizationConfig;
@@ -255,11 +250,6 @@
             StatusProtokoll oldStatus = defaultRepo.getByIdPlain(
                 StatusProtokoll.class, messung.getStatus(), "land");
 
-            String probeMstId = defaultRepo.getByIdPlain(
-                Probe.class,
-                messung.getProbeId(),
-                "land").getMstId();
-
             StatusKombi oldKombi = defaultRepo.getByIdPlain(StatusKombi.class, oldStatus.getStatusKombi(), "stamm");
             StatusKombi newKombi = defaultRepo.getByIdPlain(StatusKombi.class, status.getStatusKombi(), "stamm");
 
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/rest/stamm/StatusKombiService.java
--- a/src/main/java/de/intevation/lada/rest/stamm/StatusKombiService.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/stamm/StatusKombiService.java	Mon Sep 05 10:17:32 2016 +0200
@@ -19,7 +19,6 @@
 import javax.ws.rs.core.UriInfo;
 
 import de.intevation.lada.model.stammdaten.StatusKombi;
-import de.intevation.lada.model.stammdaten.StatusStufe;
 import de.intevation.lada.util.annotation.RepositoryConfig;
 import de.intevation.lada.util.data.Repository;
 import de.intevation.lada.util.data.RepositoryType;
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/rest/stamm/StatusWertService.java
--- a/src/main/java/de/intevation/lada/rest/stamm/StatusWertService.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/stamm/StatusWertService.java	Mon Sep 05 10:17:32 2016 +0200
@@ -23,8 +23,6 @@
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.UriInfo;
 
-import org.apache.log4j.Logger;
-
 import de.intevation.lada.model.land.Messung;
 import de.intevation.lada.model.land.StatusProtokoll;
 import de.intevation.lada.model.stammdaten.StatusErreichbar;
@@ -68,8 +66,6 @@
 @RequestScoped
 public class StatusWertService {
 
-    @Inject
-    private Logger logger = Logger.getLogger(StatusWertService.class);
     /**
      * The data repository granting read access.
      */
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/util/auth/HeaderAuthorization.java
--- a/src/main/java/de/intevation/lada/util/auth/HeaderAuthorization.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/util/auth/HeaderAuthorization.java	Mon Sep 05 10:17:32 2016 +0200
@@ -17,8 +17,6 @@
 import javax.persistence.EntityManager;
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.log4j.Logger;
-
 import de.intevation.lada.model.land.KommentarM;
 import de.intevation.lada.model.land.KommentarP;
 import de.intevation.lada.model.land.Messung;
@@ -50,9 +48,6 @@
 @AuthorizationConfig(type=AuthorizationType.HEADER)
 public class HeaderAuthorization implements Authorization {
 
-    @Inject
-    private Logger logger;
-
     /**
      * The Repository used to read from Database.
      */
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/util/auth/ShibbolethFilter.java
--- a/src/main/java/de/intevation/lada/util/auth/ShibbolethFilter.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/util/auth/ShibbolethFilter.java	Mon Sep 05 10:17:32 2016 +0200
@@ -11,7 +11,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
-import java.util.Enumeration;
 import java.util.List;
 import java.util.Properties;
 
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/util/data/DataTransaction.java
--- a/src/main/java/de/intevation/lada/util/data/DataTransaction.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/util/data/DataTransaction.java	Mon Sep 05 10:17:32 2016 +0200
@@ -14,7 +14,6 @@
 import javax.inject.Inject;
 import javax.persistence.EntityExistsException;
 import javax.persistence.EntityManager;
-import javax.persistence.PersistenceException;
 import javax.persistence.Query;
 import javax.persistence.TransactionRequiredException;
 
diff -r ea550e9a09a3 -r f92c96efa976 src/main/java/de/intevation/lada/validation/rules/status/StatusFolge.java
--- a/src/main/java/de/intevation/lada/validation/rules/status/StatusFolge.java	Fri Sep 02 14:03:25 2016 +0200
+++ b/src/main/java/de/intevation/lada/validation/rules/status/StatusFolge.java	Mon Sep 05 10:17:32 2016 +0200
@@ -14,7 +14,6 @@
 import org.apache.log4j.Logger;
 
 import de.intevation.lada.model.land.StatusProtokoll;
-import de.intevation.lada.model.stammdaten.StatusKombi;
 import de.intevation.lada.model.stammdaten.StatusReihenfolge;
 import de.intevation.lada.util.annotation.RepositoryConfig;
 import de.intevation.lada.util.data.QueryBuilder;


More information about the Lada-commits mailing list