From 9ebfaaafed1b54aa2bea8cf98f65e588aa622379 Mon Sep 17 00:00:00 2001 From: "Federico C. Guizzardi" Date: Mon, 8 Jun 2015 10:53:04 +0200 Subject: [PATCH] Fixes related parsing --- .../geoserver/rest/decoder/RESTWmsStore.java | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/main/java/it/geosolutions/geoserver/rest/decoder/RESTWmsStore.java b/src/main/java/it/geosolutions/geoserver/rest/decoder/RESTWmsStore.java index 7c0cda1..bf2bba3 100644 --- a/src/main/java/it/geosolutions/geoserver/rest/decoder/RESTWmsStore.java +++ b/src/main/java/it/geosolutions/geoserver/rest/decoder/RESTWmsStore.java @@ -90,10 +90,23 @@ public class RESTWmsStore { return cs.getChildText("name"); } - public String getWorkspaceName() { - return cs.getChild("workspace").getChildText("name"); + public String getType() { + return cs.getChildText("type"); } + public Boolean getEnabled() { + return Boolean.parseBoolean(cs.getChildText("enabled")); + } + + public String getWorkspaceName() { + return cs.getChild("workspace").getChildText("name"); + } + + public Boolean getUseConnectionPooling(){ + Element entry = cs.getChild("metadata").getChild("entry"); + return entry.getAttributeValue("key").equals("useConnectionPooling") && Boolean.parseBoolean(entry.getValue()); + } + public String getCapabilitiesURL() { return cs.getChildText("capabilitiesURL"); } @@ -108,11 +121,7 @@ public class RESTWmsStore { public String getConnectTimeout() { return cs.getChildText("connectTimeout"); - } - - public String getType() { - return cs.getChildText("type"); - } + } public String getUser() { return cs.getChildText("user");