# HG changeset patch # User Torsten Irländer # Date 1374755024 -7200 # Node ID 0ddcc6240d47a1813789b77ce8572c92bf826597 # Parent f7b5ff46f3e7b1bd29ce08aee8baf46d8b7497c6 Added Info class to serve general information on the server application. diff -r f7b5ff46f3e7 -r 0ddcc6240d47 src/main/java/de/intevation/lada/rest/InfoService.java --- a/src/main/java/de/intevation/lada/rest/InfoService.java Thu Jul 25 11:44:26 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/InfoService.java Thu Jul 25 14:23:44 2013 +0200 @@ -13,6 +13,35 @@ import de.intevation.lada.auth.Authentication; import de.intevation.lada.auth.AuthenticationException; +class Info { + String user; + String groups; + String version; + public Info(String user, String groups, String version) { + this.user = user; + this.groups = groups; + this.version = version; + } + public String getUser() { + return user; + } + public void setUser(String user) { + this.user = user; + } + public String getGroups() { + return groups; + } + public void setGroups(String groups) { + this.groups = groups; + } + public String getVersion() { + return version; + } + public void setVersion(String version) { + this.version = version; + } +} + /** * This class produces a RESTful service to read, write and update * LOrt objects. @@ -49,7 +78,7 @@ if (!authentication.isAuthorizedUser(headers)) { return new Response(false, 699, null); } - Response response = new Response(true, 200, null); + Response response = new Response(true, 200, new Info("-/-", "-/-", "-/-")); return response; } catch(AuthenticationException ae) {