[Lada-commits] [PATCH 13 of 14] Added REST service for queries
Wald Commits
scm-commit at wald.intevation.org
Wed Feb 4 16:16:35 CET 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1423062602 -3600
# Node ID c5ae1eb3ff92bca9bc945f11743e24089b96abcc
# Parent 4a9a4dc63402e46fc9a2fde1825f86c71e53d545
Added REST service for queries.
diff -r 4a9a4dc63402 -r c5ae1eb3ff92 src/main/java/de/intevation/lada/rest/QueryService.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/de/intevation/lada/rest/QueryService.java Wed Feb 04 16:10:02 2015 +0100
@@ -0,0 +1,34 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
+package de.intevation.lada.rest;
+
+import javax.enterprise.context.RequestScoped;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+
+import de.intevation.lada.query.QueryTools;
+import de.intevation.lada.util.rest.Response;
+
+
+/**
+ * REST-Service for preconfigured queries.
+ */
+ at Path("/query")
+ at RequestScoped
+public class QueryService {
+
+ /**
+ * Request all configured queries.
+ */
+ @GET
+ @Produces("text/json")
+ public Response get() {
+ return new Response(true, 200, QueryTools.getConfig());
+ }
+}
More information about the Lada-commits
mailing list