diff --git a/src/main/java/org/gcube/resourcemanagement/support/server/gcube/ISClientRequester.java b/src/main/java/org/gcube/resourcemanagement/support/server/gcube/ISClientRequester.java index 30562ca..8e3614b 100644 --- a/src/main/java/org/gcube/resourcemanagement/support/server/gcube/ISClientRequester.java +++ b/src/main/java/org/gcube/resourcemanagement/support/server/gcube/ISClientRequester.java @@ -235,7 +235,7 @@ public class ISClientRequester { retval.put(type, subtypes); } } catch (Exception e) { - ServerConsole.error(LOG_PREFIX, e); + _log.error(LOG_PREFIX, e); } } @@ -313,7 +313,7 @@ public class ISClientRequester { ServerConsole.debug(LOG_PREFIX, "[getResourcesRelated] found and invalid resource"); } } - ServerConsole.trace(LOG_PREFIX, "Retrieved (" + retval.size() + ") ServiceDetails for type: " + type); + //ServerConsole.trace(LOG_PREFIX, "Retrieved (" + retval.size() + ") ServiceDetails for type: " + type); return retval; } @@ -361,7 +361,6 @@ public class ISClientRequester { List results = null; - ServerConsole.debug(LOG_PREFIX, "XQUERYY:\n"+isQuery.getExpression()); if (status.isUsingCache() && CACHE.contains(cacheKey) && CACHE.get(cacheKey) != null) { results = CACHE.get(cacheKey); } else { @@ -389,7 +388,7 @@ public class ISClientRequester { ServerConsole.debug(LOG_PREFIX, "[getResourcesByType] found a resource with empty ID"); } } - ServerConsole.trace(LOG_PREFIX, "Retrieved (" + retval.size() + ") ServiceDetails for type: " + type); + //ServerConsole.trace(LOG_PREFIX, "Retrieved (" + retval.size() + ") ServiceDetails for type: " + type); return retval; } @@ -450,7 +449,7 @@ public class ISClientRequester { ServerConsole.debug(LOG_PREFIX, "[getResourcesByType] found a resource with empty ID"); } } - ServerConsole.trace(LOG_PREFIX, "Retrieved (" + retval.size() + ") ServiceDetails for type: " + type); + //ServerConsole.trace(LOG_PREFIX, "Retrieved (" + retval.size() + ") ServiceDetails for type: " + type); return retval; } @@ -469,7 +468,7 @@ public class ISClientRequester { for (XMLResult elem : results) { retval.add(elem.toString()); } - ServerConsole.trace(LOG_PREFIX, "Retrieved (" + retval.size() + ") ServiceDetails for type: " + ResourceTypeDecorator.WSResource.name()); + //ServerConsole.trace(LOG_PREFIX, "Retrieved (" + retval.size() + ") ServiceDetails for type: " + ResourceTypeDecorator.WSResource.name()); return retval; } @@ -503,7 +502,7 @@ public class ISClientRequester { List retval = new Vector(); - ServerConsole.trace(LOG_PREFIX, "Retrieved (" + retval.size() + ") Resource for ID: " + resID); + //ServerConsole.trace(LOG_PREFIX, "Retrieved (" + retval.size() + ") Resource for ID: " + resID); if (results != null && results.size() > 0) { String type = null; @@ -532,22 +531,22 @@ public class ISClientRequester { Map retval = new HashMap(); gonext: for (XMLResult plugin : results) { - System.out.println(plugin.toString()); + //System.out.println(plugin.toString()); try { for (String entry : plugin.evaluate("/CMPlugins/Plugin/Entry")) { Document doc = ScopeManager.getDocumentGivenXML(entry); String name = doc.getElementsByTagName("name").item(0).getFirstChild().getNodeValue(); - ServerConsole.info(LOG_PREFIX, "[LOAD-PLUGIN] found: *** name " + name); + _log.trace("[LOAD-PLUGIN] found: *** name " + name); String pluginType = doc.getElementsByTagName("Type").item(0).getFirstChild().getNodeValue(); - ServerConsole.info(LOG_PREFIX, "[LOAD-PLUGIN] found: *** type " + pluginType); + _log.trace("[LOAD-PLUGIN] found: *** type " + pluginType); String description = doc.getElementsByTagName("description").item(0).getFirstChild().getNodeValue(); - ServerConsole.info(LOG_PREFIX, "[LOAD-PLUGIN] found: *** description " + description); + _log.trace("[LOAD-PLUGIN] found: *** description " + description); String namespace = null; try { namespace = doc.getElementsByTagName("namespace").item(0).getFirstChild().getNodeValue(); - ServerConsole.info(LOG_PREFIX, "[LOAD-PLUGIN] found: *** namespace " + namespace); + _log.debug("[LOAD-PLUGIN] found: *** namespace " + namespace); } catch (Exception e) { - ServerConsole.warn(LOG_PREFIX, "[LOAD-PLUGIN] namespace not found"); + _log.warn("[LOAD-PLUGIN] namespace not found"); } GenericResourcePlugin toAdd = new GenericResourcePlugin(name, namespace, description, pluginType); @@ -568,7 +567,7 @@ public class ISClientRequester { } } - ServerConsole.info(LOG_PREFIX, "[LOAD-PLUGIN] found: param " + paramName); + _log.trace("[LOAD-PLUGIN] found: param " + paramName); GenericResourcePlugin.Field paramField = new GenericResourcePlugin.Field(paramName, GenericResourcePlugin.FieldType.string); if (paramDefinition != null) { @@ -636,22 +635,22 @@ public class ISClientRequester { HashMap> retval = new HashMap>(); gonext: for (XMLResult plugin : results) { - System.out.println(plugin.toString()); + //System.out.println(plugin.toString()); try { for (String entry : plugin.evaluate("/TMPlugins/Plugin/Entry")) { Document doc = ScopeManager.getDocumentGivenXML(entry); String name = doc.getElementsByTagName("name").item(0).getFirstChild().getNodeValue(); - ServerConsole.info(LOG_PREFIX, "[LOAD-PLUGIN] found: *** name " + name); + _log.trace("[LOAD-PLUGIN] found: *** name " + name); String pluginType = doc.getElementsByTagName("Type").item(0).getFirstChild().getNodeValue(); - ServerConsole.info(LOG_PREFIX, "[LOAD-PLUGIN] found: *** type " + pluginType); + _log.trace("[LOAD-PLUGIN] found: *** type " + pluginType); String description = doc.getElementsByTagName("description").item(0).getFirstChild().getNodeValue(); - ServerConsole.info(LOG_PREFIX, "[LOAD-PLUGIN] found: *** description " + description); + _log.trace("[LOAD-PLUGIN] found: *** description " + description); String namespace = null; try { namespace = doc.getElementsByTagName("namespace").item(0).getFirstChild().getNodeValue(); - ServerConsole.info(LOG_PREFIX, "[LOAD-PLUGIN] found: *** namespace " + namespace); + _log.trace("[LOAD-PLUGIN] found: *** namespace " + namespace); } catch (Exception e) { - ServerConsole.warn(LOG_PREFIX, "[LOAD-PLUGIN] namespace not found"); + _log.warn("[LOAD-PLUGIN] namespace not found"); } NodeList params = doc.getElementsByTagName("param"); @@ -673,7 +672,7 @@ public class ISClientRequester { xmlToParse = paramTree.item(j).getFirstChild().getNodeValue(); xmlToParse = xmlToParse.replaceAll("<", "<"); xmlToParse = xmlToParse.replaceAll(">", "<"); - System.out.println("toParse:" + xmlToParse); + //System.out.println("toParse:" + xmlToParse); foundSample = false; formFields = getPluginFormFromXml(xmlToParse); }