Mercurial > lada > lada-server
changeset 272:0ddcc6240d47 0.2
Added Info class to serve general information on the server application.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Thu, 25 Jul 2013 14:23:44 +0200 |
parents | f7b5ff46f3e7 |
children | cd78ec2f7d76 709d090eec07 |
files | src/main/java/de/intevation/lada/rest/InfoService.java |
diffstat | 1 files changed, 30 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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) {