changeset 428:c5ae1eb3ff92

Added REST service for queries.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 04 Feb 2015 16:10:02 +0100
parents 4a9a4dc63402
children 11c6e8dee811
files src/main/java/de/intevation/lada/rest/QueryService.java
diffstat 1 files changed, 34 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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.
+ */
+@Path("/query")
+@RequestScoped
+public class QueryService {
+
+    /**
+     * Request all configured queries.
+     */
+    @GET
+    @Produces("text/json")
+    public Response get() {
+        return new Response(true, 200, QueryTools.getConfig());
+    }
+}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)