changeset 242:04021a8122ba

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 15 Jul 2013 10:47:56 +0200
parents c00ee4e49d7d (current diff) a31daefe49ea (diff)
children 6a85146d76f5
files
diffstat 2 files changed, 19 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/rest/LMessungService.java	Mon Jul 15 10:27:25 2013 +0200
+++ b/src/main/java/de/intevation/lada/rest/LMessungService.java	Mon Jul 15 10:47:56 2013 +0200
@@ -95,7 +95,7 @@
      * @return Response object.
      */
     @PUT
-    @Path("/{id}")
+    @Path("/{messungId}/{probeId}")
     @Produces("text/json")
     @Consumes("application/json")
     public Response update(
--- a/src/main/java/de/intevation/lada/rest/LMesswertService.java	Mon Jul 15 10:27:25 2013 +0200
+++ b/src/main/java/de/intevation/lada/rest/LMesswertService.java	Mon Jul 15 10:47:56 2013 +0200
@@ -101,6 +101,7 @@
      * @return Response object.
      */
     @PUT
+    @Path("/{messgroesseId}/{messungsId}/{probeId}")
     @Produces("text/json")
     @Consumes("application/json")
     public Response update(
@@ -150,20 +151,22 @@
     }
 
     private boolean isReadOnly(String probeId, Integer messungsId) {
-        QueryBuilder<LMessung> builder =
-            new QueryBuilder<LMessung>(
-                messungRepository.getEntityManager(),
-                LMessung.class);
-        builder.and("probeId", probeId)
-            .and("messungsId", String.valueOf(messungsId));
-        Response response = messungRepository.filter(builder.getQuery());
-        List<LMessung> messungen = (List<LMessung>) response.getData();
-        if (messungen.isEmpty()) {
-            return true;
-        }
-        if (messungen.size() > 1) {
-            return true;
-        }
-        return messungen.get(0).isFertig();
+        return false;
+        // TODO: Fix #19 and make the following line work. (2013-07-08, 10:08, torsten)
+        //QueryBuilder<LMessung> builder =
+        //    new QueryBuilder<LMessung>(
+        //        messungRepository.getEntityManager(),
+        //        LMessung.class);
+        //builder.and("probeId", probeId)
+        //    .and("messungsId", String.valueOf(messungsId));
+        //Response response = messungRepository.filter(builder.getQuery());
+        //List<LMessung> messungen = (List<LMessung>) response.getData();
+        //if (messungen.isEmpty()) {
+        //    return true;
+        //}
+        //if (messungen.size() > 1) {
+        //    return true;
+        //}
+        //return messungen.get(0).isFertig();
     }
 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)